litellm/litellm-rust
Claude 2164e5932d
feat(router): add the Rust routing engine to litellm-router
Engine::route runs the loop Python's router runs for the first increment: resolve the
model, drop cooling deployments, pick with simple-shuffle, retry within the group under
should_retry_this_error or a retry policy, back off, fall back through generic,
context-window and content-policy chains, cool deployments down and count usage.

Every attempt is an invoke on a RouterHost, which keeps responses and exceptions opaque and
answers with a Classified record of the error. Metadata and exception writes come back as
ordered ops so the host can apply them where Python's readers look. State lives in a Store
that writes the keys, Python str() encodings and TTLs Python writes, in memory and Redis,
and PythonRandom reproduces CPython's Mersenne Twister so seeded runs pick identically.

The gateway's Router/Deployment lookup is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Aw1xktpUnix5tWhvSzey8t
2026-10-07 01:03:01 +00:00
..
.agents/skills refactor(rust): derive string enum serde through strum and serde_with (#44675) 2026-10-05 15:34:34 -07:00
crates feat(router): add the Rust routing engine to litellm-router 2026-10-07 01:03:01 +00:00
.gitignore feat: add LiteLLM Rust workspace with Mistral OCR bridge (#31033) 2026-06-23 13:16:47 -07:00
AGENTS.md refactor(rust): derive string enum serde through strum and serde_with (#44675) 2026-10-05 15:34:34 -07:00
Cargo.lock feat(router): add the Rust routing engine to litellm-router 2026-10-07 01:03:01 +00:00
Cargo.toml refactor(rust): extract inference-testing crate (#44873) 2026-10-06 16:33:06 +00:00
clippy.toml feat(rust): add the MCP gateway (#43470) 2026-09-27 19:37:41 -07:00