# What is an LLM router?

> An LLM router is software that sits between an application and several large language models and decides which model handles each request, usually to lower cost or keep requests flowing without giving up quality. Routers range from gateways that pick a provider by price and uptime to rule sets, learned classifiers, cascades and plan-aware routers. Auto, the Mac app for all your coding agents, is a plan-aware router and is unrelated to LiteLLM's Auto Router or OpenRouter's Auto Router.

Author: Tyler J. Cagle (https://x.com/tjcages)
Published: 2026-09-24T15:20:00.000Z
Updated: 2026-11-09T23:00:00.000Z
Reading time: 10 min
Canonical: https://auto.sh/blog/what-is-an-llm-router
Publisher: Auto (https://auto.sh)

## 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](https://lmsys.org/blog/2024-07-01-routellm/)).
- 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.

![Five kinds of LLM router, and how each picks. Gateway: 1. Request names a model; 2. Pick a provider (By price, load or failures). Rule-based: 1. Match a fixed rule; 2. Use that rule's model. Learned or classifier: 1. Classify the request; 2. Predict a good model. Cascade: 1. Try a cheaper model; 2. Score the answer; 3. Move up if weak. Plan-aware: 1. Check your plans; 2. Weigh against prices. Source: router docs and papers, read October 22, 2026.](https://auto.sh/blog/images/what-is-an-llm-router/1-five-kinds.png)

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](https://autorouter.com/), 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](https://openrouter.ai/docs/guides/routing/routers/auto-router) by sending `openrouter/auto` as the model, for example, and you deploy [Microsoft Foundry's model router](https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/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](https://docs.litellm.ai/docs/routing) adds retries, fallbacks and least-busy, latency-based or cost-based strategies, and [OpenRouter](https://openrouter.ai/docs/guides/routing/provider-selection) favors providers without recent outages, then the lowest price (October 22, 2026). To see how each gateway differs from Auto, read [Auto vs LiteLLM](/compare/litellm), [Auto vs OpenRouter](/compare/openrouter) or [Auto vs Vercel AI Gateway](/compare/vercel-ai-gateway). If you are leaving a gateway, [Portkey alternatives for coding agents](/blog/portkey-alternatives-coding-agents), [OpenRouter alternatives for coding agents](/blog/openrouter-alternatives), [LiteLLM alternatives for gateways and coding agents](/blog/litellm-alternatives) and [Claude Code Router alternatives](/blog/claude-code-router-alternatives) list the other options and what each is best for. [CLIProxyAPI alternatives](/blog/cliproxyapi-alternatives) compares a gateway that picks among signed-in accounts with the other options. [Magpie alternatives for Codex and Claude Code](/blog/magpie-alternatives) covers the local gateway where you design the routing groups yourself, and [ZenMux alternatives for Codex and Claude Code](/blog/zenmux-alternatives) covers the hosted gateway with model insurance.

**Rule-based routers** follow rules someone wrote. Claude Code's [`opusplan` setting](https://code.claude.com/docs/en/model-config) 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](/blog/plain-english-routing-rules) has examples to copy.

**Learned and classifier routers** predict which model will answer well enough. [RouteLLM](https://arxiv.org/abs/2406.18665) (June 2024) trained routers on human preference data, and its authors [reported](https://lmsys.org/blog/2024-07-01-routellm/) 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](https://arxiv.org/abs/2404.14618) (ICLR 2024) reported up to 40% fewer calls to the large model with no drop in response quality. [Microsoft Foundry's model router](https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/model-router) and [Amazon Bedrock intelligent prompt routing](https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-routing.html) are products of this kind (October 22, 2026).

![RouteLLM cut cost 35% to 85% at 95% quality. MT Bench (Over 85%), 85%; MMLU, 45%; GSM8K, 35%. Source: RouteLLM's authors (LMSYS), July 2024; cost cut against GPT-4 alone, at 95% of GPT-4's performance.](https://auto.sh/blog/images/what-is-an-llm-router/2-routellm.png)

**Cascades** try a cheaper model first. [FrugalGPT](https://arxiv.org/abs/2305.05176) (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?](https://claude.dev/blog/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](/blog/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](https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-routing.html) says its routing may not suit specialized use cases and depends on its training data, and [Microsoft's](https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/model-router) 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?](/blog/does-model-routing-hurt-quality). 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?](/blog/what-text-a-router-reads-in-claude-code) covers the memory files and reminders Claude Code adds to each request.
- **Latency.** A classifier adds a step before each request, and a [cascade](https://arxiv.org/abs/2305.05176) can call several models in a row.
- **Caching.** Each model keeps its own prompt cache. [Claude Code's docs](https://code.claude.com/docs/en/prompt-caching) say the request after a model switch gets no cache hits, and [Anthropic](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) 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](https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/model-router) 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](https://openrouter.ai/docs/guides/routing/routers/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?](/blog/router-savings-effort-baseline) 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](https://autorouter.com/)                                                         | 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](https://docs.litellm.ai/docs/tutorials/claude_code_autorouter)    | 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](https://openrouter.ai/docs/guides/routing/routers/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](https://cursor.com/docs/cursor-router)                                    | 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](/blog/model-routers-claude-code-codex). For one product at a time, see [how Auto compares with other gateways and routers](/comparisons). If you are weighing a learned router such as Not Diamond's API, [Not Diamond alternatives for model routing](/blog/not-diamond-alternatives) 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:

1. If one of your rules applies, it decides the turn, for example "Use Claude Opus 5.5 for UI work."
2. Otherwise AutoRouter works out how hard the turn is and only considers models that clear the quality bar for it.
3. Hard work goes to the most capable model your plans cover, and to credits only when none is strong enough.
4. 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](/blog/how-autorouter-picks-a-model).

## 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](https://docs.litellm.ai/docs/routing) and [Auto Routing](https://docs.litellm.ai/docs/proxy/auto_routing), while [Cursor's Auto](https://cursor.com/docs/cursor-router) is a router inside an app. [Cursor Auto mode vs Copilot auto vs Auto](/blog/auto-mode-vs-autorouter) 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](https://lmsys.org/blog/2024-07-01-routellm/) 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?](/blog/build-an-ai-coding-benchmark) walks through building one yourself from merged pull requests, [an open scorecard for benchmarking coding agents on your own codebase](/blog/coding-agent-benchmark-scorecard) gives the files to record and score it in, [how to test an AGENTS.md change before it reaches your team](/blog/test-agents-md-changes) uses one to check a change to your agents' instructions, and [grading coding agents: tests, rubrics or an LLM judge](/blog/grading-coding-agents) 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?](/blog/how-to-test-a-routing-change) describes how the team checks a routing change before it ships. [How Ramp, Cursor and Uber build AI coding benchmarks](/blog/private-benchmarks-ramp-cursor-uber) 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](/pricing) includes usage each month and adds every other model; paid models are billed at the provider's price plus 10%.

## Sources

- [Auto](https://autorouter.com/)
- [Ong et al., RouteLLM: Learning to Route LLMs with Preference Data](https://arxiv.org/abs/2406.18665), arXiv, June 26, 2024, revised February 23, 2025
- [LMSYS: RouteLLM](https://lmsys.org/blog/2024-07-01-routellm/), July 1, 2024
- [Ding et al., Hybrid LLM: Cost-Efficient and Quality-Aware Query Routing](https://arxiv.org/abs/2404.14618), ICLR 2024, arXiv, April 22, 2024
- [Chen, Zaharia and Zou, FrugalGPT: How to Use Large Language Models While Reducing Cost and Improving Performance](https://arxiv.org/abs/2305.05176), arXiv, May 9, 2023
- [LiteLLM: Router, load balancing and fallbacks](https://docs.litellm.ai/docs/routing), read October 22, 2026
- [LiteLLM: Auto Routing](https://docs.litellm.ai/docs/proxy/auto_routing), read October 22, 2026
- [LiteLLM: Auto Router with Claude Code and Claude Desktop](https://docs.litellm.ai/docs/tutorials/claude_code_autorouter), read October 22, 2026
- [OpenRouter: Auto Router](https://openrouter.ai/docs/guides/routing/routers/auto-router), read October 22, 2026
- [OpenRouter: Provider selection](https://openrouter.ai/docs/guides/routing/provider-selection), read October 22, 2026
- [Cursor: Cursor Router](https://cursor.com/docs/cursor-router), read October 22, 2026
- [Microsoft Learn: Model router for Microsoft Foundry concepts](https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/model-router), updated October 19, 2026, read October 22, 2026
- [AWS: Understanding intelligent prompt routing in Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-routing.html), read October 22, 2026
- [Claude Code: Model configuration](https://code.claude.com/docs/en/model-config), read October 22, 2026
- [Claude Code: How Claude Code uses prompt caching](https://code.claude.com/docs/en/prompt-caching), read October 22, 2026
- [Anthropic: Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching), read October 22, 2026
- [Which Claude model should you build with?](https://claude.dev/blog/which-claude-model-should-you-build-with/), Claude blog, Anthropic, November 9, 2026

## Read next

- [How to write model routing rules in plain English](https://auto.sh/blog/plain-english-routing-rules.md): Auto, the Mac app for all your coding agents, lets you write routing rules in plain English, such as "Use Claude Opus 5.5 for UI work." When one of your rules applies, it decides the turn, and your rules come before Auto's recommended ones. Choosing a specific model in the picker sends turns straight to that model instead.
- [An open scorecard for benchmarking coding agents on your own codebase](https://auto.sh/blog/coding-agent-benchmark-scorecard.md): Auto's open scorecard is a free template for benchmarking coding agents and models on your own codebase: a YAML task spec with a JSON Schema, a CSV run log, a CSV summary and a validation checklist. Fill it from your merged pull requests, run every task at least three times per setup, and compare pass rate with a 95% Wilson interval, cost per solved task, median time and flakiness. Auto, the Mac app for all your coding agents, also builds a free company benchmark for teams that want help.
- [Grading coding agents: tests, rubrics or an LLM judge](https://auto.sh/blog/grading-coding-agents.md): Grade a coding agent with tests whenever the task has them, with a rubric written in advance when a reviewer has to judge the result, and with an LLM judge only when there are too many results to review, given that rubric and checked against people. Auto, the Mac app for all your coding agents, grades its free company benchmark against a team's own tests or a rubric written with the team.

Tags: [Model routing](https://auto.sh/blog/tags/model-routing.md), [Auto](https://auto.sh/blog/tags/autorouter.md), [Guides](https://auto.sh/blog/tags/guides.md)

Drafted with AI from the sources linked above, then checked and edited by the Auto team.

Auto is a Mac app for AI model routing in Codex, Claude Code, Cursor and other supported coding agents. It uses eligible connected subscriptions first. See [setup](https://auto.sh/setup.md) and [pricing](https://auto.sh/pricing).
