Curtis FosterCurtis Foster
All posts

AI model routing in production: How to match the right model to the right task

AI model routing is not about picking one winning model. It is about building a production system that sends each task to the model most likely to handle it well.

September 26, 2026· 13 min read· Curtis Foster Team
Hero image for blog post: AI model routing in production: How to match the right model to the right task

At 9:17 on a Tuesday night, Priya was standing in her kitchen with one hand on a cold mug of tea and the other on her laptop. Her support assistant had just sent a customer a beautifully written answer that was completely wrong about a refund policy.

The assistant was using the same large model for every request: simple order lookups, policy questions, angry customer messages, long account histories. The model wasn't the only problem. The system had no way to decide which model fit which job.

AI model routing fixes that mismatch. A production system should send each request to the model that fits its task, risk, latency target, and budget, instead of treating one model as the answer to every question.

A routing decision should reduce risk, cost, or latency before it reaches the user
A routing decision should reduce risk, cost, or latency before it reaches the user.

I've seen this pattern while building multi-model AI products and shipping technical systems across large operating environments. Teams spend weeks comparing model benchmarks, then make one model carry the entire product. That is not a model selection strategy. It's a single point of failure with a nice demo.

Why one model is rarely enough

The common advice is simple: pick the best model and build around it. That works for a benchmark. It breaks down when your product has several kinds of work happening at once.

A customer asking "What time do you close?" does not need the same reasoning capacity as a customer asking for a careful explanation of a disputed charge. A short classification request does not need a huge context window. A task that generates a legal notice should not be handed to the cheapest fast model just because it returns in 400 milliseconds.

The mistake I keep watching teams make is treating model quality as one number. In production, quality has several dimensions:

  • Accuracy on the actual task, not a public leaderboard
  • Response time under real traffic
  • Cost per successful outcome
  • Reliability when tools, retrieval, or structured output are involved
  • Safety and escalation behavior when the request is uncertain

A model can be excellent at extracting fields from an invoice and poor at following a long account-specific policy. Another can write natural language well but return malformed JSON often enough to break the next service.

That is why model selection needs a job description. Before you compare providers, write down what the model must do, what failure looks like, and how much time and money the request can consume.

For example, a support product might divide work into these routes:

  • A small, fast model for intent classification and language detection
  • A medium model for routine answers grounded in approved documents
  • A stronger reasoning model for ambiguous cases and multi-step account issues
  • A deterministic service for totals, dates, eligibility checks, and other exact calculations
  • A human review path for high-risk or unresolved requests

Notice what is missing: a model making every decision. The routing layer makes the decision. The model performs a bounded job.

That distinction matters. An LLM is not a universal employee. It is a component with strengths, limits, and operating costs.

Build a routing policy, not a model popularity contest

A useful LLM routing strategy starts with request attributes. You do not need a complicated machine learning classifier on day one. A clear policy with good logging will teach you more than an impressive routing diagram nobody can debug.

I think of the router as a Control Surface. It receives a request, gathers a small amount of context, assigns a task type, and chooses a path. The router should be easier to inspect than the models behind it.

A basic decision might look like this:

1. Identify the task type.

2. Check risk and data sensitivity.

3. Estimate context size and tool requirements.

4. Select an eligible model.

5. Set a fallback and escalation rule.

6. Record the decision and outcome.

Task type is usually more useful than a vague label like "hard question." You can define types: extraction, classification, drafting, grounded question answering, planning, tool use, review.

Risk changes the route. A request about a restaurant recommendation can tolerate a different failure rate from a request about medication, account access, or a financial dispute. Your router should know the difference before a model starts generating text.

Context size matters too. Sending a 50-page account history to every model is expensive and often counterproductive. A smaller context assembled from relevant records may produce a better answer than a larger context filled with unrelated material.

Then there is output shape. If the next service requires valid JSON, choose a route that has demonstrated reliable structured output. Do not assume a model that writes excellent prose will behave like a stable API response. (I have watched that assumption quietly wreck a billing integration at 2 a.m., and it is not a fun conversation.)

