Route requests to the cheapest model that can handle the query, falling back to stronger models as needed.
How a model router picks the cheapest model that can answer
Step 1 of 5
Request
A request arrives, for example "what are your opening hours?". The router has not picked a model yet.
Step 2 of 5
Classifier
A rules engine or a small model scores how hard the request is. Classifier accuracy is the metric to watch, because a wrong guess sends a hard query to a weak model.
Step 3 of 5
Small model
A simple request goes to the cheap, fast model. A complex request would skip this step and go straight to the large model instead.
Step 4 of 5
Confidence check
A confidence scorer inspects the small model's answer. If confidence is low, the request is not returned yet; it is escalated.
Step 5 of 5
Fallback
The fallback model answers the escalated request. A circuit breaker keeps this path from becoming a fallback storm when a provider is struggling.
Cheap models answer the easy traffic; the expensive one is the safety net, not the default.
Request
Classifier
Small model
Large model
Fallback
clientservicemodeldatabaseagentexternal
Explanation
A lightweight classifier scores query complexity. Simple queries go to a cheap fast model. Complex queries go to a frontier model. If the cheap model's confidence is low, fall back to the expensive model.
Components
Query classifier (rules or small LLM)Model registryConfidence scorerFallback chainCost telemetry
When to use
High-volume production traffic
Mixed query complexity
Cost-sensitive products
When NOT to use
Low volume — savings don't justify complexity
Uniform query difficulty — just pick one model
Failure modes
Classifier mis-routes complex queries to weak model