The gap between “best coding model” and “best coding model for you” has never been wider. As of July 2026, the top of the leaderboard belongs to a $10/$50 model that occasionally hands your request to a different model for safety reasons, while the best value pick costs a fifth of that and closes most of the quality gap. Which one you should use depends almost entirely on what your coding workload looks like.
This ranking covers the six models we’d actually recommend, why, and — just as important — the catch on each one.

How we picked
Three rules, consistent with everything on this site:
- Benchmarks with provenance. We weight the hardest, leakage-controlled agentic benchmarks (SWE-bench Pro, Terminal-Bench 2.1, FrontierCode) over saturated ones (SWE-bench Verified is above 90% for the leaders). Vendor-reported numbers are labeled as such; where independent data exists (Artificial Analysis), we cite it.
- Real pricing, per task where possible. Sticker price per token misleads — reasoning models differ several-fold in how many tokens they spend on the same job. Where per-task data exists, it overrides the rate card.
- Generally available only. GPT-5.6 (limited preview, ~20 partners) and Claude Mythos 5 (restricted) don’t qualify. Rankings shift when they do.
The short answer
| Your situation | Pick |
|---|---|
| Hardest long-horizon work, budget allows | Claude Fable 5 |
| Production agents where wrong answers are expensive | Claude Opus 5 |
| High-volume everyday coding | Claude Sonnet 5 |
| Terminal-native / CLI workflows | GPT-5.6 |
| Self-hosting or open-weight mandate | GLM-5.2 |
| Tightest budget per token | Kimi K2.7 Code |
All six, side by side
The one benchmark we weight above all others — SWE-bench Pro, the hardest leakage-controlled agentic coding split — across every pick that has a published score:
And the full decision matrix — pricing and context from each model’s page, benchmarks from the vendors’ published results:
| Model | SWE-bench Pro | Terminal-Bench | Price (in/out per 1M) | Context | License |
|---|---|---|---|---|---|
| Fable 5 | 80.3% | 88.0% (2.1) | $10 / $50 | 1M | Proprietary |
| Opus 5 | 79.2% | — | $5 / $25 | 1M | Proprietary |
| Sonnet 5 | 63.2% | 80.4% (2.1) | $2 / $10 intro | 1M | Proprietary |
| GPT-5.6 Sol | — | 91.91% (2.1) | $5 / $30 | 1.05M | Proprietary |
| GLM-5.2 | 62.1% | — | ~$1.40 / $4.40 | 1M | MIT |
| Kimi K2.7 Code | — (Verified 81.1%*) | — | ~$0.95 / $4.00 | 256K | Modified MIT |
*Vendor-reported. Terminal-Bench versions differ (2.0 vs 2.1) and harnesses differ — treat cross-column comparisons as directional, not decimal-precise.
The reasoning, pick by pick
1. Claude Fable 5 — the capability ceiling
Fable 5’s 80.3% on SWE-bench Pro isn’t a lead, it’s a gap — 11 points over Opus 4.8, 22 over GPT-5.5. The most striking stat is the effort inversion: at low effort it scores 75.0, above Opus 4.8 at max effort (68.6). Stripe’s early-access report — a 50-million-line Ruby migration compressed from two team-months into a day — is the shape of what it unlocks.
Two caveats keep it from being the universal answer. It costs $10/$50 per 1M tokens, double Opus. And its safety classifiers fall back to Opus 4.8 on cybersecurity-adjacent requests — over 95% of sessions never see this, but 20.9% of Terminal-Bench trials did. If you do security engineering, that’s a real tax. (It also spent 18 days offline under a US export-control directive in June — the full story — so regulatory availability is now a genuine variable.)
Strengths: double-digit SWE-bench Pro lead; low-effort mode outperforms rivals’ max; built for days-long asynchronous runs. Watch out: $10/$50 pricing; classifier fallback on security work (20.9% of Terminal-Bench trials); June’s export-control episode makes regulatory risk non-zero.
2. Claude Opus 5 — the new flagship
Opus 5 closes the gap to Fable at unchanged $5/$25: SWE-bench Pro 79.2% (only 1 point behind), Frontier-Bench 43.3% SOTA, ARC-AGI-3 30.2% (4× the next-best). Thinking on by default, OSWorld 2.0 at 70.6% surpasses Fable 5. When wrong answers are expensive and budget is limited, it has already replaced Opus 4.8 as the default.
Strengths: near-Fable capability at half the price; Frontier-Bench and ARC-AGI-3 leader; default thinking mode. Watch out: slightly higher hallucination rate than Opus 4.8; released one week ago, production battle reports still accumulating.
3. Claude Sonnet 5 — the value pick
Sonnet 5 closed most of the gap: 63.2% SWE-bench Pro (above GPT-5.5), an 80.4% Terminal-Bench that jumped 13 points over its predecessor, and knowledge-work parity with Opus — at $2/$10 introductory pricing through August 31. The catch, per Artificial Analysis: it spends ~40% more output tokens and ~3× the agentic turns at max effort, so per-task cost at standard pricing can exceed Opus 4.8. Run it at medium effort for the fleet, and it’s the best price-to-competence ratio on this list.
Strengths: cheapest frontier option through August; beats GPT-5.5 on SWE-bench Pro; 1M context. Watch out: token appetite can flip the per-task math above Opus at standard pricing; new tokenizer counts the same text as 1.0–1.35× more tokens — re-baseline before migrating.
4. GPT-5.6 — the terminal king
GPT-5.6 is now GA with three tiers. Sol ultra holds the Terminal-Bench 2.1 record at 91.91%, making it the clear pick for terminal/CLI workflows. Three pricing tiers let you route by difficulty: Sol ($5/$30) for hard problems, Terra ($2.50/$15) for routine work, Luna ($1/$6) for fast tasks. 1.05M context, natively omnimodal (audio + video input).
Strengths: Terminal-Bench record-holder; three-tier pricing for per-task routing; 1.05M context; natively omnimodal. Watch out: Sol output at $30/1M is still the priciest; SWE-bench Pro data not yet published; Luna struggles on complex tasks.
5. GLM-5.2 — the open-weight leader
GLM-5.2 is the strongest open-weight coder on benchmarks: SWE-bench Pro 62.1%, above GPT-5.5, with a stable 1M context under a pure MIT license with no regional limits. API pricing (~$1.40/$4.40) undercuts every closed pick, and coding-plan subscriptions start at $12.60/month. The cost of ownership is literal: a 753B-parameter MoE needs a multi-GPU node to self-host.
Strengths: open-cluster benchmark leader; MIT license with no strings; stable 1M context; a tenth of frontier pricing via API. Watch out: self-hosting a 753B MoE is a multi-GPU commitment; no published Terminal-Bench score; ecosystem tooling younger than OpenAI/Anthropic’s.
6. Kimi K2.7 Code — the budget agent
Kimi K2.7 Code is a 1T-parameter open-weight MoE (Modified MIT) tuned specifically for coding agents, with native image/video input and reasoning that runs 30% leaner than its predecessor — directly cutting agent-loop costs at **$0.95/$4.00**. The honest caveat: its benchmark story is vendor-reported so far. As a cheap, capable default for high-volume agent traffic, it earns the slot.
Strengths: cheapest per token on this list; ~30% leaner thinking cuts agent-loop bills further; native image/video input for screenshot-to-code. Watch out: benchmarks are vendor-reported (SWE-bench Verified 81.1%, no Pro score); 256K context is the smallest here; Modified MIT has conditions — read them.
What didn’t make the list
- Sakana Fugu — scored 86.0 on SWE-bench Pro, above every single model here — but it’s an orchestration system routing across a model pool, not a model. If you’re open to that architecture, it’s worth a look.
- DeepSeek V4-Pro, MiniMax M3 — strong open options that sit just behind GLM-5.2 on the hardest coding splits; see the 2026 LLM landscape guide for the full field.
- Kimi K3 — the world’s first open 3T-class model (2.8T MoE, 104B active), but its custom license and 64+ GPU requirement limit practical adoption.
- Inkling — 975B MoE, Apache 2.0, from Thinking Machines Lab (Mira Murati); positioned as a fine-tuning base, not a frontier competitor.
A note on volatility: this list reflects benchmarks and pricing as of July 29, 2026.
Changelog
- 2026-07-29 — July update: Opus 5 replaces Opus 4.8; GPT-5.6 GA replaces GPT-5.5; added Kimi K3 and Inkling to honorable mentions.
- 2026-07-02 — Initial ranking published: Fable 5 · Opus 4.8 · Sonnet 5 · GPT-5.5 · GLM-5.2 · Kimi K2.7 Code. Reflects Sonnet 5’s June 30 launch and Fable 5’s July 1 return to availability.
Frequently asked questions
What is the best LLM for coding right now?
On raw capability, Claude Fable 5 — its 80.3% on SWE-bench Pro leads every rival by double digits as of July 2026. For most day-to-day work, Claude Sonnet 5 delivers close-to-Opus coding at $2/$10 introductory pricing, which is why we rank Fable best overall and Sonnet best value.
What is the best free or open-weight LLM for coding?
GLM-5.2 leads the open cluster on coding benchmarks (SWE-bench Pro 62.1%, above GPT-5.5's 58.6%) under a pure MIT license. Kimi K2.7 Code is the budget agent pick at ~$0.95/$4.00 per 1M tokens. Both are open weights you can self-host, though each is a large MoE that realistically needs a multi-GPU node.
Is Claude better than GPT for coding?
On repository-level benchmarks, yes — Claude Fable 5, Opus 4.8 and Sonnet 5 all beat GPT-5.5 on SWE-bench Pro as of July 2026. GPT-5.5 keeps one clear win, terminal/CLI agent work on its Codex CLI harness (83.4%), and it accepts audio and video input, which no Claude does.
Which coding LLM is cheapest to run?
Among our picks, Kimi K2.7 Code (~$0.95/$4.00 per 1M tokens) is cheapest per token, followed by GLM-5.2 (~$1.40/$4.40, or $12.60/month coding plans). Among closed models, Claude Sonnet 5's $2/$10 introductory pricing (through August 31, 2026) is the lowest sticker price — but re-baseline per-task cost, because Sonnet 5 spends more tokens per job at high effort.
How often is this ranking updated?
We re-check picks when major models ship or pricing changes. This ranking reflects benchmarks and prices as of July 2, 2026 — after Claude Sonnet 5 (June 30) and the return of Claude Fable 5 (July 1), and before GPT-5.6 exits limited preview.