Architecture

How to choose the AI model for production, and why the answer is more than one.

The right question is not which model is best. It is which model for each task, with what fallback, tested against which cases, and switchable at what cost.

September 9, 2026 9 min read

"Which is the best model?" is the most asked question and the least helpful. The model that leads the ranking today does not lead in six months, the price changes before that, and what is best for writing an answer is waste for classifying a request. Teams that pick one model and build everything on it discover the cost of that decision on the first switch, when they realize the switch is not possible.

The question that does have an answer is a different one: which model for each task, with what fallback, tested against which cases, and switchable at what cost. This text covers each part.

Per task, not per project

An agent in production executes tasks of different natures within the same conversation. Classifying the customer's intent. Deciding which specialist receives the request. Extracting fields from a text. Writing the final answer. Summarizing the history so the context does not overflow.

Classifying and routing are short decision tasks: a small, cheap model does them well, and does them fast. Writing the final answer to a customer is where quality shows, and where it is worth paying more. Using the most expensive model for everything multiplies the cost without improving the result where it does not matter; using the cheapest for everything saves where it should not. The right design routes: each task goes to the model that resolves it at the necessary quality for the lowest cost.

The six criteria, per task

CriterionQuestion
Quality on the specific taskOn my real cases, not on a public benchmark, does it get right what it needs to?
Cost per callWith the context this task actually carries, what does each execution cost?
LatencyIs the customer waiting? Classification can take seconds; an answer on WhatsApp cannot.
Context windowDo the history and the documents fit? If not, the task needs summarization first.
Where it processesDoes the region meet my sector's requirements for personal data? Is there a no-retention option?
AvailabilityWhen it goes down, what happens? Is there a second model ready to take over?

The first criterion is the most misleading. Public rankings measure a generic task; yours is specific, in your own language, with your own vocabulary. The only measure that counts is the accuracy rate on your cases, and that requires having the cases.

How to test before shipping

  1. Build a set of real cases. Fifty to a hundred examples taken from the operation, with the expected answer. Including the hard ones: the customer who writes everything in capitals, the order with two items, the empty field. It is the most valuable asset in the project and the one nobody wants to build.
  2. Run each candidate against the set. Accuracy rate, total cost, average latency. Three numbers per model, per task.
  3. Version the instructions together with the model. The same instructions behave differently on different models. The test is of the instruction-plus-model pair, and the pair needs a version.
  4. Test live with the real integrations before promoting. A model that gets it right with test data and wrong with the real return from the ERP has not passed.
  5. Keep the set alive. Every case that went wrong in production joins the set. That is how the next model switch is tested against what has already caused trouble.

A practical rule: if you cannot state the accuracy rate of your current model on your own cases, you have no basis for saying the next one is better. A ranking does not replace that.

Fallback is not optional

A model provider goes unavailable, degrades, caps volume. When that happens at 2pm on a Monday, an agent that depends on a single model stops serving. A production design has a second model ready for every critical task, and the switch happens on its own, by rule: cost, quality and availability.

That requires the second model to have been tested against the case set as well, and the instructions to work on both. It is more work at the start, and it is what separates an operation from a dependency.

The silent lock-in

Model lock-in rarely comes from a contract. It comes from instructions written and tuned over months against one model's quirks, from an output format only that model produces the expected way, from tools declared in one provider's dialect. When the time comes to switch, the team discovers that switching means rewriting, and does not switch.

Three decisions that keep the switch possible:

  • An abstraction layer between agent and provider. The agent calls "the writing model", not a specific provider. Which one it is gets resolved by the router.
  • Tools defined neutrally, with types, and translated into each provider's format by the platform. Standards like MCP exist for that.
  • Instructions with versioning and rollback, so that adapting to a new model is a new, tested version rather than an edit on top of what is live.

How Runflow handles this

The SDK is multi-LLM: the agent defines the task, and the model is chosen by configuration, not in code. The LLM Hub routes between providers, with automatic fallback by cost, quality and availability, and cost control by team and by user, without every team having to sign up for an API of its own. You decide where the data goes: providers with no retention, or your own model on your infrastructure.

The Prompt Studio keeps the instructions versioned, with variables and rollback, without a code deployment, and live testing with the real connectors happens before promotion to production. That is what makes it possible to treat a model switch as a new tested version, rather than as a rewrite.

Frequently asked questions

Which is the best AI model to use in production?

The question has no useful answer, because the best one changes in months and what is best for writing is waste for classifying. The question that does have an answer is which model for each task: classification and routing do well with a small, cheap model; the final answer to the customer is where it is worth paying more. The choice is made against six criteria evaluated on your real cases: quality on the specific task, cost with the real context, latency, context window, processing region and availability with a fallback.

How do you test an AI model before putting it into production?

By building a set of fifty to a hundred real cases from the operation with the expected answer, including the hard ones; running each candidate model against the set and measuring accuracy rate, cost and latency; versioning the instructions together with the model, because the test is of the pair; testing live with the real integrations before promoting; and feeding the set with every case that goes wrong in production.

Why use more than one AI model in the same agent?

Because an agent executes tasks of different natures within the same conversation: classifying intent, routing, extracting fields, writing, summarizing. Each has a different quality and cost requirement. Using the most expensive model for everything multiplies cost with no gain where quality does not matter; using the cheapest for everything saves where it should not. Routing sends each task to the model that resolves it at the lowest cost.

What is model fallback and why is it necessary?

It is having a second model ready to take over every critical task when the main provider goes unavailable, degrades or caps volume, with the switch happening by a rule of cost, quality and availability. It requires the second model to have been tested against the case set too, and the instructions to work on both. Without a fallback, the agent stops serving when the provider goes down.

How do you avoid lock-in to an AI model provider?

Lock-in rarely comes from a contract; it comes from instructions tuned over months to one model's quirks, from an output format only it produces, and from tools declared in one provider's dialect. You avoid it with an abstraction layer between agent and provider, tools defined neutrally and translated by the platform, and instructions with versioning and rollback, so that adapting to a new model is a tested version rather than an edit on top of what is live.

Bring a real process and see what changes.

In a no-cost conversation with an expert, we look at the process you have today and tell you plainly whether the case calls for an agent or whether the tool you already use solves it.