litellm/tests/unit/rust_bridge
Yujong Lee da2ee722de feat(rust): one Decline from a route's plan to the SDK fallback and the gateway 501
A request the Rust path cannot serve is now one value, Decline { code, detail },
instead of a reason string, a status mapping and per-crate enums. It is legal
only before the first effect another implementation would repeat, comes only
from construction or from a route's plan, and bubbles up unchanged to the edge
that dispatched the work.

- core-utils: Decline carries a stable dotted code, checked at compile time for
  const declines, and a detail for the log
- llms, inference: the error types lose their Declined variant. Chat, Responses
  and Messages split into a pure plan returning Unplanned and an execute that
  takes the plan, so a late decline does not compile
- router-core: the can_select and supports probes become plan_select and
  plan_invoke, which return the host's own Decline. validate reports every one
- gateway-inference: one route table, and admission that matches the route,
  reads the body up to the cap and calls the route's plan. Handlers take the
  plan and read no body. A decline is a 501 naming its code
- python-bridge, rust_bridge: RustBridgeDeclined carries (code, detail),
  decode_request runs the route's plan, and RustDeclined mirrors it
2026-11-16 22:36:42 +09:00
..
host refactor(auth): decide route rules in Rust (#51531) 2026-11-16 18:55:32 +09: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
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 invoke messages on rust only (#51330) 2026-11-15 16:58:31 -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 refactor(rust_bridge): route every Rust-to-Python call through host modules (#50822) 2026-11-11 01:57:54 +00: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(rust): one Decline from a route's plan to the SDK fallback and the gateway 501 2026-11-16 22:36:42 +09: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