What is an LLM router?
Tyler J. CagleUpdated 10 min read
Key facts
- An LLM router sits between an application and several large language models and decides which model answers each request, usually to lower cost without losing quality or to keep requests flowing when a provider fails.
- There are five common kinds of LLM router: gateways, rule-based routers, learned or classifier routers, cascades and plan-aware routers, and many products combine two or more.
- RouteLLM's authors reported cost reductions of over 85% on MT Bench, 45% on MMLU and 35% on GSM8K against using only GPT-4, at 95% of GPT-4's performance (LMSYS, July 2024).
- Auto, the Mac app for all your coding agents, is a plan-aware router, and it is unrelated to LiteLLM's Auto Router, OpenRouter's Auto Router and Cursor's Auto.
An LLM router is software that sits between an application and several large language models and decides which model handles each request. Most routers aim to lower cost without losing answer quality, or to keep requests flowing when a provider fails. Auto, the Mac app for all your coding agents, is one kind of LLM router: it picks a model for each turn, after the person's own rules, and uses the AI subscriptions they already pay for first.
Several products with similar names, including LiteLLM's Auto Router, OpenRouter's Auto Router and Cursor's Auto, are made by other companies and are unrelated to Auto. Auto wrote this post. Claims about other products come from their own docs, linked where used and read on October 22, 2026.
What does an LLM router do?
An LLM router takes a request addressed to one model name, chooses which model or provider answers it, and returns the answer to the app. You call OpenRouter's Auto Router by sending openrouter/auto as the model, for example, and you deploy Microsoft Foundry's model router like any single model (October 22, 2026). The choice can rest on the prompt's text, how hard the task looks, price, availability, the user's rules or the user's subscriptions.
What kinds of LLM routers are there?
There are five common kinds: gateways, rule-based routers, learned or classifier routers, cascades and plan-aware routers. Many products combine two or more.
| Kind | How it picks | What it optimizes |
|---|---|---|
| Gateway | Sends a named model's request to one of several providers, by price, load or failures | Uptime and price per token |
| Rule-based | Fixed rules, such as a keyword, a mode or a context length | Predictable choices you control |
| Learned or classifier | A trained or heuristic classifier predicts which model will answer well enough | Cost at a target quality |
| Cascade | Tries a cheaper model, scores the answer, and moves up when the score is too low | Cost, with extra calls on hard requests |
| Plan-aware | Weighs which models your subscriptions already cover against per-token prices | Use of plans you already pay for |
Gateways usually keep the model you asked for and change where it runs. LiteLLM's Router adds retries, fallbacks and least-busy, latency-based or cost-based strategies, and OpenRouter favors providers without recent outages, then the lowest price (October 22, 2026). To see how each gateway differs from Auto, read Auto vs LiteLLM, Auto vs OpenRouter or Auto vs Vercel AI Gateway. If you are leaving a gateway, Portkey alternatives for coding agents, OpenRouter alternatives for coding agents, LiteLLM alternatives for gateways and coding agents and Claude Code Router alternatives list the other options and what each is best for. CLIProxyAPI alternatives compares a gateway that picks among signed-in accounts with the other options. Magpie alternatives for Codex and Claude Code covers the local gateway where you design the routing groups yourself, and ZenMux alternatives for Codex and Claude Code covers the hosted gateway with model insurance.
Rule-based routers follow rules someone wrote. Claude Code's opusplan setting uses Opus in plan mode and Sonnet for execution (October 22, 2026). Rules are easy to predict, and they cover only the cases someone wrote down. Auto takes rules written in plain English, such as "Use Claude Opus 5.5 for UI work", and How to write model routing rules in plain English has examples to copy.
Learned and classifier routers predict which model will answer well enough. RouteLLM (June 2024) trained routers on human preference data, and its authors reported cost reductions of over 85% on MT Bench, 45% on MMLU and 35% on GSM8K against using only GPT-4, at 95% of GPT-4's performance. Hybrid LLM (ICLR 2024) reported up to 40% fewer calls to the large model with no drop in response quality. Microsoft Foundry's model router and Amazon Bedrock intelligent prompt routing are products of this kind (October 22, 2026).
Cascades try a cheaper model first. FrugalGPT (May 2023) scores each answer and calls the next model only when the score falls below a threshold; its authors reported matching GPT-4 with up to 98% lower cost on their tasks. A hard request can pass through several models before it is answered. A cascade can also step up effort on one model. In its guide Which Claude model should you build with? (November 9, 2026), Anthropic reports that running Claude Opus 5.5 at low effort and re-running only the failures at high passed about 97% of a SWE-bench Pro subset at about $0.17 per task, against 95.3% at $0.29 per task with every task at high.
Plan-aware routers know which AI subscriptions you already pay for and which models each one covers, and weigh that coverage against per-token prices when they pick. Auto is one. In Codex, OpenAI models run on the ChatGPT plan; in Claude Code, Claude models run on the Claude plan; other models are paid per use. For the other ways to make those plans last, see How to cut Claude Code and Codex costs.
What are the trade-offs of using an LLM router?
Every LLM router accepts some risk to quality, latency or caching in exchange for lower cost or better uptime.
- Quality. A misjudged request goes to a model that can't do it well. Amazon says its routing may not suit specialized use cases and depends on its training data, and Microsoft's Balanced mode accepts any model within about 1% to 2% of the best one's quality for a prompt, then picks the cheapest (October 22, 2026). For coding, see does model routing make your results worse?. A router can also misjudge a request by reading text the person didn't type, and what text does a model router read in a Claude Code turn? covers the memory files and reminders Claude Code adds to each request.
- Latency. A classifier adds a step before each request, and a cascade can call several models in a row.
- Caching. Each model keeps its own prompt cache. Claude Code's docs say the request after a model switch gets no cache hits, and Anthropic bills a cache read at a tenth of the base input price or less (October 22, 2026), so frequent switching raises input cost.
- Context window. Microsoft says its router's effective context window is that of its smallest model unless you limit the pool (October 22, 2026).
- Cost. Savings depend on how much work a cheaper model can do, plus any router fee. OpenRouter's Auto Router adds no fee of its own (October 22, 2026); Auto bills paid models at the provider's price plus 10% and earns nothing on plans. A savings figure also depends on its baseline, and which effort level is a fair baseline for router savings? shows how a max-effort baseline inflates one.
Is Auto the same as LiteLLM's or OpenRouter's Auto Router?
No. Auto is a Mac app for all your coding agents, and the products below are built by other companies for other setups.
| Name | What it is | How you use it |
|---|---|---|
| Auto | Mac app that adds models from different providers to all your coding agents (Claude Code, Codex, Cursor, etc.) and picks one for each turn | Pick AutoRouter in the Codex model menu, or with /model in Claude Code |
| LiteLLM Auto Router | LiteLLM proxy feature, in beta, that sorts each request into a tier mapped to a model | auto_router/complexity_router in your LiteLLM config |
| OpenRouter Auto Router | API model ID that classifies the prompt's task type and ranks models by what OpenRouter users spend on it | Send openrouter/auto as the model |
| Cursor Auto | Auto option in Cursor's model picker; on Teams and Enterprise plans, Cursor Router classifies each agent request | Choose AutoRouter in Cursor |
For routers that work with Codex and Claude Code, see model routers for Claude Code and Codex, compared. For one product at a time, see how Auto compares with other gateways and routers. If you are weighing a learned router such as Not Diamond's API, Not Diamond alternatives for model routing compares it with OpenRouter's Auto Router, RouteLLM and the rest.
Where does Auto fit among LLM routers?
Auto is a plan-aware router that applies the person's rules first and makes every model clear a quality bar for the task before price counts. For each turn:
- If one of your rules applies, it decides the turn, for example "Use Claude Opus 5.5 for UI work."
- Otherwise AutoRouter works out how hard the turn is and only considers models that clear the quality bar for it.
- Hard work goes to the most capable model your plans cover, and to credits only when none is strong enough.
- Everything else goes to the model that costs you least, often your plan or a low-cost open model. Unclear work is never treated as a quick task.
In the landing page's illustrations, a change across six files goes to Claude Opus 5.5 on the Claude plan, and a commit message goes to a low-cost open model so the plan isn't touched. Every turn shows its model, what it cost and why, and choosing a specific model in the picker sends turns straight to it. Auto sometimes misjudges how hard a task is, and you can rate the pick when it does. It works with all your coding agents (Claude Code, Codex, Cursor, etc.) on macOS 14 or later, and it is in beta. More in how AutoRouter picks a model for each turn.
Questions
Is an LLM router the same as an LLM gateway?
A gateway is the proxy that forwards requests to providers, and a router is the logic that chooses the model; many gateways include one. LiteLLM's proxy offers both load balancing and Auto Routing, while Cursor's Auto is a router inside an app. Cursor Auto mode vs Copilot auto vs Auto compares the routers built into coding tools.
Does an LLM router lower answer quality?
It can, whenever it sends a request to a model that can't handle it. RouteLLM's savings were measured at 95% of GPT-4's benchmark performance (July 1, 2024). Unless one of your rules names a model, Auto makes every model clear a quality bar for the task before price counts, and it sends unclear work to a model that can do it well.
Does Auto publish benchmarks?
Not for its own routing yet. For an engineering team, Auto builds a free benchmark built from the team's own shipped work, then tunes routing, skills and prompts against it. How do you build an AI coding benchmark for your company? walks through building one yourself from merged pull requests, an open scorecard for benchmarking coding agents on your own codebase gives the files to record and score it in, how to test an AGENTS.md change before it reaches your team uses one to check a change to your agents' instructions, and grading coding agents: tests, rubrics or an LLM judge covers how to score the results. Ratings from people and tests of each new model as it becomes available retune its routing, and the Auto team reviews real routing decisions. How do you test a model router change before it ships? describes how the team checks a routing change before it ships. How Ramp, Cursor and Uber build AI coding benchmarks compares how three companies built theirs.
What does Auto cost?
Auto Free is $0 a month and routes across the AI subscriptions you already pay for. Pro includes usage each month and adds every other model; paid models are billed at the provider's price plus 10%.
Sources
- Auto
- Ong et al., RouteLLM: Learning to Route LLMs with Preference Data, arXiv, June 26, 2024, revised February 23, 2025
- LMSYS: RouteLLM, July 1, 2024
- Ding et al., Hybrid LLM: Cost-Efficient and Quality-Aware Query Routing, ICLR 2024, arXiv, April 22, 2024
- Chen, Zaharia and Zou, FrugalGPT: How to Use Large Language Models While Reducing Cost and Improving Performance, arXiv, May 9, 2023
- LiteLLM: Router, load balancing and fallbacks, read October 22, 2026
- LiteLLM: Auto Routing, read October 22, 2026
- LiteLLM: Auto Router with Claude Code and Claude Desktop, read October 22, 2026
- OpenRouter: Auto Router, read October 22, 2026
- OpenRouter: Provider selection, read October 22, 2026
- Cursor: Cursor Router, read October 22, 2026
- Microsoft Learn: Model router for Microsoft Foundry concepts, updated October 19, 2026, read October 22, 2026
- AWS: Understanding intelligent prompt routing in Amazon Bedrock, read October 22, 2026
- Claude Code: Model configuration, read October 22, 2026
- Claude Code: How Claude Code uses prompt caching, read October 22, 2026
- Anthropic: Prompt caching, read October 22, 2026
- Which Claude model should you build with?, Claude blog, Anthropic, November 9, 2026