litellm/tests/unit/rust_bridge/host
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
..
routes fix(anthropic): forward diagnostics on /v1/messages (#52969) 2026-11-20 21:57:17 -08:00
__init__.py refactor(rust_bridge): route Python state reads through host modules (#45689) 2026-10-11 14:10:16 -07:00
test_cache.py feat(messages): serve azure ai foundry messages on rust only (#51721) 2026-11-14 13:40:38 -08:00
test_callbacks_legacy_python.py fix(streaming): report upstream failures after client disconnect (#52450) 2026-11-18 05:31:18 +00:00
test_model_capabilities.py feat(messages): serve bedrock invoke messages on rust only (#51330) 2026-11-15 16:58:31 -08:00
test_model_cost.py fix(cost): keep a deployment's per-second video price over the catalog row's flat price (#51688) 2026-11-15 12:04:41 -08:00
test_preflight.py chore: move workspace packages under litellm (#51000) 2026-11-12 04:19:57 +00:00
test_redis_credentials.py feat(redis): extend the native Redis foundation for the store families (#50169) 2026-11-06 12:30:07 +09:00
test_redis_events.py refactor(router): count the whole router_usage family on the native store (#50862) 2026-11-13 03:22:28 +00:00
test_route_groups.py refactor(auth): decide route rules in Rust (#51531) 2026-11-16 18:55:32 +09:00
test_secret_manager.py refactor(rust_bridge): route every Rust-to-Python call through host modules (#50822) 2026-11-11 01:57:54 +00:00
test_settings.py feat(bedrock): derive STS session tags and session name from caller identity (#52978) 2026-11-19 17:11:09 -08:00