Skip to content

Add --docintel-api-version to CLI and document default behavior#1563

Open
kei-yamazaki wants to merge 1 commit intomicrosoft:mainfrom
kei-yamazaki:doc-intel-api
Open

Add --docintel-api-version to CLI and document default behavior#1563
kei-yamazaki wants to merge 1 commit intomicrosoft:mainfrom
kei-yamazaki:doc-intel-api

Conversation

@kei-yamazaki
Copy link

Summary

This PR adds a new CLI option, --docintel-api-version, so users can explicitly choose the Azure Document Intelligence API version when running with --use-docintel.

Changes

  • Added --docintel-api-version to the CLI.
  • Passed the selected value through to MarkItDown(..., docintel_api_version=...).
  • Preserved the current default by using 2024-07-31-preview when the option is not provided.
  • Added validation to ensure --docintel-api-version is only accepted with --use-docintel.
  • Added/updated CLI test coverage for the new validation behavior.
  • Updated README with usage examples and default-version notes.

Why

Document Intelligence API versions can differ by environment and rollout timing.
Allowing explicit version selection improves reproducibility and makes debugging easier.

Backward compatibility

  • No breaking change.
  • Existing behavior remains the same if the new option is not used.

Example

markitdown input.pdf -d -e "<document_intelligence_endpoint>" --docintel-api-version 2024-07-31-preview
@Samayyy-1112
Copy link

IMG_2538

@Samayyy-1112
Copy link

Remove UI layers


markitdown = MarkItDown(**markitdown_kwargs)
else:
markitdown = MarkItDown(enable_plugins=args.use_plugins)

Choose a reason for hiding this comment

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

Hello


markitdown = MarkItDown(**markitdown_kwargs)
else:
markitdown = MarkItDown(enable_plugins=args.use_plugins)

Choose a reason for hiding this comment

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

80

assert result.returncode != 0
assert "--docintel-api-version requires --use-docintel." in result.stdout


Choose a reason for hiding this comment

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

Anshi

Choose a reason for hiding this comment

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

@tqtaqtqtaq045-oss
Copy link

IMG_2538

@tipex-16
Copy link

Good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants