Skip to content

fix(doc-intel): default api_version to None in DocumentIntelligenceConverter - #2267

Merged
afourney merged 3 commits into
microsoft:mainfrom
MeiSiristhebest:fix/docintel-default-apiversion
Sep 2, 2026
Merged

fix(doc-intel): default api_version to None in DocumentIntelligenceConverter#2267
afourney merged 3 commits into
microsoft:mainfrom
MeiSiristhebest:fix/docintel-default-apiversion

Conversation

@MeiSiristhebest

Copy link
Copy Markdown
Contributor

Description

DocumentIntelligenceConverter previously set a default api_version="2024-07-31-preview". This prevented users from using Azure Document Intelligence SDK's native default API version (e.g. 2024-11-30).

This PR changes the default api_version parameter in DocumentIntelligenceConverter.__init__ to None and passes api_version to DocumentIntelligenceClient only when explicitly specified.

Fixes #1904

…nverter

Do not set a default api_version string in DocumentIntelligenceConverter. If api_version is omitted or None, avoid passing api_version kwarg to DocumentIntelligenceClient so Azure SDK uses its native default version.

Fixes microsoft#1904

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The implementation matches the reported requirement and covers both affected initialization paths.

Pull request overview

Updates Azure Document Intelligence integration to defer API-version selection to the SDK unless explicitly configured.

Changes:

  • Defaults api_version to None and conditionally forwards it.
  • Adds tests for default and custom API versions.
File summaries
File Description
packages/markitdown/src/markitdown/converters/_doc_intel_converter.py Defers default API-version selection to the Azure SDK.
packages/markitdown/tests/test_docintel_html.py Verifies omitted and explicit API-version behavior.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@afourney
afourney merged commit 83ce26d into microsoft:main Sep 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DocumentIntelligenceConverter should not set a default api_version

3 participants