# Model router (LLM routing)

> Canonical: https://skillalmanac.com/glossary/model-router | Last verified: 2026-11-24 | Index status: not offered to search engines

A model router is a component that receives each request to a language model and decides which model should answer it, usually trading answer quality against cost or speed. The caller sends one request and the router picks the model.

Also called: LLM router, model routing, LLM routing, AI model router, router model.

## In plain language

A model router is a dispatcher in front of several AI models. Some questions are easy and a small, cheap model can answer them. Others need a larger, more expensive one. The router looks at each request and sends it to a suitable model, so you do not pay for the biggest model every time. The risk is a wrong choice: a request sent to a model that is too weak may get a poorer answer, and the router itself adds a step, which can add cost. Teams usually test a router on their own prompts before relying on it.

## Technical definition

Routers choose among models per request at inference time. The RouteLLM paper (arXiv 2406.18665) trains router models on human preference data to pick between a stronger, costlier model and a weaker, cheaper one. Microsoft's Foundry model router documentation, dated 2026-11-18, describes a trained routing model that judges how demanding a request is, with Balanced, Quality and Cost modes, and a response field naming the model that answered. OpenRouter's Auto Router page says each request is billed at the price of the model it is routed to; it does not describe how the choice is made.

## How it shows up when you use agents

An agent loop makes many model calls: a quick classification, a file edit, a plan, a hard refactor. Without routing, all of them go to one model. With routing, a cheaper model can take the easy steps and a stronger one the hard steps. Microsoft's documentation describes this use for agents and coding tools, and says each step can get a different model.

You may meet a router as a model name you call, as a gateway in front of several providers, or as a manual habit: in Claude Code the `/model` command switches the model by hand. The [inference cost](/glossary/inference-cost) of a session depends on which model handles which step, and [AI pricing models](/glossary/ai-pricing-model) differ by provider.

What breaks when routing is misunderstood:

- A router is a learned or rule-based guess. A hard request can be judged easy.
- Different models behave differently, so tool calls and output style can change between steps of one task.
- The router can add its own fee or latency. The Microsoft page lists a separate routing fee; check the vendor's pricing page.
- A router limits the models you can pick. The same page notes the effective context window is the smallest among the pool.

Next action: run a sample of your real prompts through the router and through your current model, and compare quality and cost before moving production traffic.

## Common confusions

- **Model router versus mixture of experts.** A router in the sense used here picks between separate models. A mixture-of-experts model routes tokens inside one model. See [Mixture of experts](/glossary/mixture-of-experts).
- **Model router versus LLM gateway.** A gateway is a proxy handling keys, logging and limits. It may include routing, but it need not.
- **Router versus fallback.** Failover tries another model after an error. Routing chooses before the call. Some products do both.
- **Myth: routing saves money automatically.** Savings depend on your traffic and prices. The RouteLLM abstract reports cost cuts on benchmarks, not on your workload.

## Worked examples in this catalogue

### [llm-cost-estimator](https://skillalmanac.com/skills/skill-almanac/llm-cost-estimator)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: Turns a usage profile and your own price table into a monthly LLM cost range with cache, batch and subscription effects.

Why it exercises the concept: Routing is mostly a cost decision. An estimate shows how much of your spend a cheaper-model path could affect, using your own prices.

### [agent-session-cost-review](https://skillalmanac.com/skills/skill-almanac/agent-session-cost-review)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: Finds where a coding-agent session spent its tokens, by parsing the saved session transcript.

Why it exercises the concept: Before routing steps to different models, you need to know which steps consume the tokens.

### [Claude Code Pricing: What Drives Cost and Plan Options](https://skillalmanac.com/learn/claude-code-pricing-explained)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: An explanation of how Claude Code is priced and what drives usage.

Why it exercises the concept: It shows why choosing a model per task matters in a coding tool.

### [Claude Code](https://skillalmanac.com/tools/claude-code)

```
/model
```

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: Claude Code switches the model used for the session, by hand.

Why it exercises the concept: Switching models yourself is manual routing. A model router automates the same decision per request.

## Related terms

- [Large language model (LLM)](https://skillalmanac.com/glossary/large-language-model.md)
- [Inference cost](https://skillalmanac.com/glossary/inference-cost.md)
- [AI pricing model](https://skillalmanac.com/glossary/ai-pricing-model.md)
- [Inference](https://skillalmanac.com/glossary/inference.md)
- [AI agent](https://skillalmanac.com/glossary/ai-agent.md)
- [Tool calling (function calling)](https://skillalmanac.com/glossary/tool-calling.md)

## Sources

- [What is model router in Microsoft Foundry?](https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/model-router), Microsoft Learn (accessed 2026-11-24)
- [RouteLLM: Learning to Route LLMs with Preference Data](https://arxiv.org/abs/2406.18665), arXiv (accessed 2026-11-24)
- [Auto Router](https://openrouter.ai/openrouter/auto), OpenRouter (accessed 2026-11-24)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-24. [Glossary index](https://skillalmanac.com/glossary.md).
