Skip to main content

Auto Router

🚀 Help shape the Auto-Router

Get early access, work directly with the LiteLLM team, and influence the roadmap with your production traffic.

Apply to Become a Design Partner

Already testing it? Share your results in discussion #32168.

Inference requestmodel: any-name-you-pickClassifierheuristic scorer, LLM,or keyword rulesSIMPLEsmallest, cheapest modelMEDIUMmid-size modelCOMPLEXfrontier modelREASONINGfrontier model, high effortResponseany model, any provider
  • One model name in your clients. The gateway classifies each request and picks the model.
  • Any model, any provider, per tier. A single model, a random pool, or a Thompson-sampled pool.
  • Three classifiers. Sub-millisecond heuristic scorer, a small LLM, or keyword rules.
  • Savings reported per request. Against an all-frontier baseline, in the logs and in Cost Optimization.
  • Agent-safe. Prompt caching, context-window escalation, modality routing, and optional session pinning.

Results​

ResultMeasured onRead more
Claude Opus-5 solve rate at 27% lower cost21-task subset of Terminal-Bench 2.0, 16/21 solved by bothTerminal-Bench
Heuristic v2: 27% more tasks solved at 45% lower cost per task than v1Same 21-task subset, no LLM classifier callHeuristic v2
74.5% cheaper at 87.3% of frontier qualityRouterArena, 8,399 graded queriesCost and quality
51.1% saved, $12,249 over four months272,876 production requests, 450+ usersProduction case study
37% to 69% cheaper than caching aloneFive datasets including live gateway trafficPrompt caching
Matched or beat the current model on 88.1% of responsesShadow evaluation on live traffic, 143 judged turnsShadow evaluations

Quick start​

  • Dashboard: Models + Endpoints, Add Model, Auto Router tab, pick a template, Test Routing, save.
  • Agent: tell it run curl -fsSL https://docs.litellm.ai/skills/auto-router and follow the instructions.
  • config.yaml: one router entry whose tiers name other models in the same file.
config.yaml
model_list:
- model_name: claude-haiku-4-5
litellm_params:
model: anthropic/claude-haiku-4-5
api_key: os.environ/ANTHROPIC_API_KEY
- model_name: claude-sonnet-5
litellm_params:
model: anthropic/claude-sonnet-5
api_key: os.environ/ANTHROPIC_API_KEY
- model_name: claude-opus-5
litellm_params:
model: anthropic/claude-opus-5
api_key: os.environ/ANTHROPIC_API_KEY

- model_name: smart-router
litellm_params:
model: auto_router/complexity_router
complexity_router_config:
tiers:
SIMPLE: claude-haiku-4-5
MEDIUM: claude-sonnet-5
COMPLEX: claude-opus-5
REASONING: claude-opus-5
classifier_type: heuristic
complexity_router_default_model: claude-sonnet-5
curl -X POST http://localhost:4000/v1/chat/completions \
-H "Authorization: Bearer $LITELLM_API_KEY" \
-d '{"model": "smart-router", "messages": [{"role": "user", "content": "What is 2+2?"}]}'

Explore​

Release posts​

🚅
LiteLLM Enterprise
SSO/SAML, audit logs, spend tracking, multi-team management, and guardrails — built for production.
Learn more →