Índice do artigofaltam 14 min de leitura
One-sentence summary: the question "which is the best AI for coding" has no useful answer, because the stages of a project demand opposite skills, and what decides the project's cost is not the price per token, it's how many times you had to repeat the task.
Every team working with AI in development ends up in the same place after a few months: one model seems better for starting a project from scratch, another for designing interfaces, another for implementing inside an existing repository, and a fourth for the repetitive tasks nobody wants to do.
This is not indecision. It's the realization that different stages demand different skills, and that no model leads in all of them at once. This article turns that perception into a method: a routing table by stage, the metrics that actually measure productivity, and the math that explains why the cheapest model often ends up costing more.
Article summary
- Tokens per second measure latency, not productivity. What matters is the time until the task is done and the number of human interventions along the way.
- There are two useful and opposite profiles: the interactive model, which answers instantly and keeps you at the wheel, and the autonomous one, which works for minutes on its own and hands back the finished task.
- Seven stages of the development cycle call for distinct profiles, and the yardstick for choosing is the cost of a mistake at that point.
- The cost that decides the project is the cost per accepted delivery, not the price per million tokens. A model three times more expensive that eliminates two attempts is cheaper.
Why "the best model" is the wrong question
Imagine evaluating a professional with a single grade. An excellent software architect may be a poor executor of repetitive tasks, not from incompetence, but because their work is too expensive for that. The same goes for models.
What changes from stage to stage is not the difficulty, it's the kind of success that matters:
- In architecture, success is choosing the right path among plausible alternatives. A mistake here contaminates everything that comes after.
- In design, success is visual consistency and sensitivity to detail. A mistake here is visible to the client.
- In implementation, success is adherence to the repository and correct use of tools. A mistake here gets caught by CI.
- In repetitive tasks, success is volume per cost. A mistake here is cheap, because the test fails and you repeat.
These four sentences already contain the whole method: route by the cost of a mistake, not by the model's reputation.
Tokens per second don't measure productivity
Here's the distinction that confuses teams the most. A model can answer almost instantly and still consume more of the team's time, because it requires someone to stay there, giving short instructions, correcting course, approving every step. Another can be slower per answer and hand back an entire finished task after working on its own for a few minutes.
| Criterion | Interactive profile | Autonomous profile |
|---|---|---|
| First token | Almost immediate | Tens of seconds |
| Instructions per task | Many and short | One, broad |
| Human attention | Continuous | Free during execution |
| Unit of work | The adjustment | The task |
| Best for | Exploring and refining | Delivering something complete |
Neither is better: they serve different moments of the project.
A serious comparison of models for development needs to measure nine things, and only two of them appear in marketing tables:
| Metric | What it reveals |
|---|---|
| Time to first token | The feeling of responsiveness. Matters in interactive use, irrelevant in long tasks. |
| Tokens per second | Output speed. Matters when you read the output as it appears. |
| Total time until the task is done | The metric the business feels. Includes the back-and-forth. |
| Number of human interventions | How many times someone had to correct course. |
| Completion rate | Percentage of tasks that reach the end without being abandoned. |
| First-attempt quality | How much of the result survives review without editing. |
| Need for correction | Rework after the task was declared done. |
| Total cost | Tokens plus human time plus repeated attempts. |
| Supervision time | How long the developer had to keep watching. |
The last row is the most underrated. A model that demands continuous attention frees the person for nothing, even if it produces text very fast. A model that works ten minutes on its own frees ten minutes, even if each answer takes longer.
The case that dismantles the metric on its own
Independent measurements from August 2026 show a perfect example of the trap. A coding model at a high reasoning level emits 126 tokens per second, more than double the output speed of the big vendors' reasoning models. By the tokens-per-second criterion, it wins comfortably.
But its time to first token is almost 90 seconds. Anyone who picked by the speed column actually chose the model where the person waits a minute and a half staring at a frozen screen before the first word appears.
The same independent dashboard records the output gap between the extremes: an open model running on dedicated inference hardware delivers close to 2,000 tokens per second, against about 55 for frontier reasoning models. It's worth noting that this measured number is below the roughly 3,000 tokens per second the manufacturer itself advertises, which is a good reminder to always prefer independent measurement over the marketing page.
The seven stages and the profile of each
The table below is the core of the method. It deliberately doesn't name models, because names and capabilities change in weeks, while profiles change in years. If you need this week's names, you'll find price, context and reasoning, coding and agent scores in the up-to-date AI model comparison, with the source and date of each number.
| Stage | What the stage demands | Recommended profile |
|---|---|---|
| Discovery and architecture | Reasoning, reading the problem, comparing alternatives | The strongest available, at high effort |
| Visual prototype | Design quality, consistency, fast iteration | A model with good visual output, prioritizing iteration |
| Implementation | Adherence to the repository, tool use, precision | A coding agent with tools, medium effort |
| Refactoring | Understanding broad context, low regression rate | A strong model, with context limited to the module |
| Testing | Operating a browser, reading logs, fixing and repeating | An agent with real tools and permission to execute |
| Repetitive tasks | Volume, speed, low cost | The cheapest one that passes the tests |
| Final review | Independence from whoever executed | A model different from the executor, even if equal in strength |
Two rows deserve an explanation.
Refactoring calls for a strong model with a small context, not a strong model with a giant context. Throwing the whole repository into the window makes the result worse: the more irrelevant text goes in, the higher the chance the model anchors on the wrong part. The way to go is to delimit the module and provide the architecture rules, not dump everything.
Final review calls for a different model, and this is the cheapest rule to implement and the most forgotten. A model that reviews its own work tends to confirm its own assumptions. Switching the reviewer costs nothing but configuration and catches an entire class of error the executor can't see.
The lever almost nobody uses: effort level
Before discussing which model to use, it's worth knowing a control that usually yields more and costs less: the reasoning effort level. Anthropic and OpenAI expose this parameter, each with its own scale, and it changes how much the model thinks before acting.
The effect on cost is large and measured. The independent Artificial Analysis dashboard publishes cost per task by effort level:
| Effort level | Cost per task, frontier model A | Cost per task, frontier model B |
|---|---|---|
| Maximum | US$ 2.34 | US$ 1.23 |
| High (default in August) | US$ 1.23 | US$ 0.55 |
| Medium | US$ 0.72 | US$ 0.37 |
| Low | US$ 0.43 | US$ 0.23 |
Source: Artificial Analysis, August 2026 measurement, for two frontier reasoning models from different vendors. Cost per task follows their methodology, not the price-per-token table.
Going down from the default level to medium cuts cost by about 40% within the same model, and going from default to low cuts 65%. It also brings down waiting time: on the same dashboard, a frontier model's time to first token drops from 20.5 seconds at high effort to 6.8 seconds at medium and 4.0 at low, with practically the same output speed.
In the November generation the default changed for part of Anthropic's lineup: according to the official effort page, Opus 5.5 and Haiku 5.5 now ship at medium effort, while the other models remain at high. Check the default level of the model you use before lowering it.
The most valuable recommendation here isn't ours, it's the vendor's. Anthropic writes in its official model selection guide that adjusting the effort parameter is often a better lever than switching models. And it proposes two explicit selection strategies: start with the cheapest model and move up only if a capability gap appears, or start with the most capable one, optimize the prompt and then lower effort or move down a model.
The cost guide in the same documentation, checked in November 2026, turns this into a diagnostic order that works as a mental shortcut. Faced with a bad result, ask first: did I lower the effort? If you did, restore the previous effort. If you didn't, then test the model tier above, at its default effort. Confusing the two is what makes teams spend on capability when the problem was depth, and vice versa. The same guide asks that models be compared by cost per completed task, not per token.
There's also a combination the vendor measured: when the output can be checked by a test or verifier, running everything at low effort and repeating only the failures at high effort cost about 40% less than running everything at high, with the same pass rate on Anthropic's tests.
A counterintuitive detail Anthropic itself records: instructions created to compensate for older models, like "double-check" or "be as thorough as possible", are followed to the letter by new models. The result is extra tool rounds and extra text you pay for with no gain in accuracy. Before switching models to save money, clean up the prompt.
The harness matters as much as the model
There's a factor that scrambles any comparison and is almost never declared: the harness, meaning the set of tools, context, validations and execution loop around the model.
The same model, with a harness that knows how to run the project's tests and read the error back, delivers one result. With a harness that only returns text, it delivers another. When a vendor publishes a benchmark result, it's publishing the model-plus-harness pair, which is why the same model shows up with different numbers in different reports.
The practical consequence for decision-makers: before switching models because the result is bad, check the harness. In most cases, the gain from giving the agent the right test command, the project's conventions file and permission to re-run is bigger than the gain from moving up a model tier. It's the same reasoning we describe in how to build a software factory with AI agents.
Why the cheapest model can end up more expensive
Now the math. Price per token is the most visible number and the least decisive.
And there's primary evidence for this, not just reasoning. A 2026 study that compared four models as the engine of an agent in software analysis tasks measured the opposite of what the price table suggested: the cheapest model per token was the one that consumed the most calls and the most wall-clock time, averaging 78 calls and 144 minutes per task. The authors' conclusion is direct: price per token is not a reliable indicator of cost per task, because weaker models need more cycles and more tool executions.
The same work quantifies the price of failure. Comparing runs that failed with those that succeeded, failures cost 2.77 times more cycles, 4.07 times more time and 1.76 times more retry attempts. Failing is not neutral: it's the most expensive operation in the pipeline.
Source: comparative study of models as an agent engine in static software analysis tasks in C/C++ and Java, 2026. The domain is neither front end nor product, so treat it as a solid analogy, not as a measure of a software house project.
Now consider an architecture task that consumes 200,000 input tokens and 40,000 output tokens. With August 2026 prices, the direct cost per attempt looks like this:
| Scenario | Cost per attempt | Cost until it's right |
|---|---|---|
| Economy model, right on the third try | about US$ 0.40 | US$ 1.20 plus two rounds of human review |
| Strong model, right on the first try | about US$ 2.00 | US$ 2.00 and one review |
Illustrative values calculated from the official price tables of August 2026. The middle column is not what decides.
The math above uses August prices. In Anthropic's official November 2026 table, Opus 5.5 costs US$ 4 input and US$ 20 output per million tokens, which puts the strong model's attempt at this task at about US$ 1.60. Haiku 5.5 is listed at US$ 0.10 and US$ 0.50, but that price only applies to prompts of up to 100,000 tokens; the 200,000-token task in the example falls outside that range and pays US$ 0.50 input and US$ 2.50 output, about US$ 0.20 per attempt (US$ 0.60 over three). With November numbers, the difference in tokens is close to US$ 1.00, still small next to the cost of one round of human review.
In the August math, the US$ 0.80 difference in tokens is irrelevant next to two extra rounds of human review. If each round takes 20 minutes of a senior person's time, the "economy" model cost dozens of times more than the savings it promised.
This doesn't mean using the most expensive model for everything. It means applying the right yardstick:
- Is a mistake here expensive or visible? Use the strongest model. Architecture, data migration, a screen the client sees.
- Is a mistake here caught by an automated test? Use the cheapest one that passes. CRUD, component variations, pattern migration.
- Is the task long and unsupervised? Prioritize autonomy and completion rate, not output speed.
- Is the task exploratory, with a human alongside? Prioritize speed and a fast first token, because iteration is the product.
Five cost details almost nobody considers
Context caching changes the math. Reusing the same context between calls costs a fraction of the normal input price, and writing to the cache costs a bit more than regular input. In agent flows, which reread the same set of files many times, this is the biggest savings lever available, bigger than switching models.
Batch processing usually gives a 50% discount. Tasks that don't need an immediate answer, like generating documentation or sweeping the repository for a pattern, shouldn't pay real-time prices.
Counting tokens across different vendors is not a fair comparison. Different models tokenize the same text in different ways: Anthropic itself warns that, starting with Claude 4.7, the new tokenizer produces about 30% more tokens for the same text than that of previous generations. Comparing price per million tokens across different families without measuring the real consumption of your workload leads to the wrong conclusion.
The same model costs differently depending on where you buy it. In the independent measurement, the same frontier model shows a cost per task about 36% higher when served by a partner cloud instead of the manufacturer's own API, with practically identical speed. If your contract pushes consumption to a marketplace, that goes into the math.
Promotional pricing has a deadline, and the outcome isn't always what was announced. Claude Sonnet 5 launched with an introductory price of US$ 2 input and US$ 10 output per million tokens until August 31, 2026, with an increase planned to US$ 3 and US$ 15 on September 1. The increase didn't happen: Anthropic made the introductory price the standard price. Whichever way it goes, a budget closed on a launch rate needs to check the validity and the outcome on the official pricing page before it becomes a contract.
How to set up routing in practice
Start with two, and adjust effort first. A strong model to decide and an economy model to execute tasks that are already decided and verifiable by tests. Even before that, test one effort level below what you already use (check your model's default first): it's usually the quickest savings available, without moving anything around.
Measure before you opine. Record, by task type, the time to completion, how many interventions were needed and how much rework showed up afterwards. Without this record, the model discussion becomes personal preference.
Specialize where the data says. Only create a third lane when there's a measurement showing it pays for its complexity cost. Too much routing is as expensive as too little, because every new lane is more configuration to maintain.
Automate by task type, not by mood. Agent tools let you fix the model and effort level per subagent. This takes the decision out of the heat of the moment and puts it in the project configuration, where it can be reviewed with data.
What the tools already offer out of the box
You don't need to build routing from scratch. The two-lane pattern is already built into several tools, which is a good sign that the practice has taken hold:
- Model per subagent. Agent tools let you declare the model, and in some cases also the effort level, in each subagent's definition. The economy model is reserved for exploration and reading tasks, which are the most voluminous.
- Model per mode. There are aliases that use the strong model during planning and automatically switch to a lighter model during execution. It's the separation between deciding and implementing, solved by configuration.
- Separate architect and editor roles. A popular command-line tool formally separates the model that proposes the solution from the model that turns the proposal into file edits. In the project's own benchmark, the architect-plus-editor pair beat the model on its own, 85.0% against 79.7%. The result is from 2024 and uses models that have since been replaced, so it counts as a methodological precedent, not a current number. The authors themselves note that the winning configuration was too slow for interactive use.
Does an automatic router solve it?
There are routers that classify each request and pick the model on their own. Before adopting one, it's worth knowing the independent evaluation.
A study that compared twelve routers, commercial and open, concluded that none of them reaches the result of the ideal router, and that current routers are inefficient precisely at what they promise: recognizing when the smaller model would be enough. The best cases delivered about 35% lower cost with less than 2% loss in accuracy. The worst cost almost four times the baseline.
Add a product detail to that: the documentation of a popular commercial router records that its higher-quality modes cost two to four times the economy mode. Automatic routing isn't always sold as savings.
The 85% to 98% reduction figures that circulate come from 2023 and 2024 papers, with model pairs that are now obsolete and a strong-vs-weak price gap different from 2026's. They remain valid as a demonstration that the idea works, and invalid as a prediction of your result.
The practical conclusion: explicit routing by task type, decided by you, is more predictable today than an automatic router. Adopt the automatic one when it saves in a measured way on your workload, not because its page promises it.
The controlled test that settles the debate
If the team disagrees about which model to use at a stage, the way forward isn't debate: it's measurement. An honest test fits in an afternoon.
- Pick five to ten real tasks representative of the stage in dispute
- Fix the harness: same tools, same context, same test commands
- Run each task with each model, without helping them differently
- Record time to completion, interventions, rework and token cost
- Judge the result with a third model, blind to who executed
- Only then compare, and compare cost per accepted delivery, never cost per token
The fixed-harness item is what separates a test from an anecdote. If one model ran with access to the tests and the other didn't, you measured the configuration, not the model.
Five routing mistakes we see often
Choosing by this week's benchmark. A benchmark result belongs to the model-plus-harness pair, under a specific protocol. It guides, it doesn't decide. What decides is the test on your codebase.
Using the strongest model for everything. It works and it's expensive. Worse: it gets the team used to not thinking about the cost of a mistake, which is precisely the yardstick that should guide the decision.
Using the cheapest model for everything. It saves on the wrong line. The cost moves from tokens to people's hours, where it's bigger and less visible in the budget.
Switching models instead of fixing the context. When the agent fails because it doesn't know the project's pattern, no model solves it. Context and tools do.
Letting the executor review its own work. It's the savings that costs the most, because the error that goes unnoticed reaches the client.
Frequently asked questions
Not in a useful way. A model can lead in reasoning and lose in iteration speed, and a fast model can be terrible at architecture decisions. The choice depends on the stage, the cost of a mistake at that point and how much human time the stage consumes.
No. They measure part of the latency. What matters is the time until the task is done, how many human interventions were needed, how much rework showed up afterwards and how long the developer had to keep watching.
The interactive one answers almost instantly and keeps the developer at the wheel, with many short instructions. The autonomous one takes longer per answer, but accepts a broad task and works on its own for several minutes. Both are useful, at different moments.
Not always. The real cost is the cost per accepted delivery, which includes the attempts, human review time and rework. A more expensive model that gets an architecture decision right the first time usually ends up cheaper than an economy model that gets it right on the third try.
It's everything around the model: tools, context, test commands, validations and the execution loop. The same model delivers different results in different harnesses, which means comparing models without fixing the harness compares two things at once.
Start with just two lanes: a strong model to decide and an economy model to execute tasks that are already decided and verifiable by tests. Only add a third lane when there is measured data showing it pays for its complexity cost.
Conclusion
The question "which is the best AI for software development" keeps being asked because it's comfortable: one answer, one subscription, one decision closed. The honest answer is less comfortable and more useful.
There's a better model for deciding architecture, another for iterating on an interface with a human alongside, another for producing verifiable volume and another for reviewing what the previous ones did. The skill that separates teams is not picking the leader of the ranking. It's knowing which stage each task is in and which mistake is expensive there.
Teams that master this stop asking which model to use and start asking what that stage needs. It's a better question, and it still holds when the ranking changes again next month.
References
- Artificial Analysis: methodology for measuring speed, latency and cost per task
- Anthropic: official model selection guide
- Anthropic: optimizing for cost and intelligence
- Anthropic: effort parameter and reasoning control
- Anthropic: official price table and cache multipliers
- OpenAI: API pricing and reasoning effort control
- Google: Gemini API pricing
- Claude Code: model and effort per subagent
- Aider: architect-plus-editor mode benchmark
- RouterArena: independent evaluation of model routers
- RouteLLM, LMSYS and FrugalGPT
Prices and measurements checked on August 6, 2026. Updated on November 11, 2026: outcome of the Claude Sonnet 5 introductory price, Anthropic's November prices, effort switching that preserves the cache and current guidance from Anthropic's cost guide. Model price tables change in weeks: confirm at the source before closing a budget. The cost-per-task figures cited come from the Artificial Analysis methodology and are not equivalent to price per token.





