litellm/tests/test_litellm_rust/ocr
zoveki b96c1f30a6
feat(ocr)!: support outputContentFormat=markdown for Azure Document Intelligence (#48926)
* feat(ocr): support outputContentFormat=markdown for Azure Document Intelligence

* fix(ocr): map only span endpoints when slicing Azure Markdown pages

* fix(ocr): accept any casing of outputContentFormat and report code point offsets

Azure reads outputContentFormat case-insensitively, so Markdown and TEXT
now map to the same values instead of returning 400. When the proxy asks
Azure for code point offsets to split Markdown pages, the response now
carries stringIndexType so callers know the unit of table and key-value
spans. Tests use rstest and the enum derives VariantArray per the Rust
workspace rules.

* fix(ocr): ask Azure for code point offsets only on prebuilt-layout and keep line-joined pages when spans are malformed

* fix(ocr): trim Azure DI outputContentFormat, accept output_content_format, and drop invalid values under drop_params

* fix(ocr): fall back to output_content_format when outputContentFormat is empty

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-10-28 20:38:23 -07:00
..
__init__.py test(ocr): isolate native Rust bridge contracts (#40410) 2026-09-10 16:51:37 -07:00
conftest.py test(rust-bridge): select native routes per test without LITELLM_RUST (#46620) 2026-10-15 09:12:08 -07:00
data.py test(rust-bridge): pin Messages and Responses callback contracts on the native path (#46443) 2026-10-14 17:07:20 -07:00
test_callbacks.py fix(logging)!: fire one CustomLogger failure hook per async call outside the async flag list (#47124) 2026-10-20 15:19:14 -07:00
test_dispatch.py refactor(rust-bridge): decide native routing in the catalog, drop the bypass predicates (#46750) 2026-10-20 15:06:24 -07:00
test_failures.py feat(ocr)!: support outputContentFormat=markdown for Azure Document Intelligence (#48926) 2026-10-28 20:38:23 -07:00
test_guardrails.py test(rust-bridge): pin Messages and Responses callback contracts on the native path (#46443) 2026-10-14 17:07:20 -07:00
test_lifecycle.py fix(logging)!: fire one CustomLogger failure hook per async call outside the async flag list (#47124) 2026-10-20 15:19:14 -07:00
test_passthrough.py refactor: expose core private helpers under public names (#44871) 2026-10-07 00:05:27 +00:00
test_requests.py feat(ocr)!: support outputContentFormat=markdown for Azure Document Intelligence (#48926) 2026-10-28 20:38:23 -07:00
test_settings.py test(rust-bridge): pin Messages and Responses callback contracts on the native path (#46443) 2026-10-14 17:07:20 -07:00