Best AI Coding Models 2026: Top 12 Ranked on SWE-Bench
Want to go deeper than this article?
Free account unlocks the first chapter of all 25 courses — RAG, agents, MCP, voice AI, MLOps, real GitHub repos.
Picked your coding model? Build a real AI dev workflow. From local copilots to agents that ship code — the structured path, running on your hardware. First chapter free.
Last updated September 29, 2026. Every figure below is quoted from a public leaderboard or a vendor's own documentation, with the link next to it. This site did not run any of these benchmarks.
Quick answer: which AI coding model ranks first?
On the official SWE-bench Verified leaderboard, the highest score in the like-for-like comparison (every model driven by the same minimal agent, mini-SWE-agent 2.0) is Claude 4.5 Opus at 76.8%, followed by Gemini 3 Flash and MiniMax M2.5 at 75.8% and Claude 4.6 Opus at 75.6%. That board was last updated on February 26, 2026, so it does not yet include the models the three big vendors sell today: Claude Opus 5.5, GPT-6 Astra and Gemini 3.8 Flash.
So the honest answer has two parts. The ranking below is the newest independent one that exists. The model to actually use is usually the current successor of whatever ranks well, and the second table lists those with their real prices. If you want to run a model on your own machine instead, skip to the local ranking.
Reading articles is good. Building is better.
Free account = the first chapter of all 25 courses, with a per-chapter AI tutor. No card.
SWE-bench Verified ranking: the top 12
SWE-bench Verified is a human-filtered set of 500 real GitHub issues. A model is given the repository and the issue text and has to produce a patch that makes the project's tests pass. The rows below all use the leaderboard's bash-only setting: one simple agent loop, no custom tooling, so the difference between rows is the model and not the scaffolding around it.
| Rank | Model | % resolved | Maker | Entry date |
|---|---|---|---|---|
| 1 | Claude 4.5 Opus (high) | 76.8 | Anthropic | 2026-02-17 |
| 2 | Gemini 3 Flash (high) | 75.8 | 2026-02-17 | |
| 2 | MiniMax M2.5 (high) | 75.8 | MiniMax | 2026-02-17 |
| 4 | Claude 4.6 Opus | 75.6 | Anthropic | 2026-02-17 |
| 5 | GLM 5 (high) | 72.8 | Z.ai | 2026-02-17 |
| 5 | GPT 5.2 (high) | 72.8 | OpenAI | 2026-02-17 |
| 5 | GPT 5.2 Codex | 72.8 | OpenAI | 2026-02-19 |
| 8 | Claude 4.5 Sonnet (high) | 71.4 | Anthropic | 2026-02-17 |
| 9 | Kimi K2.5 (high) | 70.8 | Moonshot AI | 2026-02-17 |
| 10 | DeepSeek V3.2 (high) | 70.0 | DeepSeek | 2026-02-17 |
| 11 | Gemini 3 Pro | 69.6 | 2026-02-26 | |
| 12 | Claude 4.5 Haiku (high) | 66.6 | Anthropic | 2026-02-17 |
Source: swebench.com, Verified board, mini-SWE-agent 2.0.0 entries, read on September 29, 2026.
Three things to take from it:
- The top four are inside 1.2 points of each other. With 500 tasks, one point is five issues. Do not choose between those models on this number.
- Custom agents score higher than the bare model. The same board lists Claude 4.5 Opus at 79.2% inside two third-party agent systems. When a vendor quotes a bigger number than the table above, it is usually a different harness, not a different model.
- SWE-bench is a Python benchmark. The original dataset is 2,294 problems from 12 Python repositories (paper), and Verified is a subset of it. It says little about how a model handles TypeScript, Go or Rust. For those, see the multi-language boards below.
For a longer explanation of how the benchmark is built and where it misleads, see SWE-bench explained.
Current models the leaderboard has not scored yet
Every model in the ranking above has since been replaced or joined by a newer one. These are the models the vendors list as current, with the prices and limits from their own documentation. None of them has an entry on the official SWE-bench Verified board yet, so this table has no score column.
| Model | Maker | Input / output per 1M tokens | Context window | How the vendor describes it |
|---|---|---|---|---|
| Claude Opus 5.5 | Anthropic | $4 / $20 | 1M | Long-running agentic coding and knowledge work |
| Claude Sonnet 5.5 | Anthropic | $2 / $10 | 1M | Best combination of speed and intelligence |
| Claude Haiku 4.5 | Anthropic | $1 / $5 | 200K | Fastest model |
| GPT-6 Astra | OpenAI | $10 / $50 | 1.05M | Flagship for complex reasoning and coding |
| GPT-6.1 Sol | OpenAI | $2 / $10 | 1.05M | Balance of intelligence and cost |
| GPT-6 Luna | OpenAI | $0.10 / $0.50 | 1.05M | Cost-sensitive, high-volume work |
| Gemini 3.8 Flash | $0.75 / $3.75 until Dec 31, 2026, then $1.50 / $7.50 | 1,048,576 in, 65,536 out | Long-horizon software engineering and agents | |
| Gemini 3.1 Pro (preview) | $2 / $12 up to 200K tokens, $4 / $18 above | 1,048,576 in, 65,536 out | Third-generation Pro model |
Sources: Anthropic models overview and pricing; OpenAI models and pricing (short-context standard rates); Gemini API pricing. Read on September 29, 2026. Prices change, so check the vendor page before you budget.
Anthropic released Claude Opus 5.5 on September 22, 2026. Its announcement reports 66.4% on Terminal-Bench 4.0, against 57.9% for GPT-6 Astra and 52.3% for the previous Claude Opus 5. That is a vendor's own measurement of its own model, published in a launch post. Treat it as a claim to be checked, not as an independent ranking.
Older models named on earlier versions of this page have been superseded: Claude 4 Sonnet and Claude Opus 4 are retired on Anthropic's own API, and GPT-5.5 is now listed by OpenAI as a previous-generation model at $5 / $30.
SWE-Bench Pro: the harder, multi-language ranking
SWE-Bench Pro, run by Scale AI, uses 1,865 tasks from 41 repositories and covers Python, Go, JavaScript and TypeScript. Scores are much lower than on Verified, which is the point: the tasks are longer and less likely to have leaked into training data.
| Rank | Model | Score (public set) |
|---|---|---|
| 1 | Muse Spark 1.1 | 61.50 ± 3.10 |
| 1 | GPT-5.4 (xHigh) | 59.10 ± 3.56 |
| 3 | Muse Spark | 55.00 ± 3.60 |
| 3 | Claude Opus 4.6 (thinking) | 51.90 ± 3.61 |
| 5 | Gemini 3.1 Pro (thinking) | 46.10 ± 3.60 |
| 5 | Claude Opus 4.5 | 45.89 ± 3.60 |
| 5 | Claude 4.5 Sonnet | 43.60 ± 3.60 |
| 10 | GPT-5 (high) | 41.78 ± 3.49 |
| 10 | Qwen3-Coder 480B | 38.70 ± 3.55 |
| 19 | gpt-oss-120b | 16.20 ± 2.67 |
Source: Scale AI SWE-Bench Pro public leaderboard, read September 29, 2026. Ranks are Scale's own and are tied where confidence intervals overlap.
The gap between the two benchmarks is the useful part. A model at 70% on Verified can sit near 40% on Pro. If your work looks like long multi-file changes in a codebase the model has never seen, Pro is the closer match.
Run this on your own machine and stop paying every month
Pay once and keep it. No renewal, no per-token bill, and nothing you feed it ever leaves your hardware.
Local AI model ranking: open-weight coders you can run
These are the open-weight coding models with a working Ollama tag, ordered by the best published agentic-coding score. The "published score" column says who published it, because the difference matters: a number on a model card was measured by the people who built the model, with their own agent setup.
| Rank | Model | Ollama tag | Download | Licence | Published score |
|---|---|---|---|---|---|
| 1 | Qwen3.8 27B | qwen3.8:27b | 18GB | Apache 2.0 | SWE-bench Pro 61.7 (Qwen model card) |
| 2 | Qwen3.6 27B | qwen3.6:27b | 18GB | Apache 2.0 | SWE-bench Verified 77.2, Pro 53.5 (Qwen model card) |
| 3 | Devstral 2 123B | devstral-2:123b | 75GB | see model card | SWE-bench Verified 72.2% (Mistral); 53.8 on swebench.com |
| 4 | Devstral Small 2 24B | devstral-small-2:24b | 15GB | Apache 2.0 | SWE-bench Verified 68.0% (Mistral); 56.4 on swebench.com |
| 5 | Qwen3-Coder 30B | qwen3-coder:30b | 19GB | Apache 2.0 | 51.6 on swebench.com (inside the OpenHands agent) |
| 6 | Qwen3-Coder-Next | qwen3-coder-next | 52GB | Apache 2.0 | No numeric score in the card text |
| 7 | gpt-oss 20B | gpt-oss:20b | 14GB | Apache 2.0 | None for the 20B; gpt-oss-120b scores 26.0 on swebench.com |
| 8 | Qwen2.5-Coder 32B | qwen2.5-coder:32b | 20GB | Apache 2.0 | 9.0 on swebench.com |
Sources: tag names and download sizes from each model's Ollama tags page; licence and parameter counts from the Hugging Face model cards; leaderboard rows from swebench.com. All linked in the notes below.
What each one needs and when to pick it:
- Qwen3.8 27B is the newest release in this list: 27B parameters, 262,144-token native context, and image input. The 18GB download is a 24GB-GPU model. Qwen's card compares it with its own predecessor on SWE-bench Pro (61.7 against 53.5 for Qwen3.6 27B), measured by Qwen with the Claude Code harness. It is a general model, not a code-only one. Our page on Qwen3.8 27B covers the smaller quantizations.
- Qwen3.6 27B has the fullest published coding results of any model this size: 77.2 on SWE-bench Verified, 71.3 on SWE-bench Multilingual and 53.5 on SWE-bench Pro, all self-reported by Qwen using an internal agent. Same 18GB download, same 24GB-GPU class.
- Devstral Small 2 24B is the one to read carefully. Mistral's model card reports 68.0% on SWE-bench Verified; the official leaderboard lists the same model at 56.4%. Both can be true, since the harness differs. Mistral says it runs on a single RTX 4090 or a Mac with 32GB of memory. Details in our Devstral guide.
- Devstral 2 123B is a 75GB download at 4-bit. That is workstation or multi-GPU hardware, not a desktop card.
- Qwen3-Coder 30B is a mixture-of-experts model: 30.5B parameters in total, 3.3B active per token, 262,144-token native context. The 19GB download fits a 24GB GPU. See Qwen3-Coder.
- Qwen3-Coder-Next has 80B parameters in total with 3B active per token. Only a small part of the network runs for each token, but all of it has to be loaded: the smallest Ollama build is 52GB. Earlier versions of this page said it ran in 8GB of memory. That was wrong.
- gpt-oss 20B is OpenAI's open-weight model with 21B parameters, 3.6B of them active. OpenAI's card says it runs within 16GB of memory, which makes it the largest model here that fits a 16GB card with a little room left.
- Qwen2.5-Coder is the older generation and scores poorly as an autonomous agent (9.0% on the official board for the 32B). It is still a sensible choice for inline completion and chat on small hardware, because it ships in sizes nothing newer does:
qwen2.5-coder:7bis 4.7GB andqwen2.5-coder:14bis 9.0GB.
Older models you may still see recommended. Code Llama (codellama:7b to codellama:70b, 3.8GB to 39GB) was trained on data up to January 2024; Meta's card for the 70B says that variant does not support the long 100K context. StarCoder2 15B (starcoder2:15b, 9.1GB) is a completion model, and its own card says instructions such as "write a function that..." do not work well. DeepSeek Coder 33B (deepseek-coder:33b, 19GB) has a 16K context. All three still run. None is a good first choice in 2026.
Picking by graphics card instead of by model? Use the VRAM guides: best coding model for 16GB VRAM, for 24GB, or the full local AI coding models list.
Setup commands
# Pull and run a coding model (24GB GPU class)
ollama pull qwen3-coder:30b
ollama run qwen3-coder:30b
# 16GB card
ollama pull gpt-oss:20b
# 8GB card: completion and chat, not autonomous agents
ollama pull qwen2.5-coder:7b
Set the context length before you connect a coding agent. Ollama's documentation gives the defaults as 4K tokens under 24GB of VRAM, 32K from 24GB to 48GB, and 256K at 48GB and above. Four thousand tokens is not enough for an agent that reads files.
# Start the server with a larger context window
OLLAMA_CONTEXT_LENGTH=64000 ollama serve
# Check what is loaded and how much context it was given
ollama ps
A longer context uses more memory, so a model that fits at 4K may spill out of VRAM at 64K. Editor setup is covered in Continue.dev with Ollama.
Aider polyglot: a ranking across six languages
The Aider polyglot leaderboard scores models on 225 Exercism exercises in C++, Go, Java, JavaScript, Python and Rust, and publishes what each run cost. It was last updated on November 20, 2025, so it covers an older generation than the tables above. It is still the only board here that reports cost per run.
| Model | % correct | Cost of the run |
|---|---|---|
| GPT-5 (high) | 88.0 | $29.08 |
| GPT-5 (medium) | 86.7 | $17.69 |
| o3-pro (high) | 84.9 | $146.32 |
| Gemini 2.5 Pro preview 06-05 (32k think) | 83.1 | $49.88 |
| Grok 4 (high) | 79.6 | $59.62 |
| DeepSeek V3.2-Exp (Reasoner) | 74.2 | $1.30 |
| Claude Opus 4 (32k thinking) | 72.0 | $65.75 |
The DeepSeek row is why this board is worth reading: 74.2% for $1.30, against 84.9% for $146.32 at the top. For everyday work the cheaper model is often the rational choice.
Coding model comparison: how to choose
This section is opinion. It is based on the published numbers and prices above, not on measurements of our own.
- You want the strongest model and the bill is secondary. Start with Claude Opus 5.5 or GPT-6 Astra. Both vendors position them for long agentic coding work. Opus 5.5 costs less than half as much per token.
- You code all day and pay per token. Claude Sonnet 5.5 and GPT-6.1 Sol are both $2 / $10. Gemini 3.8 Flash is cheaper still until the end of 2026.
- Your code cannot leave your machine. With a 24GB GPU, Qwen3.6 27B or Qwen3-Coder 30B. With 16GB, gpt-oss 20B or Devstral Small 2. With 8GB, Qwen2.5-Coder 7B for completion, and a cloud model for anything that needs an agent.
- You are comparing two models a point apart. Stop comparing scores and try both on a task from your own repository. That tells you more than any leaderboard.
For a three-way comparison of the chat products, see ChatGPT vs Claude vs Gemini for coding. To match a task to a model and budget, use the coding model router.
Frequently asked questions
Which GPT model is best for coding?
OpenAI's documentation names GPT-6 Astra as its flagship for complex reasoning and coding, with GPT-6.1 Sol as the lower-cost option at $2 / $10 per million tokens. On the official SWE-bench Verified board the newest OpenAI entries are GPT 5.2 and GPT 5.2 Codex, both at 72.8%.
Which Claude model ranks highest for coding?
On the official board, Claude 4.5 Opus (76.8%) and Claude 4.6 Opus (75.6%). The current models are Claude Opus 5.5 and Claude Sonnet 5.5, which have no leaderboard entry yet. Our Claude model guide compares the tiers.
Which Google model is best for coding?
Google describes Gemini 3.8 Flash as built for long-horizon software engineering. On the official board, Gemini 3 Flash scores 75.8% and Gemini 3 Pro 69.6%, so the cheaper model ranks above the larger one there.
Can a local model match a cloud model?
On published numbers, the best open-weight models are close to where cloud models were a year earlier. Qwen reports 77.2% on SWE-bench Verified for Qwen3.6 27B. That figure is self-reported, and the one open-weight model with both a vendor score and an official leaderboard score (Devstral Small 2) shows a gap of more than eleven points between them. Expect a local model to handle routine edits well and to need more supervision on long tasks.
Why do different sites show different SWE-bench scores for the same model?
Because the score depends on the agent wrapped around the model as much as on the model. The same Claude 4.5 Opus appears on swebench.com at 76.8% with a minimal agent and 79.2% inside a custom one. Always check which harness a number came from.
How often does this ranking change?
The official leaderboard is updated in batches, not continuously; its newest entry is from February 26, 2026. Vendors release models faster than that. This page is updated when either the boards or the vendor price lists change.
Picked your coding model? Build a real AI dev workflow.
From local copilots to agents that ship code — the structured path, running on your hardware. First chapter free.
Liked this? 25 full AI courses are waiting.
From fundamentals to RAG, agents, MCP servers, voice AI, and production deployment with real GitHub repos. First chapter free, every course.
Build Real AI on Your Machine
RAG, agents, NLP, vision, and MLOps - chapters across 25 courses that take you from reading about AI to building AI.
Want the structured version?
Hands-on courses on local AI, from $8.99 a month. The first chapter of each is free.
Keep going
- PILLARBest Local AI for Coding 2026: 10 Models Ranked by VRAM
- 7B vs 14B vs 32B vs 70B for Coding (2026): What Size?
- AI Context Windows: 4K vs 128K vs 1M Tokens Explained (2026)
- Aider + Ollama Setup (2026): Free Local AI Coding Agent
- Best 14B Coding Models (2026): Ranked by HumanEval + VRAM
- Best AI for JavaScript & TypeScript 2026: 10 Models Ranked
- Best AI Models for Python Development 2026: Top 10 Ranked
- Best Claude Model for Coding: Sonnet 5, Opus 4.8, Fable 5
- Best Ollama Model for Coding (2026): Qwen3-Coder Ranked #1
- Best Ollama Model for Coding: Picks by VRAM Tier
Comments (0)
No comments yet. Be the first to share your thoughts!