litellm/tests/test_litellm/rust_bridge
devin-ai-integration[bot] 081f73f021
feat(rust): hand upstream response headers to the native Messages stream (#43178)
* ci: drop the ocr_testing job now that tests/ocr_tests is gone

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(ocr): restore the live OCR matrix and the ocr_testing job

The public litellm.ocr / aocr / Router interface is unchanged by the Rust
migration, so the live provider matrix still applies. Drops the stale VCR skip
list for the deleted test_rust_bridge.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(messages): show streamed upstream headers never reach the native stream

The Python handler puts the upstream response headers on the stream's
_hidden_params before the first chunk so the proxy can forward them as
llm_provider-* headers. The native route drops them, and this test fails
on the Rust path while passing on Python.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* feat(messages): hand upstream response headers to the native stream before its first chunk

The Messages route fills MessagesStreamHead from the upstream response and
yields it on Open. The Python driver converts it through the protocol host
and hands it to Stream and SyncStream as their _hidden_params, so a
streamed native call carries additional_headers the same way the Python
handler does and the proxy can forward them as llm_provider-* headers.

The relay contract lives in the core crate test, the hand-off in the
host-python driver test, and the header projection in the route host test,
so the recording-server test that showed the gap is dropped.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* wip

---------

Co-authored-by: Yujong Lee <yujong@berri.ai>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 10:03:15 -07:00
..
chat_completions test: migrate phase 15 legacy tests to tests/unit 2026-09-20 11:55:43 +00:00
messages feat(rust): hand upstream response headers to the native Messages stream (#43178) 2026-09-25 10:03:15 -07:00
ocr refactor(ocr): remove the Python OCR execution path and require the Rust route (#43081) 2026-09-24 18:18:50 -07:00
responses test: remove phase 16 legacy test files from tests/test_litellm 2026-09-20 10:59:22 +00:00
__init__.py refactor(rust_bridge): group route modules into packages and split ocr into main and rust 2026-09-16 20:34:51 +00:00
AGENTS.md refactor(ocr): remove the Python OCR execution path and require the Rust route (#43081) 2026-09-24 18:18:50 -07:00
native_route_wheel_test.py add streaming message 2026-09-18 15:45:08 -07:00
stubtest.ini build(rust-bridge): add typed _native stub and validate it with mypy.stubtest 2026-09-15 03:54:16 +00:00
test_bindings.py feat(rust-bridge): extend native dispatch foundation to chat completions, responses, and messages (#42805) 2026-09-23 21:47:27 +00:00
test_callbacks_legacy_python.py fix(proxy): release unclaimed budget reservations at request end (#42304) 2026-09-21 19:51:12 -07:00
test_catalog.py refactor(ocr): remove the Python OCR execution path and require the Rust route (#43081) 2026-09-24 18:18:50 -07:00
test_configuration.py fix(rust_bridge): let LITELLM_RUST win over litellm.rust() for optional tiers 2026-09-16 19:45:11 +00:00
test_dispatch.py feat(rust_bridge): read secrets through Python from Rust routes and declare Rust-only routes with NO_PYTHON (#43057) 2026-09-24 18:18:50 -07:00
test_failures.py refactor(rust_bridge): give chat completions, messages and responses the ocr dispatch shape 2026-09-16 15:02:12 -07:00
test_fork_guard.py test(rust): pin child interpreters to the parent's litellm and lint for it 2026-09-19 18:17:54 +00:00
test_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
test_logger.py feat(logger): dispatch Python logging through the Rust diagnostics processor (#42616) 2026-09-22 18:44:15 -07:00
test_runtime.py feat(rust_bridge): read secrets through Python from Rust routes and declare Rust-only routes with NO_PYTHON (#43057) 2026-09-24 18:18:50 -07:00
test_secret_manager.py feat(secrets): route secret resolution through native Rust backends (#42619) 2026-09-23 08:24:57 -07:00
test_settings.py feat(secrets): route secret resolution through native Rust backends (#42619) 2026-09-23 08:24:57 -07:00
test_token_counter.py chore(cost-map): remove models past their deprecation date (#42435) 2026-09-22 21:19:26 +00:00
test_tokenizer.py test(rust_bridge): drop route dispatch assertions, test the bridge directly (#42536) 2026-09-22 19:21:32 +00:00
test_verify_linux_native_wheel.py feat(tokenizer): preserve Python defaults with opt-in Rust dispatch (#42174) 2026-09-22 04:41:11 +00:00