Skip to content

fix(api): report effective MarkItDown image OCR capability - #2738

Closed
Sanderhoff-alt wants to merge 1 commit into
vectorize-io:mainfrom
Sanderhoff-alt:agent/markitdown-ocr-feature-flag
Closed

fix(api): report effective MarkItDown image OCR capability#2738
Sanderhoff-alt wants to merge 1 commit into
vectorize-io:mainfrom
Sanderhoff-alt:agent/markitdown-ocr-feature-flag

Conversation

@Sanderhoff-alt

Copy link
Copy Markdown
Contributor

Summary

  • Expose features.markitdown_image_ocr from GET /version so clients can distinguish general file upload support from usable MarkItDown image OCR.
  • Report the capability only when file uploads and OCR are enabled, MarkItDown registered successfully, and the parser allowlist permits it.
  • Regenerate the OpenAPI specification and Python, TypeScript, and Go client models, and update control-plane feature types.

Why

The optional MarkItDown OCR integration was controlled by dedicated server configuration, but /version only exposed file_upload_api. Clients could determine that the upload endpoint existed but could not determine whether image OCR was actually available. The missing capability flag made integrations rely on trial requests and conversion failures.

Impact

Clients can now check version.features.markitdown_image_ocr before offering or invoking MarkItDown image OCR. Existing deployments keep the default value false unless the complete runtime capability is available.

Validation

  • API integration tests cover enabled, upload-disabled, allowlist-excluded, parser-unavailable, and OCR-disabled states.
  • Python SDK version tests pass.
  • TypeScript SDK version tests pass.
  • Rust and Go clients build successfully during client generation.
  • OpenAPI generation, documentation build, and repository lint pass.

Expose markitdown_image_ocr from /version so clients can distinguish
file upload support from usable MarkItDown OCR.

Report true only when file uploads and OCR are enabled, MarkItDown is
registered, and the parser allowlist permits it. Regenerate clients and
cover each gate with integration tests.
@Sanderhoff-alt
Sanderhoff-alt marked this pull request as ready for review July 16, 2026 10:00
@nicoloboschi

Copy link
Copy Markdown
Collaborator

I'd prefer to not expose the markitdown flag. maybe a better alternative is to expose if image (or some format) is supported or not as flag

for now I'll close until we have clear use case

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.

2 participants