Skip to content

fix: allow DocumentIntelligenceConverter api_version to default to None (fixes #1904)#2060

Open
li5435945-ship-it wants to merge 1 commit into
microsoft:mainfrom
li5435945-ship-it:fix/doc-intel-api-version
Open

fix: allow DocumentIntelligenceConverter api_version to default to None (fixes #1904)#2060
li5435945-ship-it wants to merge 1 commit into
microsoft:mainfrom
li5435945-ship-it:fix/doc-intel-api-version

Conversation

@li5435945-ship-it
Copy link
Copy Markdown

Description

Fixes #1904

The previously hardcoded as the default parameter. This overrode the Azure Document Intelligence SDK's own default version (), causing 404 errors for users who didn't explicitly specify an .

Problem

  1. Azure Document Intelligence SDK defaults to
  2. forced as default
  3. Users with standard Azure deployments (which don't specify api_version) got 404 errors because the converter used an outdated preview version

Fix

  • Changed default from to
  • Only passes to when explicitly set
  • When , the SDK uses its own built-in default version
  • Users can still set explicitly when needed

Changes

  • :
    • Build dict conditionally, only including when not None
    • Updated docstring to reflect the new behavior

Verification

@li5435945-ship-it li5435945-ship-it force-pushed the fix/doc-intel-api-version branch from ad6ad79 to 2fba468 Compare June 3, 2026 15:26
@li5435945-ship-it
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@li5435945-ship-it li5435945-ship-it force-pushed the fix/doc-intel-api-version branch from 2fba468 to 4969272 Compare June 3, 2026 16:20
The converter previously hardcoded api_version='2024-07-31-preview' as
the default, which overrode the SDK's own default (2024-11-30). This
caused 404 errors for users who didn't specify an api_version.

Now api_version defaults to None, and the SDK uses its own built-in
default version. Users can still set api_version explicitly when needed.

Fixes microsoft#1904
@li5435945-ship-it li5435945-ship-it force-pushed the fix/doc-intel-api-version branch from 4969272 to d229244 Compare June 4, 2026 03:49
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

1 participant