Best AI model for writing and reviewing code.

prices as of · re-ranked daily · 262 qualifying models

A change across a few files, or a review of someone else's. A lot of repository goes in, a patch comes out, and the model has to be able to run your tools. We count only models with 128k of context or more and tool calling, and 262 of the 337 we track qualify. The cheapest of them costs $0.189 per 1,000 tasks at Nous Portal. They are ranked by what the work costs, not by the price per million tokens, because a model that is cheap to prompt and dear to answer looks different once you know the shape of the job.

The cheapest model that can do this job is Mistral Nemo at Nous Portal: $0.189 per 1,000 tasks, read on 16 Sept 2026.

Cheapest that qualifies

Mistral Nemo

Nous Portal

$0.189per 1,000 tasks

$0.02 / $0.03 per M tokens · $1.43 at list

lowest cost per 1,000 tasks

Cheapest from the maker

Command R7B Arabic

Cohere

$0.525per 1,000 tasks

$0.04 / $0.15 per M tokens · $0.525 at list

bought from the lab that trained it

Most context

DeepSeek V4.1 Flash

TrustedRouter

$0.464per 1,000 tasks

$0.04 / $0.08 per M tokens · $2.10 at list

the longest single call on this list

What actually matters here

128k context or more
The files you are changing, the ones they import and the tests around them add up fast. Below 128k you spend the session dropping things out of the context.
Tool calling required
Reading files, running tests and applying a patch are all tool calls. A model that cannot make them cannot do this job.
Input dwarfs output
More than five tokens go in for every one that comes out, so the input price, and whatever the provider charges for cached input, is what you actually pay.

Cheapest 10 for writing and reviewing code

A coding task is about 8,000 tokens in and 1,500 out. A cost per 1,000 tasks is that multiplied out at the row's own input and output rate. The price beside it is the standard price, three parts input to one part output per million tokens, so the two numbers answer different questions: $0.08 per million tokens is what the model costs, and $0.189 per 1,000 tasks is what the work costs.

Frequently asked

What is the cheapest model for writing and reviewing code?
Mistral Nemo at Nous Portal, $0.189 per 1,000 tasks on $0.02 / $0.03 per million tokens in and out, read on 16 Sept 2026.
How is the cost per unit worked out?
A coding task is about 8,000 tokens in and 1,500 out. Multiply that by 1,000 and price it at each row's own input and output rate. Nothing else is counted: no cache discount, no batch rate, no free tier.
Why do only 262 models qualify?
The job needs 128k of context or more, tool calling. Models that fall short are still in the index, they just cannot do this job as described.
How current are these prices?
Prices are read daily from 212 providers' public catalogs and this ranking recomputes with them. Last refresh: 16 Sept 2026.
Related jobsBest AI model for a chat assistantBest AI model for answering support questionsCheapest models with 128k contextCheapest models with tool calling