Use case provisional data

Best AI models for code: benchmark comparison

Fixing real bugs and writing code that passes tests. SWE-bench Verified is the most used yardstick, but the agent setup changes results a lot.

Direct answer: On SWE-bench Verified, the top score among the models on this page is Claude Opus 4.7, with 83.5%, per Epoch AI.

How to read this table

  1. Each row is a model. ClickTap the name to open the full page, with sources and version history. ClickTap a header to sort.
  2. Benchmark scores are percentages, and higher is better. I always compare the same metric, from the same source, in the latest version we checked. In this section, in the 90% to 100% range, I treat a gap of 1 or 2 points as possible measurement noise.
  3. The "?" next to each column explains what it measures and when it matters. "No data" means there is no measurement in the open sources this section uses. "Provisional data" marks a field derived by a rule, such as use case.
  4. Input and output prices are the OpenRouter list price, in US dollars per 1 million tokens, and the two can differ a lot. The "to check" badge marks an odd value in the source, which is left out of recommendations. Usage is the token share in OpenRouter's public ranking, for the latest day published by that source. Downloads are the official Hugging Face repository's 30-day window. Epoch's GPQA Diamond and OpenRouter's GPQA Diamond measure the same test, but they can differ.
Code ClickTap a header to sort.
?what it is?????????
Claude Opus 4.7AnthropicclosedUS$ 5.00US$ 25.001,000,00090.2%83.5%77.8%51.7%no datano data
GPT-5.5OpenAIclosedUS$ 5.00US$ 30.001,050,00094%80.6%74.7%63%no datano data
Gemini 3.5 FlashGoogleclosedUS$ 1.50US$ 9.001,048,57692.8%79.3%73%66.2%no datano data
GLM-5.2Zhipu AI (Z.ai)openUS$ 0.007 to checkUS$ 6.801,048,57691.9%78.7%76.7%34.2%0.43%no data
Claude Opus 4.6AnthropicclosedUS$ 5.00US$ 25.001,000,00090.5%78.7%75.8%47%no datano data
DeepSeek V4 ProDeepSeekopenUS$ 0.96US$ 1.911,048,57691.7%77.6%78.6%52.9%0.66%no data
Qwen3.7 MaxAlibabaclosedUS$ 1.48US$ 4.421,000,00090.9%77.3%72%55.8%no datano data
GPT-5.4OpenAIclosedUS$ 2.50US$ 15.001,050,00093.3%76.9%75%45.1%no datano data
Kimi K2.6Moonshot AIopenUS$ 0.65US$ 3.41262,14490.8%76.7%74.9%34.9%no datano data
Claude Opus 4.5AnthropicclosedUS$ 5.00US$ 25.00200,00086%76.7%76.6%45.7%no datano data
Qwen 3.6 Max (Preview)Alibabaundisclosedno datano datano data87.4%76.7%no data52%no datano data
Gemini 3.1 ProGoogleclosedUS$ 2.00US$ 12.001,048,57694.4%75.6%77%73.5%no datano data
Gemini 3 FlashGoogleclosedno datano datano data89.4%75.4%no data66.8%no datano data
Claude Sonnet 4.6AnthropicclosedUS$ 3.00US$ 15.001,000,00087.4%75.2%74.8%35.5%no datano data
GPT-5.3-CodexOpenAIclosedUS$ 1.75US$ 14.00400,000no data74.8%75.3%no datano datano data
GLM 5.1Zhipu AI (Z.ai)openUS$ 1.40US$ 4.40204,80089.9%74.2%75.8%34%no data867,145
GPT-5.2OpenAIclosedUS$ 1.75US$ 14.00400,00091.4%73.8%no data37.1%no datano data
Kimi K2.5Moonshot AIopenUS$ 0.53US$ 3.33262,14487.6%73.8%73.8%34.3%no data393,277
GPT-5OpenAIclosedUS$ 1.25US$ 10.00400,00086.2%73.6%70.7%50.1%no datano data
Claude Opus 4.1AnthropicclosedUS$ 15.00US$ 75.00200,00077.3%73.3%no datano datano datano data
Gemini 3 ProGoogleclosedno datano datano data92.6%72.9%no datano datano datano data
GLM 5Zhipu AI (Z.ai)openUS$ 1.00US$ 3.20204,80087.8%72.1%76.9%no datano data1,370,207
Claude Sonnet 4.5AnthropicclosedUS$ 3.00US$ 15.001,000,00082.3%71.3%74.9%30.7%no datano data
Claude Opus 4Anthropicclosedno datano datano data76.3%70.7%no datano datano datano data
GPT-5.1OpenAIclosedUS$ 1.25US$ 10.00400,00087.6%68%80%48%no datano data
GPT-5 MiniOpenAIclosedUS$ 0.25US$ 2.00400,00075%64.7%72.4%21.6%no datano data
o3OpenAIclosedUS$ 2.00US$ 8.00200,00081.8%62.3%no data49.4%no datano data
Claude 3.7 SonnetAnthropicclosedno datano datano data79.7%61%no datano datano datano data
Qwen3.6 PlusAlibabaclosedUS$ 0.33US$ 1.951,000,00088.4%57.9%no data44.1%no datano data
Gemini 2.5 ProGoogleclosedUS$ 1.25US$ 10.001,048,57685.3%57.6%60%no datano datano data
GPT-4.1OpenAIclosedUS$ 2.00US$ 8.001,047,57666.9%48.5%52.3%31.1%no datano data
GPT-4oOpenAIclosedUS$ 2.50US$ 10.00128,00049.2%31%43.2%26%no datano data
Qwen3-CoderAlibabaopenUS$ 0.30US$ 1.00262,144no datano data48%no datano data58,791
Seed-2.0-CodeByteDanceundisclosedno datano datano datano datano datano datano datano datano data
Codestral 2508Mistral AIundisclosedUS$ 0.30US$ 0.90256,000no datano datano datano datano datano data
Devstral 2 2512Mistral AIopenUS$ 0.40US$ 2.00262,144no datano datano datano datano data6,656
Kimi K2.7 CodeMoonshot AIopenUS$ 0.60US$ 3.50262,14487.9%no data77.3%36.5%no data91,687
GPT-5.1-CodexOpenAIundisclosedUS$ 1.25US$ 10.00400,000no datano datano datano datano datano data
GPT-5.1-Codex-MaxOpenAIundisclosedUS$ 1.25US$ 10.00400,000no datano datano datano datano datano data
GPT-5.1-Codex-MiniOpenAIundisclosedUS$ 0.25US$ 2.00400,000no datano datano datano datano datano data
GPT-5.2-CodexOpenAIundisclosedUS$ 1.75US$ 14.00400,000no datano datano datano datano datano data
Qwen2.5 Coder 32B InstructAlibabaopenUS$ 0.66US$ 1.0032,768no datano datano datano datano data547,627
Qwen3 Coder 30B A3B InstructAlibabaopenUS$ 0.15US$ 0.60262,144no datano data46%no datano data1,679,625
Qwen3 Coder FlashAlibabaundisclosedUS$ 0.20US$ 0.971,000,000no datano datano datano datano datano data
Qwen3 Coder NextAlibabaopenUS$ 0.12US$ 0.80262,144no datano data60.7%no datano data425,899

