The Real Cost of Routing Between Strong and Fast Models in AI Agents
This article examines whether switching between a strong model for planning and a cheaper, faster model for execution actually reduces total delivery cost. It breaks down the five components of task cost, explains when model routing is worthwhile, and shows why execution contracts, escalation rules, external quality gates, and per-task-type observability matter more than the model tier itself. Readers will get a practical framework for deciding when to route, what to measure, and how to avoid turning saved inference spend into rework.
Model Routing: The Total Cost Accounting
Having a single agent switch model tiers within one task is becoming a common way to reduce inference overhead: use the stronger model first to clarify goals, constraints, and the path of change, then hand off mechanical editing, command execution, and regression verification to a faster, cheaper model. If execution drifts from the plan or tests fail to converge, control returns to the strong model. This sounds like “reserving expensive resources for what matters,” but for teams shipping real work every day, the only question that matters is the total bill: do the tokens you save get spent again on context being passed back and forth, plan distortion, and manual rework?
Break the Total Cost Down First
Whether model routing saves money cannot be judged by “the fast model is cheaper per million tokens.” A task’s cost includes at least five parts:
Planning tokens. The strong model must read requirements, repository structure, and failure logs, then output an executable plan. If planning takes too many rounds, or the entire repository’s source is repeatedly stuffed into context, this part can cost more than execution.
Execution tokens. The fast model edits files, explains compile errors, and adds tests. Unit price is low, but if round counts balloon, the total may not be.
Handoff overhead. The plan, changed files, command output, and open questions must all be re-encoded into the next hop’s prompt. If a handoff is written vaguely, the next model re-does the understanding, effectively paying the planning cost twice.
Failures and escalations. Rolling back to the strong model usually requires attaching the failure trajectory too. Escalation itself is reasonable, but if thresholds are too loose, the task oscillates between the two models.
Human time. The time developers spend reviewing bad patches, rolling back, and re-explaining requirements is usually more expensive than inference. If routing increases the proportion of patches that “look done but aren’t mergeable,” reported inference cost falls while delivery cost rises.
So the comparison baseline should not be the sticker price of “strong model all the way,” but end-to-end cost under the same acceptance criteria: inference spend, wall-clock waiting time, number of manual interventions, and first-pass success rate. Savings without acceptance criteria just moves the bill from the model service to rework.
What Problem the Mechanism Actually Solves
Dynamic routing assumes a task can be split into a “decision-dense” segment and an “operation-dense” segment. Decision-dense work includes clarifying ambiguity, choosing the surface area of change, identifying implicit constraints, and judging whether a failure is an environment issue or a plan flaw. Operation-dense work includes modifying code according to an agreed contract, executing established commands, and making local fixes based on explicit errors.
The strong model’s marginal value is concentrated in the first segment: it stays goal-consistent with incomplete information and writes a verifiable definition of done. The fast model’s marginal value is in the second: low latency, suitable for short loops, and once constraints are fixed, the creative space should in fact be narrowed.
This is not opposed to “always use the strongest model.” If the task itself doesn’t separate into stages—for example, the requirement is a single sentence, success criteria don’t exist, and the codebase has no tests—routing merely splits one aimless exploration into two separately billed explorations. The precondition for routing is that stage boundaries genuinely exist, and that information at the boundary can be compressed into a contract, rather than relying on some model “having it in its head.”
When Routing Is More Likely to Pay Off
Tasks suited to split models usually satisfy all of the following:
- The goal is statable. For example, “add input validation to this endpoint and make the existing tests pass,” not “make this part feel better.”
- Verification is automatable. Compilation, unit tests, static analysis, or repeatable manual steps can determine right from wrong. The fast model works best iterating inside this closed loop.
- The change surface is predictable. The plan can point to modules, invariants, and forbidden areas. The execution model should not need to re-discover the architecture.
- Failures can be classified. Missing environment, assertion failure, and invalid plan premise map to different actions: fix the environment, fix the implementation, or escalate planning. Failures that cannot be classified should not be auto-escalated, otherwise the strong model is just reading noise.
Conversely, exploratory debugging, behavior changes spanning multiple modules, and changes lacking tests where correctness relies on business intuition are better served by strong-model short loops, or by having a human add acceptance criteria before routing. In those cases, the fast model’s low price cannot buy the right direction.
The Handoff Contract Matters More Than the Model Tier
The most common reason routing fails to save money isn’t that the fast model isn’t smart enough—it’s that the previous stage didn’t leave behind an executable contract. A handoff-ready plan should clearly specify:
- Goals and non-goals, explicitly stating what this change will not do.
- Definition of done: which checks must pass and which behaviors must be preserved.
- Paths allowed to be modified and paths forbidden from modification.
- Suggested verification commands and their success criteria, using generic descriptions rather than tool-specific proprietary parameters.
- Known risks and uncertainties, to be escalated when encountered during execution rather than the model inventing product behavior on its own.
The execution stage should consume only the contract and the necessary local context, not forward the full planning conversation verbatim. The shorter the context, the less likely the fast model is to be led astray by irrelevant reasoning, and the more of its budget goes to editing and verification.
A minimal illustrative stage state can be simple; what matters is that the fields are stable, not that the framework is fancy:
phase: plan | execute | escalategoal: one-sentence objectiveinvariants: behaviors that must be preservedtouched_paths: paths allowed to be changedchecks: verifications to run and their pass conditionsblockers: issues that cannot be resolved in the current stageattempts: number of attempts made in this stage
Each execution round updates only touched_paths, checks results, and blockers. When something conflicts with invariants, verification fails repeatedly, or the change surface needs to expand, it enters escalate, where the strong model revises the contract rather than continuing to stack patches in the wrong direction.
Escalation and Stop Rules Belong in Policy
Routing without an escalation policy becomes an infinite loop. Usable rules should be conservative and explainable:
- If the same verification fails a small fixed number of times in a row, escalate. Keep the count small, to avoid burning cheap tokens on wrong assumptions.
- If the execution model attempts to modify areas not authorized by the contract, escalate immediately or reject outright.
- If failure information is insufficient to distinguish an environment issue from a logic issue, do minimal information gathering first; escalate only if it’s still unclear.
- If planning itself keeps changing its story and the definition of done remains untestable, stop and hand back to a human, rather than continuing to switch models.
Stop conditions matter as much as escalation conditions. Some tasks lack a business ruling—switching to one more model tier won’t produce a standard answer. Treating “ask a human” as a legitimate terminal state is often cheaper than “escalate one more level.”
Quality Gates Determine Rework Rate
The fast model’s execution stage should default to being “dumber”: less free improvisation, more adherence to the contract. In practice, quality gates can be placed outside the model—the pipeline or local scripts decide pass/fail, and the model only makes limited modifications based on the failure summary. This way, differences in model capability don’t become differences in merge criteria.
Gate checks should be layered. The first layer is fast failure: formatting, type checks, and unit tests for affected modules. The second layer is heavier integration verification. If routing makes the fast model run the full re-check every time, the latency benefit is eaten; if it runs no checks at all, the cheap model submits “completed” work that can’t be reproduced.
Human review should also be risk-sampled rather than uniform. Changes touching permissions, data migration, or external interface compatibility should get a higher proportion of manual review even when done by a fast model. Purely internal changes covered by tests are where routing most reliably realizes savings.
What to Observe to Know Whether It Actually Saved Anything
After deploying such a strategy, measure by task type, not by global averages. A global average mixes “change one line of config” with “cross-module defect,” producing illusory savings.
Observable process metrics include: planning rounds vs. execution rounds, escalation count, context size carried into each handoff, retry count after verification failure, whether final checks were reached, proportion of manual reverts or major rewrites, and wall-clock time from start to mergeable.
When interpreting, look at combinations, not single metrics. Execution rounds down but escalations up means the contract is poor. Inference cost down but manual rewrites up means acceptance was loosened. Wall-clock time down while first-pass success rate holds steady is the combination closest to “actually saving both money and effort.”
None of these metrics require fabricated performance percentages. Use your team’s own real tasks from one week as the comparison: one group uses the same model throughout, the other routes by stage, with task type and acceptance criteria held constant. The sample doesn’t need to be large, but it must compare like with like. Mixing requirements of different difficulties into one savings report has no decision value.
Engineering Constraints When Implementing
Routing logic belongs in the agent orchestration layer, not scattered across prompt slogans. “Switch models when appropriate” cannot be audited or reproduced. The orchestration layer owns phases, budgets, and escalation; models own only their stage’s output.
Budgets should be bucketed. A planning bucket caps the strong model’s maximum rounds and maximum context; an execution bucket caps the fast model’s rounds and per-response output size; an escalation bucket has its own separate cap, to prevent failed tasks from flowing back indefinitely. When any bucket is exhausted, stop with a stated reason for non-completion—this is more operable than silently switching models and continuing to burn quota.
Logs should answer three questions: which stage was active, which contract governed it, and why it escalated or stopped. Without these three, cost optimization can’t iterate, and when something goes wrong you can’t tell whether it’s a model capability problem or a handoff problem.
If you use cloud model inference plus logging and monitoring/alerting capabilities, treat them only as carriers for billing and observability: record tokens, latency, and task status. Don’t build savings claims on unverifiable marketing numbers, and don’t force “multi-model” switching on tasks with no stage boundaries just to check a box.
Conclusion
Strong-model planning with fast-model execution can simultaneously reduce inference cost and wait time—when the goal is clear, verification is automated, and the change surface is controllable. What it saves is repeated reasoning and ineffective long context, not model magic. When handoff contracts are vague, escalation thresholds are arbitrary, and external quality gates are missing, cheap execution just produces more unmergeable patches, and the saved tokens are reclaimed twice over by rework.
For delivery teams, the safer order is: first write a clear definition of done and the check commands; then split the task into planning and execution; finally validate the routing with first-pass success rate, escalation rate, and manual rewrite rate on comparable tasks. Only when the accounting is clear can you claim it’s genuinely cheaper.
