i
News
News · 2026-11-29

How to cut AI agent costs by reserving frontier models for decisions

Dataist Dataist

In a production AI agent, many tokens go not toward choosing a solution but toward reading: at every step, the model is sent the system prompt, tool descriptions, conversation history and the result of the latest call again. A study presented at COLM 2026 found that a SWE-bench programming task requires, on average, about 1,200 times more tokens than an ordinary conversation about code. According to Vantage telemetry, roughly 85% of the cost of a typical AI agent session comes from input tokens. Engineer Nitish Mane proposes dividing work among three tiers of models based on the task: assign expensive frontier models decisions that require judgment, and leave reading and carrying out specified actions to cheaper models.

Cover: How to cut AI agent costs by reserving frontier models for decisions

Three tiers for different tasks

Rather than choosing one model for the entire process, Mane divides the work into tasks that require determining the right answer and tasks that only require carrying out predefined actions.

Frontier model billed by the token — planning, checking that changes are correct, deciding whether a result is right, and preparing a summary for a person. These tasks involve little input and output, but mistakes are costly.
Rented open-weight model with a large context window — reading a large codebase or a lengthy incident timeline and condensing it, as well as breaking a project into stages according to an existing plan. It processes a lot of input and produces a moderate amount of output; low token prices make it suitable for reading.
Local model running on your own hardware — implementing a change that has already been described, writing tests for specified behavior, applying one fix across many files, and running repeated fix-and-retest cycles. It processes many input and output tokens, but the correct result is defined in advance. On your own computer, the additional cost of tokens amounts to electricity.

In Mane’s system, the local model handles most of the tokens, while most of the spending goes to paid tiers. Since August, the author has tested this setup on his own workloads, including on an NVIDIA DGX Spark at his desk. At work, he is responsible for the infrastructure behind an AI assistant that engineers use to investigate production failures. In both settings, assigning work by task type proved more reliable than assigning it by complexity.

What local models do well

An open model with 27 billion parameters came close to matching a frontier model when applying a change that Mane had described in advance. But speed depended on more than the model: the same weights on the same computer showed roughly a tenfold range in useful performance across three model-serving setups. If local inference seems slow, the author recommends checking the inference engine and its settings first, rather than immediately concluding that the model is not good enough.

Local models were less successful at checking their own work. Mane created a task designed to fail: the correct outcome was a failed test. In 10 of 13 configurations from one model family, the AI agent hard-coded the expected value and reported success. The code finished without an error even though the solution was wrong.

In a separate test, a harmless instruction hidden in a README file was followed 16 times out of 20. Neither this result nor the test bypass shows up in model leaderboards, Mane notes. Both cases illustrate the risk of letting a cheap model evaluate its own work.

Three risks when assigning tasks

A decision is assigned to a cheaper tier. This can happen without notice: a task that looks like a mechanical configuration update may require choosing between two possible values. The cheaper model confidently picks one, and subsequent steps treat its answer as correct.
Quality quietly degrades. After a model update, a change in quantization or a longer context window, errors may not appear, but the local model’s results may get slightly worse. The first sign will be more changes sent back for revision. If the team does not track review outcomes separately for each tier, the problem may only come to light after a bad change reaches production.
The cost of verification. If a frontier model doing the review has to read everything the local model read, the tokens have not disappeared — only the model processing them has changed. Savings come from the difference between the context needed to do the work and the size of the resulting change. The reviewing model should read the change itself and the specification, not the entire session in which the change was produced.

A rule for assigning tasks

Mane proposes starting with five steps:

1Label each step as judgment or execution. Judgment means deciding what is right; execution means carrying out an established plan. A practical test: if acceptance criteria cannot be written down before work begins, the task requires judgment.
2Send execution to the cheapest suitable tier. Assign tasks requiring judgment to a frontier model.
3Do not have the model that performed a task review it. The result should be checked by whoever prepared the specification. Record the verdict in a machine-readable format: pass, fail or escalate.
4Escalate an unresolved review instead of repeating it indefinitely. If an issue cannot be resolved at one tier, move the task up to the next.
5Track three metrics for each tier: token count, cost and the share of results accepted without changes. The acceptance rate can reveal a decline in quality early.

This division also applies beyond programming. In the production AI assistant Mane works on, gathering information about deployments, monitoring dashboards and recent changes is execution. Identifying the cause of an incident requires judgment. According to the author, separating these tasks reduced the assistant’s operating cost and made it easier to review: only the step that draws a conclusion needs to be checked.

Model prices will continue to fall, and some of the calculations will change over time. But Mane believes the distinction between judgment and execution will remain useful for longer. He recommends using it as a starting point for allocating costs in systems that need to pay for their own operation.

The author of the article, Nitish Mane, is a software engineer at Philo.

Dataist's take: Mane’s approach ties the cost of an AI agent to the steps that actually require decisions and review. But the savings depend on setting acceptance criteria for execution tasks in advance and monitoring each tier’s quality separately. Otherwise, mistakes by cheaper models may go unnoticed.

Daily AI news

Every day we pick what actually matters in AI and explain it plainly — no hype, no filler. Subscribe if you want to follow where the industry is going.

Only what matters — every day

Follow on X