Skip to content
Glossary · LLM costs

Model routing

Also called LLM routing, model cascade.

Definition

Sending each AI request to the model best suited to it, instead of using one model for everything.

Last updated

What it is.

A router looks at a request and picks a model. The rule can be simple, such as task type or user plan, or it can be a small classifier. A common pattern is a cascade: try a smaller, cheaper model first and escalate to a larger one only when the answer fails a check.

Routing can also be about providers, not just model size: sending traffic to a backup when one provider is down, or to a provider in a specific region for data rules.

Why it matters

Many requests in a product are easy and do not need the most capable model. Routing them to a smaller model lowers inference cost and often latency, while hard requests still get the strong model. The key is having evals that show the cheaper path is good enough.

Watch out

Common mistakes.

  1. 01

    Routing without measuring quality on each path. Savings that lower answer quality are not savings.

  2. 02

    Building a router more complex than the problem. A few clear rules often beat a learned router.

  3. 03

    Forgetting that each model needs its own prompt tuning and structured output checks.

Tools

Work it out with a tool.

Related

Related terms.

Building something with this? Ask an engineer.

OceanLab designs and builds production software. Tell us what you are planning and we will reply with how we would approach it.

OceanLab

Enterprise Software Engineering - Human + AI

Languages

Locations

Global Headquarters

21 Merchant Road, 3rd Floor, Singapore 058267

Main corporate office and leadership operations

North America Office

548 Market Street, PMB 12472, San Francisco, CA 94104

Client operations and business development

India Office

402 Shivalik Shilp II, SG Highway, Ahmedabad 380015

Engineering and delivery center

© 2026 - Copyright. All Rights reserved OceanLab