AI & automation

What is an LLM router?

An LLM router is a layer in front of several language models that decides, request by request, which model should answer, using a small cheap one for easy tasks and a larger one only when the task needs it.

Why routing exists

Models differ in price, speed and ability. A greeting or a simple yes-or-no classification does not need the most capable model; a contract summary might. Sending everything to the biggest model wastes money and adds delay, while sending everything to the smallest one produces weak answers on hard requests.

How routers decide

  • Rules: by feature, such as "ticket tagging goes to the small model".
  • Classifier: a tiny model rates the difficulty of each request first.
  • Fallback: try the cheap model, and escalate if its answer fails a check or it reports low confidence.
  • Provider failover: if one vendor is down or rate limited, send traffic to another.

Trade-offs

Routing adds code, and a wrong decision can send a hard question to a weak model. Log which route each request took, and sample answers from every route so quality does not slip unnoticed. Different models also behave differently with the same prompt, so each route may need its own tuned instructions.

Questions, answered

Usually not at first. Start with one model, measure cost and quality, and add routing when one workload clearly dominates your bill.

Yes. Failover to a second provider is one of its most practical uses.

By the Stegnor team · Updated