All field notes
Engineering 9 minute read

Model routing in production: start simple, measure everything

Design a production AI model router with explicit policies, observability, fallbacks, and evaluation gates.

In brief

  • Begin with deterministic rules before adding a learned router.
  • Log requested, selected, and resolved model identities.
  • Treat fallbacks as observable product behavior.
01

A router is a policy decision

Routing selects a model based on task characteristics, customer requirements, cost limits, or availability. The decision should be explainable enough to debug and stable enough to evaluate.

  • Task class and risk
  • Required capabilities and context
  • Latency or spend ceiling
  • Availability and regional constraints
02

Start with a small ruleset

A handful of named lanes is easier to validate than a complex classifier. For example: fast interactive, balanced default, and deep reasoning. Each lane should have a primary model, a tested substitute, and a reason it exists.

03

Record the entire selection path

Log what the application requested, what the router selected, what upstream model actually served the request, whether a fallback occurred, and why.

Minimum routing telemetry
FieldPurpose
requested_laneCaptures application intent
selected_modelExplains router choice
resolved_modelSupports reproducibility
fallback_reasonMakes reliability behavior visible
latency_tokens_costConnects choice to outcome
04

Promote routing changes through evaluation gates

Replay a fixed task set, compare quality and operating metrics, canary the policy, then inspect segment-level regressions. Average wins can hide a serious failure for one customer or capability.

Frequently asked

Questions, answered plainly.

Do I need an AI model to route AI requests?+

Usually not at first. Deterministic rules are cheaper, faster, and easier to audit. Add a learned classifier only when measured complexity justifies it.

What is the safest fallback?+

A named model that supports the required capability and has passed the same evaluation set. Availability alone is not enough.

How do I know routing is helping?+

Compare quality, latency, cost, failure rate, and review burden against a single-model baseline.

Sources and next paths

Check the living surfaces.

Put it to work

One interface. Your choice of model.

Run the same task through live GPT, Claude, Gemini, and Xpersona models without rebuilding your client.

Try Xpersona chat
Model routing in production: start simple, measure everything | Xpersona Blog