litellm/tests/test_litellm_rust/ocr
Yujong Lee 1d88ca1cd2 test(ocr): restore public-boundary OCR coverage the Rust move cannot replace
The Python/Rust parity cases behind the ocr_backend fixture are back as they were on main:
the malformed-document matrix, Azure invalid options, native format for every provider and
the unknown Reducto model. They are the only check that the Python opt-out path and the
native path agree

test_native_failures_raise_the_public_exception_class drives every native failure kind
through litellm.ocr and litellm.aocr and pins the exception class callers catch. That class
is chosen in Python by route_host.map_failure, so no Rust test can cover it; bypassing the
mapping fails all 26 cases. The nested document edit and metadata failure tests run sync
again, since the sync path skips deployment hooks and dispatches success on the executor

legacy_callbacks.callbacks_needed now takes a Literal phase and ends its match with
assert_never, and setup imports from litellm.utils instead of mixing import styles
2026-09-17 21:36:48 -07:00
..
__init__.py test(ocr): isolate native Rust bridge contracts (#40410) 2026-09-10 16:51:37 -07:00
test_callbacks.py test(ocr): restore public-boundary OCR coverage the Rust move cannot replace 2026-09-17 21:36:48 -07:00
test_cohere.py refactor(rust): run OCR through a route-neutral callback contract and a legacy Logging adapter 2026-09-17 21:13:16 -07:00
test_dispatch.py refactor(ocr): complete native lifecycle and preserve Azure auth (#40734) 2026-09-12 11:56:49 -07:00
test_guardrails.py refactor(rust): run OCR through a route-neutral callback contract and a legacy Logging adapter 2026-09-17 21:13:16 -07:00
test_lifecycle.py test(ocr): restore public-boundary OCR coverage the Rust move cannot replace 2026-09-17 21:36:48 -07:00
test_requests.py test(ocr): restore public-boundary OCR coverage the Rust move cannot replace 2026-09-17 21:36:48 -07:00