litellm/litellm-rust/crates
narmstrong-berry 4a57012560 feat(router): add the Rust router core with the host as its only boundary
Adds the litellm-router-core crate, its step-driven PyO3 bridge
(RouterCoreHandle / RouterCall) and RustCore, served behind LITELLM_RUST
through the ROUTER route rule. The host call-out is the only boundary:
every attempt goes through Host::invoke, there is no native executor path,
and RustCore never builds, wraps or forwards to PythonCore, so
router_python_core.py stays deletable. Attempt preparation lives in
litellm/router_attempt.py so it outlives router_python_core.py.

RustCore matches PythonCore's behavior, including its known bugs (fixed in
follow-up PRs). Routing decisions (strategy picks, routing groups, PTU,
pre-routing, pre-call checks, fallback walk, health routing, access groups,
weights, cooldowns, allowed fails, usage) live in the crate; work that needs
live Python objects (request shaping, endpoints, streaming, model info
facts, callbacks, alerting, prompt management) lives in host-side
litellm/router_rust_*.py modules driven by Rust steps.

The crate owns the registry. It runs the deployment build loop (secret
references, ids, organization fan-out, install order) and asks the host
for what needs Python, one deployment at a time so errors surface where
Python raised them: secrets, validate, provider and added steps. It holds
the model list, the index maps and the pattern routers with the Python
core's history rules (host_index.rs), and answers the registry lookups
(lookup.rs). The Python views of that state (model_list, index(), names(),
patterns()) read the handle, and every write to them becomes a changeset.
Model info, deployment model info, configured limits and model group info
are merged in the crate (model_info.rs, group_info.rs) from catalog rows
and facts the host answers on a model_info step asked at query time, so
price reloads and register_model stay visible. The usage cache key format
is defined once, in the crate.

tests/unit/test_router/core characterizes PythonCore's public behavior and
runs every test on both cores; the remaining Rust differences (the router's
own outcome callbacks) are listed in rust_parity_pending.txt.
2026-11-02 13:52:38 -08:00
..
auth refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
auth-aws refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
auth-azure refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
auth-gcp refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
auth-types refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
cache refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
cache-azure-blob refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
cache-disk refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
cache-gcs refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
cache-memory refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
cache-qdrant-semantic refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
cache-redis refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
cache-redis-semantic refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
cache-response refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
cache-s3 refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
cache-testing refactor(rust): align the cache crates with Python and wire every native backend (#42530) 2026-09-22 13:13:02 -07:00
cache-valkey-semantic refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
callbacks-legacy-python refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
circuit-breaker feat(rust): add circuit-breaker crate and guard redis-client with it (#48277) 2026-10-26 18:41:47 -07:00
config refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
core-utils fix(anthropic): map pause_turn and return refusal explanations on chat and responses (#49192) 2026-10-31 02:53:59 -07:00
coroutine refactor(rust-bridge): return an unstarted Execution from native entrypoints and drive it in Python (#46299) 2026-10-14 17:50:44 -07:00
cost docs(model-catalog): explain meter, band, channel and When (#49447) 2026-10-31 16:09:29 +00:00
db feat(db): add typed daily end-user spend upsert (#48237) 2026-10-26 17:05:08 -07:00
db-testing feat(rust): add redis-client crate for standalone Redis (#48269) 2026-10-26 18:41:46 -07:00
error refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
framer refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
gateway refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
gateway-auth refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
gateway-inference refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
gateway-management refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
gateway-mcp refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
gateway-ui refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
host refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
host-http refactor(rust): centralize host execution and compose callbacks (#43515) 2026-09-28 19:20:27 +00:00
host-native feat(rust): one typed decline from core up to each host (#47772) 2026-10-28 09:22:11 -07:00
host-python feat(rust): one typed decline from core up to each host (#47772) 2026-10-28 09:22:11 -07:00
http refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
inference feat(rust): one typed decline from core up to each host (#47772) 2026-10-28 09:22:11 -07:00
inference-chat refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
inference-messages refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
inference-ocr refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
inference-responses refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
inference-testing refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
inference-transcription feat(rust): one typed decline from core up to each host (#47772) 2026-10-28 09:22:11 -07:00
litellm refactor(rust): expand logging and test coverage across gateway and Anthropic messages (#43295) 2026-09-26 08:04:19 +00:00
llms refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
llms-types fix(vertex_ai,azure_ai)!: auto-add the compaction, thinking display, and tool change betas on Claude routes (#44747) 2026-10-30 09:28:19 -07:00
model-catalog docs(model-catalog): explain meter, band, channel and When (#49447) 2026-10-31 16:09:29 +00:00
model-catalog-refresh refactor(model-catalog): parse, lower and validate the catalog into typed prices (#48853) 2026-10-28 18:24:40 -07:00
python-bridge feat(router): add the Rust router core with the host as its only boundary 2026-11-02 13:52:38 -08:00
python-compat refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
redis-client refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
redis-testing feat(gateway): connect to Redis from config.yaml (#48284) 2026-10-26 18:41:47 -07:00
router fix(vertex_ai)!: send the caller's anthropic-version in the Vertex Claude /v1/messages body, not the header (#48814) 2026-10-28 18:06:58 -07:00
router-core feat(router): add the Rust router core with the host as its only boundary 2026-11-02 13:52:38 -08:00
router-types refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
secret-value refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
secrets refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
secrets-aws refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
secrets-azure refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
secrets-cyberark refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
secrets-google refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
secrets-hashicorp refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
secrets-types refactor(rust): extract SecretValue and use it for Redis credentials (#49186) 2026-10-30 11:31:04 -07:00
spend-clickhouse refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
storage-clickhouse refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
testkit refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
token-counter refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
token-counter-fast refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
token-counter-huggingface refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
token-counter-tiktoken refactor(rust): adopt one error discipline across litellm-rust with source chains and Report (#48042) 2026-10-28 09:22:11 -07:00
tracing feat(rust): add structured route lifecycle tracing (#43466) 2026-09-27 19:18:58 -07:00