litellm/docs/architecture/router
narmstrong-berry 624a80b59b
Some checks failed
LiteLLM Rust DB / db-queries (push) Has been cancelled
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
LiteLLM Rust / rust-wheel (push) Has been cancelled
Terraform Modules / fmt, validate, test (aws) (push) Has been cancelled
Terraform Modules / fmt, validate, test (gcp) (push) Has been cancelled
docs(router): concept-led architecture docs for the Rust router core
Diataxis-style docs under docs/architecture/router describing the router as the Rust core
litellm-router-core runs it on nate_router_step6_rust_core_v2: deployments and model groups,
name resolution, teams and access, the filter chain, strategies, routing groups and
sub-routers, retries, fallbacks and cooldowns, shared state, and the core and its host.

Claude-Session: https://claude.ai/code/session_013FDwtmdtKxVdjQX8WK43iK
2026-11-05 13:53:56 -08:00
..
explanation docs(router): concept-led architecture docs for the Rust router core 2026-11-05 13:53:56 -08:00
how-to docs(router): concept-led architecture docs for the Rust router core 2026-11-05 13:53:56 -08:00
img docs(router): concept-led architecture docs for the Rust router core 2026-11-05 13:53:56 -08:00
reference docs(router): concept-led architecture docs for the Rust router core 2026-11-05 13:53:56 -08:00
tutorial docs(router): concept-led architecture docs for the Rust router core 2026-11-05 13:53:56 -08:00
README.md docs(router): concept-led architecture docs for the Rust router core 2026-11-05 13:53:56 -08:00

Router

litellm.Router decides which deployment serves a request, makes the call, and handles what happens when the call fails. It retries in the same model group, falls back to other model groups, and puts failing deployments into cooldown so that later requests avoid them. The proxy builds one Router from its config and sends every model request through it. SDK users can build their own.

A caller calls litellm.Router, which picks a deployment, calls the provider,
and keeps cooldowns, usage and fail counts in the routing
cache

Concepts

Start with Router concepts, which names the ideas and shows how they fit together. Each idea then has its own page.

Two pages cover how the router is built.

Tutorial

New to the router? Work through Route your first requests. It builds a Router with mock deployments, so it needs no API keys. It shows load balancing, retries, cooldowns and fallbacks in about fifteen minutes.

How-to guides

Reference

Status

These pages describe the branch nate_router_step6_rust_core_v2 (#49513).