pattern

Model Routing

Directing each request to the cheapest model capable of handling it, rather than sending all traffic to the most capable one.

Model capability and cost differ by more than an order of magnitude, and most requests do not need the most capable model. Routing exploits that, and it is typically the single largest lever on LLM application cost.

Routing signals, in ascending sophistication: task type, where classification, extraction and summarisation go to a small model and complex reasoning to a large one; input complexity, estimated by length, structure or a cheap classifier; a confidence check, where the small model's output is evaluated and escalated if inadequate; and user tier, where premium users get the better model.

The cascade is the pattern that generalises: attempt with the cheap model, validate, escalate on failure. It works well when validation is reliable and cheap — a JSON schema check, a required-field check, a confidence score — and badly when it is not, because an unvalidated wrong answer is worse than a slower right one.

What makes routing maintainable rather than a source of inconsistency: an evaluation set per route, so a routing change can be measured; the model as configuration, not code, since models are deprecated and replaced frequently; and the model version recorded on every request, or debugging a quality regression is impossible.