Skip to main content

Auto Router [Add-on]

🚀 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-click setup. Configure automatically checks the models your proxy already serves and fills all four tiers for you; no template to pick.
  • 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.
  • Classifier choices. Heuristics, an LLM, JEV through TypeSafe System One Choice, keyword rules, or a custom plugin
  • 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, mid-task stall escalation, and optional session pinning.

Results​

ResultMeasured onRead more
JEV: 5.43x as fast as Haiku by median classification latency and 96.12% lower registry-priced classifier cost80 authored synthetic cases, three paired repeats, 95.00% vs 73.75% match with authored expected tiers under one fixed rubricJEV comparison
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, enter a name, then click Configure automatically or pick a template. Review the tiers, Test Routing, and 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​

Use the OSS Classifier with hosted Jev, self-hosted Nimble and Laya, or the Databricks ai_decide AI Function. The OSS classifier guide covers setup, required gateway and dashboard builds, and migration from the existing Jev configuration. See the classifier reference for context, fallback and accounting.

Release posts​

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