Skip to main content
API inference use case

Best LLMs for Coding Agents

Long, mostly cached repository context with high reasoning demands.

Models compared 36
Providers 28
From $1.36 per 1,000 requests

Typical request this page prices

Input tokens
40,000
Of which cached
80%
Output tokens
2,500
What to compare on
Intelligence index · Cached input rate · Output rate · Context window
  • Quality floor: Top 15% of priced models by Intelligence Index (≥ 37.3).
  • Costs use each provider’s current standard rates, with cached tokens at the cached-input rate where one is published. Speed is from Artificial Analysis where measured.

Lowest cost that meets the bar

Models that clear the quality floor, ordered by estimated cost for the request above.

Lowest-cost models for Coding Agents
ModelIntelligenceSpeedCheapest hostInput / output per 1MPer 1,000 requests
GLM-5.3-Flash
Z AI
41.859tok/sPareto Inference
17 providers
$0.060 / $0.200
cached $0.012
$1.36
MiMo-V2.6-Flash
Xiaomi
37.948tok/sDeep Infra
7 providers
$0.140 / $0.280
cached $0.0028
$1.91
GPT-6 Luna
OpenAI
38.1140tok/sGMI Cloud
5 providers
$0.100 / $0.500
cached $0.010
$2.37
Claude Haiku 5.5
Anthropic
43.4238tok/sDigitalOcean
3 providers
$0.100 / $0.500
cached $0.010
$2.37
DeepSeek V4.1 Flash
DeepSeek
39.5215tok/sCrusoe
16 providers
$0.290 / $0.200
cached $0.0070
$3.04
GPT-5.6 Luna
OpenAI
37.3-OpenAI
7 providers
$0.200 / $1.20
cached $0.020
$5.24
MiMo-V2.6-Pro
Xiaomi
46.337tok/sDeep Infra
6 providers
$0.430 / $0.870
cached $0.0036
$5.73
Mistral Large 4 Preview
Mistral
38.4-OpenRouter
1 provider
$0.680 / $2.09
cached $0.070
$12.90

Highest-scoring options

Ordered by Artificial Analysis Intelligence Index, with the cost of the same request.

Highest-scoring models for Coding Agents
ModelIntelligenceSpeedCheapest hostInput / output per 1MPer 1,000 requests
Claude Opus 5.5
Anthropic
57.697tok/sDeep Infra
6 providers
$4.00 / $20.00
cached $0.200
$88.40
Claude Sonnet 5.5
Anthropic
56135tok/sAnthropic
6 providers
$2.00 / $10.00
cached $0.100
$44.20
Claude Fable 5.1
Anthropic
53.472tok/sDigitalOcean
4 providers
$10.00 / $50.00
cached $0.250
$213.00
GPT-6 Astra
OpenAI
52.763tok/sVelokey
7 providers
$3.00 / $15.00
cached $0.300
$71.10
GPT-6.1 Sol
OpenAI
51.865tok/sMicrosoft Azure
6 providers
$2.00 / $10.00
cached $0.100
$44.20
Claude Opus 5
Anthropic
50.8-Velokey
7 providers
$2.00 / $10.00
cached $0.200
$47.40
Claude Fable 5
Anthropic · 1.0M context
49.6-Velokey
6 providers
$4.00 / $20.00
cached $0.400
$94.80
Muse Spark 1.3
Meta
48.1115tok/sOpenRouter
2 providers
$1.25 / $4.25
cached $0.150
$25.43

Compare every model and provider on the LLM API pricing table.

How to choose an LLM for coding agents

A coding agent re-sends most of its context on every turn: the system prompt, tool definitions, the files it has opened and the conversation so far. A single task can run dozens of turns, so input tokens dominate the bill, and most of them are identical to the previous turn. That makes the cached-input rate the line item to compare first, and it is why the cost estimate on this page assumes most of the input is served from the prompt cache.

Model quality matters more here than in most workloads. An agent that produces a wrong edit does not just waste one request; it spends further turns reading test output and undoing the change. The shortlist is therefore limited to the upper end of the intelligence index, and the cost ranking only orders models that clear that bar.

Output volume per turn is modest — a diff, a tool call, a short explanation — but reasoning models can add thinking tokens that are billed as output. If you enable extended reasoning, raise the output assumption accordingly when comparing models.

Frequently Asked Questions

Why does prompt caching matter so much for coding agents?

Each agent turn repeats the previous context plus a little new content. Providers that support prompt caching bill the repeated prefix at a reduced cached-input rate, which on long sessions is the largest share of the token count. Two models with similar list input rates can differ several-fold in practice if only one supports caching.

Should I use the highest-scoring model for every coding task?

Not necessarily. Many teams route planning and hard debugging to a higher-scoring model and use a cheaper one for mechanical edits, test runs and summarising tool output. The two lists on this page show both ends: the cheapest models that clear the quality floor and the highest-scoring models with their cost.

How is the cost per 1,000 requests calculated?

It applies each provider’s current input, cached-input and output rates to the request shape shown on the page, then takes the cheapest provider for each model. Where a provider publishes no cached-input rate, cached tokens are billed at the full input rate.

Related Use Cases

Self-Host Instead: GPU Use Cases