Here is a practical routing table to start with:

Request typePreferred routeWhy
Intent classificationFast, lower-cost modelLow latency and high volume matter most
Simple document questionRetrieval plus medium modelThe answer should stay close to approved source text
Ambiguous policy caseStronger reasoning modelThe system needs comparison and careful interpretation
Exact calculationCode or database queryDeterministic logic beats generated arithmetic
Sensitive or unresolved requestHuman reviewThe cost of a wrong answer is too high

You can implement this with a small service in front of OpenAI, Anthropic, Google, or open-weight models hosted through your own infrastructure. The provider is less important than the boundary around the call.

The route should also carry a reason code. Examples include simple_lookup, high_risk, large_context, and fallback_after_validation_failure. Those codes turn an invisible model choice into something your team can actually inspect and argue about.

What I'm telling you is this: a good control surface does not try to be clever on every request. It makes a small number of understandable decisions, consistently.

The real production problem is feedback

A routing policy is only a hypothesis until real users exercise it. You need an Eval Loop that measures whether the selected route produced a useful result, not just whether the API returned a response.

Here's the part most people miss. The team can show a clean diagram with six models, a fallback chain, and a glowing dashboard. Then someone asks which route actually improves customer resolution, and the room gets quiet.

I have been in versions of that room. It is not a sign that the team failed. It is a sign that the system has reached the point where intuition is no longer enough.

Measure outcomes by route. At minimum, capture:

  • Task type and selected model
  • Input and output token counts
  • Time to first token and total response time
  • Tool calls, retries, and validation failures
  • Human escalation rate
  • User correction, rejection, or recontact rate
  • Cost per successful task

The phrase "cost per successful task" matters. A cheap model that fails twice, triggers a retry, and sends the case to a human may cost more than a stronger model that resolves it once.

Do not evaluate routing only with average performance. Averages hide the customer who waited 18 seconds for a response, the request that retried four times, and the policy answer that was wrong in a rare but serious case.

Slice results by route and by task. A weekly review might reveal that:

  • The fast model handles 92 percent of intent classification correctly but struggles with mixed-language messages.
  • The medium model answers routine policy questions well when retrieval returns fewer than five sources.
  • The reasoning model improves complex cases but creates a 3.5-second latency increase.
  • A fallback route catches malformed JSON before it reaches the billing service.

Those are useful findings. "Model B scored higher" is not.

Run shadow evaluations before changing the live route. Send a sample of production requests to a candidate model without showing its answer to the user. Compare outputs against labeled examples or human review. Then move a small percentage of traffic, watch the outcome, and expand only when the evidence supports it.

You can also use a simple confidence policy, but do not treat model-stated confidence as truth. A model saying "I am 95 percent certain" is a text string, not a calibrated measurement. Confidence should come from signals like retrieval agreement, schema validation, tool success, answer checks, and repeated eval loop results.

And keep a route for "I do not know." A production AI system that can only answer or fail loudly will eventually invent an answer. A controlled handoff is a feature, not an embarrassment.

Design for cost and failure from the start

The default startup advice is to ship the smallest possible version and optimize later. For AI products, that creates a specific trap. If you launch without route-level cost and failure data, you may spend months tuning prompts while the wrong model handles the wrong traffic.

A multi-model system needs a budget for each class of work. Set limits before you need them:

  • Maximum latency for interactive requests
  • Maximum model spend per task type
  • Maximum retry count
  • Maximum context size
  • Maximum tool-call depth
  • Escalation threshold for unresolved requests

This is where a Context Budget becomes useful. It is not only a token limit. It is a decision about how much information a request deserves before the system asks for a more expensive route or a human handoff.

For example, a short support request might receive a compact customer record and three relevant policy passages. A complex dispute might receive a larger evidence package, but only after the system confirms that the case meets the route's risk and value thresholds.

Set fallbacks carefully. A fallback should not simply call another model with the same prompt and hope for a different result. It should respond to a known failure:

  • If JSON validation fails, retry with a constrained schema or use a different model.
  • If retrieval returns no useful source, ask a clarifying question or escalate.
  • If latency crosses the user-facing limit, return a progress state or move work to a background queue.
  • If a tool fails, stop the chain rather than letting the model guess.
  • If the request contains sensitive data, remove unnecessary fields before routing.