Which model to use for what

This pick follows the data and changes when the data does.

Code

  • Rule: Highest score on SWE-bench VerifiedClaude Opus 4.7 83.5%
  • Rule: Highest open weights score on SWE-bench VerifiedGLM-5.2 78.7%
  • Rule: Cheapest per 1M input tokens among the top 5 on SWE-bench VerifiedGemini 3.5 Flash US$ 1.50

SWE-bench Verified ?

What does this mean?

What it measures: SWE-bench Verified, on the Epoch AI leaderboard (CC BY 4.0, latest version we checked), is 500 real issues from Python repositories on GitHub. The model has to produce the fix and pass the automated tests. The score is the share of tasks solved.

When it matters: This is the coding yardstick this table uses. I think of it as fixing a real bug in the company repo, not writing a function in isolation. Always compare under the same agent setup, because that setup changes the score.

Compare with

Text · Agents · Image · Video · Voice · Transcription

Sources

  • Epoch AI, CC BY 4.0, latest version we checked.
  • OpenRouter Benchmarks, CC BY 4.0, latest version we checked.
  • OpenRouter, dados públicos da API; exports de benchmarks e rankings em CC BY 4.0, latest version we checked.
  • Hugging Face Hub, metadados públicos do Hub; licença de cada modelo no repositório, latest version we checked.

Dates come from the sources: OpenRouter listing or Hugging Face repo creation, which may differ from the official launch. Family and version were grouped by rule from the name.