litellm/tests/unit/rust_bridge
ryan-crabbe-berri c47d5b8044
fix(anthropic): forward diagnostics on /v1/messages (#52969)
* test(anthropic): cover diagnostics on /v1/messages per provider

* fix(anthropic): forward diagnostics on /v1/messages

The native /v1/messages path rebuilt the request from a fixed field list that
did not include diagnostics, so Anthropic never saw it and returned null in place
of the cache miss reason. Forward it to every provider, and for Vertex and
Bedrock, which reject the field, fail with a 400 that names drop_params unless
the caller drops it.

* test(messages): cover diagnostics on the Rust /v1/messages path

* fix(messages): carry diagnostics through the Rust /v1/messages path

Anthropic, Azure, Vertex and Bedrock /v1/messages calls run on the Rust core,
which builds the body from the typed fields of the Messages request. Give
diagnostics a typed field so it reaches the provider, and refuse or drop it in
the bridge host for Vertex and Bedrock the same way the Python handler does.

* test(anthropic): cover diagnostics forwarding with drop_params off

* refactor(anthropic): split the diagnostics gate condition under the boolean-term limit

* test(anthropic): prove the diagnostics drop on Vertex, since Bedrock Invoke now runs only on Rust

* fix(proxy): refuse a diagnostics comparison against another key's message with 403

* test(proxy): assert diagnostics refusals outside the except block
2026-11-20 21:57:17 -08:00
..
host fix(anthropic): forward diagnostics on /v1/messages (#52969) 2026-11-20 21:57:17 -08:00
messages feat(messages): serve bedrock invoke messages on rust only (#51330) 2026-11-15 16:58:31 -08:00
ocr refactor(rust-bridge): require the native extension (#48852) 2026-10-28 13:16:56 -07:00
trace refactor(lens): connect LiteLLM to the independent Lens service (#45529) 2026-10-09 16:17:05 -07:00
__init__.py test: migrate phase 15 legacy tests to tests/unit 2026-09-20 11:55:43 +00:00
AGENTS.md refactor(rust-bridge): decide native routing in the catalog, drop the bypass predicates (#46750) 2026-10-20 15:06:24 -07:00
native_route_wheel_test.py fix(bedrock): omit system prompt from audio transcription and report its token usage (#41565) 2026-10-28 19:23:15 -07:00
stubtest.ini test: move tests/test_litellm core utils, routing, responses, caching and rust_bridge into tests/unit (#43199) 2026-09-25 17:10:13 -07:00
test_bindings.py refactor(rust-bridge): require the native extension (#48852) 2026-10-28 13:16:56 -07:00
test_catalog.py feat(messages): serve bedrock claude_platform messages on rust only (#52681) 2026-11-19 14:34:02 -08:00
test_clickhouse.py refactor(lens): connect LiteLLM to the independent Lens service (#45529) 2026-10-09 16:17:05 -07:00
test_configuration.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
test_detectors.py feat(messages): serve anthropic messages on rust only (#51119) 2026-11-12 00:07:20 +00:00
test_execution.py refactor(rust-bridge): return an unstarted Execution from native entrypoints and drive it in Python (#46299) 2026-10-14 17:50:44 -07:00
test_failures.py test: move tests/test_litellm core utils, routing, responses, caching and rust_bridge into tests/unit (#43199) 2026-09-25 17:10:13 -07:00
test_fork_guard.py refactor(rust-bridge): require the native extension (#48852) 2026-10-28 13:16:56 -07:00
test_logger.py feat(callbacks-parallel-request-limiter): port parallel request limiter v3 to a rust callback (#51537) 2026-11-16 22:56:38 -08:00
test_public_call.py fix(rust): run native async calls through python's async wrapper steps (#50423) 2026-11-10 00:24:20 +00:00
test_runtime.py feat(messages): serve anthropic messages on rust only (#51119) 2026-11-12 00:07:20 +00:00
test_token_counter.py fix(proxy): count the request's tool_choice on the token count routes (#51133) 2026-11-14 07:53:27 -05:00
test_tokenizer.py refactor(sdk): separate core AWS and tokenizer dependencies (#44447) 2026-10-08 19:07:57 -07:00
test_verify_linux_native_wheel.py chore: move scripts and runtime sources under litellm (#51006) 2026-11-12 04:19:57 +00:00