Best Models for Coding
Frontier and open-weight models for code generation, review, and agentic coding — compared by price and context window
| Features | |||||
|---|---|---|---|---|---|
MiniMax | $0.30 | $1.20 | $0.06 | ||
NovitaAI | $0.30 | $1.20 | $0.06 | ||
Google AI Studio | $2.00 | $12.00 | $0.20 | ||
Azure | $1.75 | $14.00 | $0.17 | ||
OpenAI | $1.75 | $14.00 | $0.17 | ||
Azure | $1.75 | $14.00 | $0.17 | ||
OpenAI | $1.75 | $14.00 | $0.17 | ||
Azure | $2.50 | $15.00 | $0.25 | ||
OpenAI | $2.50 | $15.00 | $0.25 | ||
Mistral AI | $0.10 | $0.30 | — | ||
Mistral AI | $0.40 | $2.00 | — | ||
Mistral AI | $0.30 | $0.90 | — | ||
Quartz | $2.00 | $12.00 | $0.20 | ||
Google AI Studio | $2.00 | $12.00 | $0.20 | ||
Google Vertex AI | $2.00 | $12.00 | $0.20 | ||
AWS Bedrock(jp) | $3.30 | $16.50 | $0.33 | ||
Anthropic | $3.00 | $15.00 | $0.30 | ||
AWS Bedrock(global) | $3.00 | $15.00 | $0.30 | ||
AWS Bedrock(us) | $3.30 | $16.50 | $0.33 | ||
AWS Bedrock(eu) | $3.30 | $16.50 | $0.33 | ||
AWS Bedrock(au) | $3.30 | $16.50 | $0.33 | ||
AWS Bedrock | $3.00 | $15.00 | $0.30 | ||
Vertex AI (Anthropic) | $3.00 | $15.00 | $0.30 | ||
AWS Bedrock(eu-west-2) | $3.30 | $16.50 | $0.33 | ||
Alibaba Cloud | $0.30 | $1.50 | $0.06 | ||
Alibaba Cloud(cn-beijing) | $0.14 | $0.57 | $0.03 | ||
Alibaba Cloud(us-virginia) | $0.14 | $0.57 | $0.03 | ||
Alibaba Cloud(singapore) | $0.30 | $1.50 | $0.06 | ||
Vertex AI (OpenAI-compatible) | $0.60 | $2.20 | — | ||
Alibaba Cloud(cn-beijing) | $0.43 | $2.01 | — | ||
Z AI | $0.60 | $2.20 | $0.11 | ||
EmberCloud | $0.38 | $1.98 | $0.19 | ||
NovitaAI | $0.60 | $2.20 | $0.11 | ||
Cerebras | $2.25 | $2.75 | — | ||
Alibaba Cloud | $0.43 | $2.01 | — | ||
ByteDance | $0.60 | $2.20 | $0.11 | ||
Together AI | $0.45 | $2.00 | — | ||
Alibaba Cloud | $0.57 | $1.71 | $0.11 | ||
Vertex AI (OpenAI-compatible) | $0.56 | $1.68 | $0.06 | ||
DeepInfra | $0.26 | $0.38 | $0.13 | ||
Alibaba Cloud(singapore) | $0.57 | $1.71 | $0.11 | ||
ByteDance | $0.28 | $0.42 | $0.06 | ||
DeepSeek | $0.28 | $0.42 | $0.03 | ||
Nebius AI | $0.30 | $0.45 | — | ||
NovitaAI | $0.27 | $0.40 | $0.13 | ||
Alibaba Cloud(cn-beijing) | $0.29 | $0.43 | $0.06 | ||
OpenAI | $0.25 | $2.00 | $0.02 | ||
Azure | $0.25 | $2.00 | $0.02 | ||
Azure | $1.25 | $10.00 | — | ||
OpenAI | $1.25 | $10.00 | — |
The best coding models combine strong code generation with reliable tool calling, since modern coding agents lean on function calls to edit files and run commands. This page tracks the models developers actually ship with: Anthropic's Claude series, OpenAI's Codex line, Google's Gemini Pro, and fast-improving open-weight options like Qwen3 Coder, Kimi K2.7 Code, GLM, and DeepSeek.
Access every one of them through a single OpenAI-compatible API with automatic failover, so your coding agent, IDE plugin, or CI pipeline can switch between frontier and budget models without code changes — and you can track exactly what each tool spends.
Frequently asked questions
What is the best LLM for coding?
Claude Sonnet 5 and Claude Opus 4.8 lead most real-world coding evaluations, with OpenAI's GPT-5.3 Codex and Google's Gemini 3.1 Pro close behind. Among open-weight models, Qwen3 Coder, Kimi K2.7 Code, GLM-5.2, and DeepSeek V4 deliver strong results at a fraction of the price.
What is the cheapest model that is still good at coding?
Qwen3 Coder 30B (about $0.07 per million input tokens), GLM-4.7 Flash, and DeepSeek V4 Flash are the standouts for budget coding. They handle everyday completion, refactoring, and code review well and are cheap enough to run on every commit.
Can I use these models with coding agents like Cline or Aider?
Yes. Any agent that supports an OpenAI-compatible endpoint or custom base URL can route through LLM Gateway with one API key — that includes Cline, Aider, Roo Code, and devpass-code — so you can mix models per task and see per-agent cost analytics.
Do coding models need tool calling?
For agentic workflows, yes. Editing files, running tests, and searching a repo all happen through function calls, so pick a model with reliable tool calling — the capability icons in the list above show which provider mappings support tools. For plain autocomplete or one-shot generation, tool calling is optional.