Watch retry storms. One failed call can become four calls when a parser, tool wrapper, and timeout handler each decide to try again. The user sees one answer. Your bill sees the whole chain.

So the deeper lesson is this: the visible model call is often only a fraction of the actual work. Retrieval, validation, tool execution, retries, and review all shape the final result. That is why production AI systems need a route-level trace, not just a list of model names.

A useful trace should let you answer these questions in under five minutes:

  • Which route handled this request?
  • Why was that route selected?
  • How many model and tool calls occurred?
  • Where did latency accumulate?
  • Did the answer pass validation?
  • What did the user do next?

If you cannot answer those questions, do not add another model yet. Fix the visibility first.

A practical path for your next routing test

You do not need six providers and a research project to begin. Start with one narrow workflow that has enough traffic to reveal patterns.

Choose a task: support intent classification, invoice extraction, document question answering. Create a test set of real examples with expected outputs. Include ordinary requests, confusing requests, incomplete requests, and the awkward examples your team usually removes from demos.

Then compare two or three routes using the same input set. Record quality, latency, cost, schema reliability, and escalation behavior. Keep the task fixed while you change the model, otherwise you will not know what caused the result.

After that, run a limited production test. Route a small traffic share to the candidate path and compare user outcomes against the current path. Make a rollback possible with a configuration change, not a code release at 2:00 a.m.

Use this checklist before expanding the test:

  • The task has a defined success measure.
  • The route has a named owner.
  • Every model call has a trace ID.
  • The fallback has a reason and a limit.
  • Cost is visible by route and task.
  • Human review is available for high-risk cases.
  • The team has a rollback switch.

This work can feel strangely personal. You may have spent weeks making one model behave well, and now someone is suggesting it should not handle every request. That does not erase the work. It means the product is becoming more honest about what users actually ask of it.

Teams often think model routing is a sign that their architecture has gotten complicated. Sometimes it is. More often, routing is the system admitting that the world is varied.

FAQ

What is AI model routing?

AI model routing is the process of sending each request to a model or non-model service based on task type, risk, context, latency, cost, and expected quality. It can route requests to a fast model, a stronger reasoning model, code, retrieval, or human review.

How do I choose the right model for a task?

Start with a task-specific evaluation set and compare models on accuracy, response time, cost, structured-output reliability, and failure behavior. Choose the least expensive route that meets the task's quality and risk requirements, rather than choosing the model with the strongest general reputation.

Is multi-model AI architecture more expensive to operate?

It can be, but it does not have to be. Routing simple, high-volume work to lower-cost models while reserving stronger models for difficult cases can reduce total spend. Measure cost per successful task, including retries, tool calls, and human escalation.

Should every production AI system use a router?

Not necessarily. A single-model system can be the right choice for a narrow workflow with stable traffic and clear evaluation results. Add routing when your product has meaningfully different tasks, risk levels, latency needs, or cost profiles.

Start with one workflow, one route comparison, and one honest measurement loop. You do not need to solve the whole architecture tonight, and neither did Priya. The first useful move is to stop asking one model to be good at everything.

The model is only one worker on the line. The routing decision is what turns a collection of model calls into a production product.

0 comments

Join the conversation

Subscribe to comment

Join Curtis Foster's newsletter to leave a comment and get new posts in your inbox.

Read next

Hero image for blog post: The AI production readiness review: 12 questions I ask before launch

The AI production readiness review: 12 questions I ask before launch

Oct 31, 2026
Hero image for blog post: How to design human handoffs for AI agents that cannot finish the job

How to design human handoffs for AI agents that cannot finish the job

Oct 23, 2026
Hero image for blog post: Streaming, queues, and background jobs: choosing the right runtime for AI workflows

Streaming, queues, and background jobs: choosing the right runtime for AI workflows

Oct 14, 2026
AI model routing in production