litellm/litellm/rust_bridge
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
..
chat_completions refactor(rust): run OCR through a route-neutral callback contract and a legacy Logging adapter 2026-09-17 21:13:16 -07:00
messages refactor(rust): run OCR through a route-neutral callback contract and a legacy Logging adapter 2026-09-17 21:13:16 -07:00
ocr refactor(rust): run OCR through a route-neutral callback contract and a legacy Logging adapter 2026-09-17 21:13:16 -07:00
responses refactor(rust): run OCR through a route-neutral callback contract and a legacy Logging adapter 2026-09-17 21:13:16 -07:00
transcription refactor(rust_bridge): group route modules into packages and split ocr into main and rust 2026-09-16 20:34:51 +00:00
__init__.py feat(python): rename Rust rollout API (#39704) 2026-09-04 08:40:44 -07:00
_native.pyi merge: origin/main into litellm_rust_bridge_declarative_route_catalog 2026-09-16 22:54:51 +00:00
bindings.py Merge pull request #39334 from BerriAI/litellm_rust_opt_in_configuration 2026-09-02 16:26:36 -07:00
catalog.py cleanup 2026-09-16 14:38:59 -07:00
configuration.py fix(rust_bridge): let LITELLM_RUST win over litellm.rust() for optional tiers 2026-09-16 19:45:11 +00:00
dispatch.py refactor(rust_bridge): share call_hook instead of per-route native lambdas 2026-09-17 00:01:52 +00:00
failures.py refactor(rust_bridge): give chat completions, messages and responses the ocr dispatch shape 2026-09-16 15:02:12 -07:00
legacy_callbacks.py test(ocr): restore public-boundary OCR coverage the Rust move cannot replace 2026-09-17 21:36:48 -07:00
lifecycle.py refactor(rust): run OCR through a route-neutral callback contract and a legacy Logging adapter 2026-09-17 21:13:16 -07:00
loader.py refactor(tests): restructure rust python harness around strategy definitions (#39628) 2026-09-03 21:15:01 -07:00
public_call.py refactor(rust_bridge): give chat completions, messages and responses the ocr dispatch shape 2026-09-16 15:02:12 -07:00
response_metadata.py bring x-litellm-rust 2026-09-16 17:28:36 -07:00
runtime.py bring x-litellm-rust 2026-09-16 17:28:36 -07:00
timeouts.py refactor(lint): apply every safe ruff autofix and zero 28 strict-rule budgets 2026-08-01 15:43:29 -07:00
token_counter.py feat(rust): count tiktoken cl100k_base admission tokens in Rust (#40777) 2026-09-11 23:47:05 +00:00