Skip to main content

Auto Router [Add-on]

Auto Router chooses which model handles each request to your LiteLLM gateway. Your application calls one model name; the router selects from the models you configure based on the prompt or your routing rules. For example, you can send simple questions to a cheaper model and harder tasks to a stronger one.

Building routing into a Python application or agent? Use the Autorouter SDK.

Inference requestmodel: any-name-you-pickClassifierheuristic scorer, LLM,or keyword rulesSIMPLEsmallest, cheapest modelMEDIUMmid-size modelCOMPLEXfrontier modelREASONINGfrontier model, high effortResponseany model, any provider

You choose the models for each tier. For each request, the router picks a tier and a model from it.

Set up in the dashboard​

You need a LiteLLM gateway with models already configured and permission to add models. If you do not have a gateway yet, start with the gateway quickstart.

  1. Open Models + Endpoints, then the Auto Router tab, and add a router.
  2. Give it a name, such as smart-router. Click Configure automatically to fill the tiers from your deployed models, then review the selections.
  3. Use Test Routing with a prompt from your application. Check which tier and model it selects. This tests the routing decision without calling the selected model; an LLM classifier can still incur a charge.
  4. Click Add Auto Router to save it. In your application's requests to the gateway, use smart-router as the model.

The selected model generates the answer. Try a few of your application's tasks and compare the answers and cost with your current model before switching traffic.

For YAML, the API, or CLI setup, see Admin Setup. To use the router from Claude Code or Codex, follow User Setup.

To change how the router chooses models, see Customize your classifier. You can also connect a decision model, including Jev, Nimble, Laya, or Databricks ai_decide.

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

Configure and evaluate​

Release posts​

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