env.dev

AI & LLM Coding Model Comparison

Compare 2026 coding LLMs: Claude Fable 5, GPT-5.6 Sol/Terra/Luna, Opus 4.7, Sonnet 4.6, Gemini 2.5, DeepSeek. Pricing, benchmarks, and use cases.

The July 2026 coding-model lineup is the first one where the question is no longer which model can write code but which model can run inside an agent for hours without veering off. Anthropic's ladder now tops out above Opus: Claude Fable 5, the Mythos-class model at $10 / $50 per million tokens, leads the hardest long-horizon agentic work, with Opus 4.7, Sonnet 4.6, and Haiku 4.5 below it. OpenAI's current line is GPT-5.6 (July 9, 2026) — its first named tiers, Sol ($5 / $30), Terra ($2.50 / $15), and Luna ($1 / $6), with OpenAI-published agent benchmarks that leapfrog Fable 5 on several suites. Google's Gemini 2.5 Pro keeps the price-per-million advantage and the 1M context window but is still behind on the agentic-coding benchmarks that decide whether a model can run a Cursor agent or Claude Code session unattended.

This page is the comparison we use internally when picking a default model for a tool. All prices and context sizes link to the vendor's own pricing page; verify before you write a contract. Benchmarks are the published-by-vendor numbers with the harness named — read them as marketing-with-receipts, not gospel.

June 9, 2026: Anthropic shipped Claude Fable 5, a Mythos-class tier above Opus — the same model as the restricted Mythos 5, with safeguards that fall back to Opus 4.8 on high-risk topics. It enters the table at the top; the full breakdown is in our Fable 5 release dispatch.

July 9, 2026: OpenAI answered with GPT-5.6 — its first named tiers, Sol / Terra / Luna, with Sol at half Fable 5's input price and OpenAI-published agent scores above it. The three tiers are in the table below; the launch, the government-preview backstory, and the full benchmark set are in our GPT-5.6 release dispatch.

2026 coding model comparison

ModelContextInput / Output (per 1M tokens)Benchmark (vendor-published)Best for
Claude Fable 51M$10 / $5080.3% (SWE-Bench Pro)Multi-day autonomous agents, hardest migrations
GPT-5.6 Sol1M$5 / $3088.8% (TerminalBench 2.1)Token-efficient agentic coding at flagship quality
GPT-5.6 Terra1M$2.50 / $1584.3% (TerminalBench 2.1)Production APIs, RAG, customer-facing bots
GPT-5.6 Luna1M$1 / $682.5% (TerminalBench 2.1)High-volume, latency-sensitive fanout
Claude Opus 4.7200K (1M tier on request)$15 / $75~80% (SWE-bench Verified)Long-horizon agents, hard refactors
Claude Sonnet 4.6200K$3 / $15~77% (SWE-bench Verified)Default driver for IDE agents
Claude Haiku 4.5200K$1 / $5~73% (SWE-bench Verified)Cheap parallel sub-agents, classifiers
GPT-5400K$1.25 / $1074.9% (SWE-bench Verified)Cost-sensitive agents, tool use
GPT-5 mini400K$0.25 / $2~62% (SWE-bench Verified)High-volume completion, fanout
Gemini 2.5 Pro1M (2M preview)$1.25 / $10 (≤200K)63.8% (SWE-bench Verified)Whole-repo reads, multimodal review
Gemini 2.5 Flash1M$0.30 / $2.50~54% (SWE-bench Verified)Bulk indexing, embeddings-adjacent work
DeepSeek V3.1128K$0.27 / $1.10~66% (SWE-bench Verified)Open-weights baseline, self-host

Prices: see Anthropic pricing, OpenAI pricing, Gemini API pricing, and DeepSeek pricing. Claude Opus 4.7 1M-context tier and Gemini 2.5 Pro >200K context are billed at higher rates — read the pricing page before promising a budget. Each benchmark cell names its suite — SWE-Bench Pro is a harder set than SWE-bench Verified (Anthropic has not published a Verified number for Fable 5), and TerminalBench 2.1 (command-line agent workflows) is the suite OpenAI led its GPT-5.6 launch with. Compare numbers within a suite, never across suites. SWE-bench Verified numbers are vendor-published with the agent harness named where available; the canonical leaderboard lives at swebench.com.

Claude 4 family (Anthropic)

Three tiers, one personality. Opus 4.7 is what you reach for when the task is "rewrite this auth layer across forty files and don't miss anything". The 1M-context tier is opt-in (request access in the console) and roughly doubles the per-token price above 200K. Sonnet 4.6 is the daily driver inside Cursor and Claude Code — strong tool use, reliable diff editing, and in late 2025 became the first model where the SWE-bench Verified score crossed 75% with the open-source mini-SWE-agent harness. Haiku 4.5 is the surprise of the year: it ships ~73% on SWE-bench Verified at $1 / $5 per million, which makes it the first model where you can run dozens of parallel sub-agents without watching the bill.

Tradeoff: Anthropic's pricing is the highest per token of the major families. The justification is agentic reliability — Opus and Sonnet stay on-task across long Claude Code sessions where GPT-5 and Gemini have a higher chance of derailing or asking for confirmation. If your workload is single-shot completions, Anthropic is overpaying. If your workload is hour-long autonomous edits, the gap closes fast.

GPT-5.6 family (OpenAI)

Since July 9, 2026, OpenAI's current line is GPT-5.6 — the first time OpenAI has shipped named tiers instead of a number and a "mini" suffix. Sol ($5 / $30) is the flagship and OpenAI's best coding model to date: 88.8% on TerminalBench 2.1 (91.9% in the submodel-delegating Ultra mode), with a claimed 54% token-efficiency gain on agentic coding over its predecessor. Terra ($2.50 / $15) matches GPT-5.5 quality at half its price and is the tier OpenAI expects most production APIs to land on. Luna ($1 / $6) is the fast tier — on OpenAI's numbers it outscores Claude Opus 4.8 on TerminalBench at a fifth of the input price. All three carry a ~1M context window, finally retiring GPT-5's 400K as the family ceiling. The launch story and the Fable 5 head-to-head are in our GPT-5.6 release dispatch.

Tradeoff: freshness. As of mid-July 2026 every GPT-5.6 number is OpenAI-published launch material and independent evals are only starting to appear — early testers describe Sol as the more predictable daily driver while still crediting Fable 5 with the raw-intelligence edge on the hardest long-horizon work. The older GPT-5 (August 2025, 74.9% SWE-bench Verified at $1.25 / $10) remains available, but for new agent builds the Terra-or-Sol question has replaced the GPT-5-or-Sonnet one.

Gemini 2.5 series (Google)

Gemini 2.5 Pro went GA in June 2025 and remains the cheapest credible million-token model — the first 200K tokens at $1.25 input, anything above at $2.50 input. The 2M-token preview tier is the only commercial option for "dump the whole repo plus dependencies into the prompt" workflows. Gemini 2.5 Flash sits an order of magnitude below Pro on price and is the natural pick for high-volume work where Haiku 4.5 is too expensive.

Tradeoff: Agentic reliability still trails Anthropic and OpenAI. Google's own SWE-bench Verified figure for 2.5 Pro is 63.8% — about ten points below Sonnet 4.6 and GPT-5. Gemini shines for read-heavy work (whole-repo audits, multimodal PR review with screenshots) and is a weaker pick for autonomous multi-file edits. The honest 2026 answer is: use Gemini for context, Claude or GPT-5.6 to do the work.

Open-weights options (DeepSeek, Qwen, Llama)

DeepSeek V3.1 (December 2024 base, March 2026 update) is the practical leader on the open side — ~66% SWE-bench Verified, native function calling, and an MIT-licensed weights drop you can run on a single H100 node with quantisation. Qwen3-Coder (Alibaba, 2025) is the strongest open-weights model for raw code completion in non-English contexts. Llama 3.3 70B remains the safe default for self-hosted deployments where licensing-by-Meta is acceptable but you want CPU-of-last-resort behaviour.

Tradeoff: Tooling. Cursor, Claude Code, Windsurf, and the major IDE agents are tuned for Anthropic and OpenAI APIs. Plugging DeepSeek into Cursor works but the prompt scaffolding is not tuned, so you give up some of the agentic gains the closed models book on the benchmarks. Open-weights wins when privacy or self-hosting is a hard requirement; otherwise the price-per-quality math still favours the commercial APIs in 2026.

Which model should I pick for my coding agent?

  • Default IDE agent (Cursor / Windsurf / Copilot agent mode): Claude Sonnet 4.6. It is the model these tools tune their prompts and skills around in 2026, and it ships the most reliable diff-edit behaviour at a price that survives a team-wide rollout.
  • Long-horizon refactor / multi-hour Claude Code sessions: Claude Opus 4.7 with the 1M context tier, falling back to Sonnet 4.6 once the plan is locked. The price gap is real but the "had to start over twice" gap is bigger if you stay on cheaper models.
  • Cost-sensitive agentic work (a startup, a hobby project): GPT-5.6 Terra at $2.50 / $15, with Luna for fanout. Terra ties Fable 5 on OpenAI's TerminalBench number at a quarter of the input price — even discounted as vendor marketing, the strongest cost-per-quality claim in the table.
  • High-volume fanout (lint bots, batch generation, sub-agents): Claude Haiku 4.5 if you want the Anthropic tooling and the 73% SWE-bench number; Gemini 2.5 Flash if you want the cheapest large-context option; GPT-5.6 Luna if you are already on OpenAI infra — same $1 input price as Haiku with a 1M context window.
  • Whole-repo read / audit / large-context Q&A: Gemini 2.5 Pro. Nothing else lets you put a 1.5M-token codebase into one prompt.
  • Self-hosted / privacy-required: DeepSeek V3.1. The weights are MIT-licensed, the SWE-bench number is the highest of any open model, and the inference stack is well documented.

What changed since the last comparison

  • SWE-bench Verified replaced HumanEval+ as the citable benchmark. HumanEval saturated above 90% across the top three families in 2024 and stopped distinguishing models. SWE-bench Verified, which scores agents on real GitHub issues, is now the number every vendor leads with.
  • The 1M-token tier became normal. Gemini had it first; Anthropic shipped a 1M tier for Sonnet 4 in August 2025 and extended it to Opus 4.7. GPT-5 sat at 400K for almost a year until GPT-5.6 brought the whole OpenAI family to ~1M in July 2026 — every current frontier tier now ships a million-token window.
  • Reasoning-effort knobs are everywhere. GPT-5.6 exposes reasoning effort from none to max. Claude has extended thinking with a token budget. Gemini 2.5 ships thinking on by default with a thinkingBudget parameter. Picking the right setting is now part of picking the model.
  • Open-weights gap halved. DeepSeek V3 closed most of the quality gap to GPT-4-class models in 2024; V3.1 closes most of the remaining agentic gap. The closed-source edge is now harness tuning and tool-use polish, not raw model capability.

Where this connects

Picking a model is the start of the conversation, not the end. The agent harness — hooks, evaluators, skills — does at least as much work as the model upgrade once you are past Level 2 in the Five Levels framework. Day-to-day use of these models in a closed-loop coding environment is documented in our Claude Code and Cursor guides; raw API integration patterns (rate limits, prompt caching, structured outputs) live in our guide to LLM APIs for developers. For the broader landscape and discovery sources, our awesome AI coding lists page is the index.

Frequently Asked Questions

Which LLM is best for coding in 2026?

For the hardest long-horizon agentic work, Claude Fable 5 ($10/$50 per million tokens). For token-efficient flagship coding, GPT-5.6 Sol ($5/$30, 88.8% TerminalBench 2.1 per OpenAI). For agentic IDE work (Cursor, Claude Code, Windsurf), Claude Sonnet 4.6 remains the default at $3/$15. For cost-sensitive production work, GPT-5.6 Terra ($2.50/$15). For whole-repo read-only context, Gemini 2.5 Pro (1M tokens). Pick the model your harness tunes its prompts and skills around.

Claude vs GPT-5.6 vs Gemini — which one for my coding agent?

Claude Fable 5 keeps the raw-intelligence edge on the hardest long-horizon problems per early testers; GPT-5.6 Sol is the more predictable daily driver at half Fable's price, with OpenAI-published agent benchmarks above it and a claimed 54% token-efficiency gain. Sonnet 4.6 still has the strongest harness tuning inside Claude Code and Cursor. Gemini 2.5 Pro is the cheapest 1M-context option but trails on agentic benchmarks — use it for read-heavy work, not autonomous edits.

How much does Claude Fable 5 cost compared to GPT-5.6?

Claude Fable 5 is $10 input / $50 output per million tokens. GPT-5.6 Sol is $5/$30 — half the input price and 60% of the output price — with Terra at $2.50/$15 and Luna at $1/$6. Long-context GPT-5.6 requests bill roughly double, and OpenAI claims a 54% token-efficiency gain for Sol on agentic coding. Always check the vendor pricing pages (anthropic.com/pricing, openai.com/api/pricing) before you write a contract; tiers and surcharges change.

Are open-source LLMs good enough for coding in 2026?

DeepSeek V3.1 hits ~66% on SWE-bench Verified — the highest of any open-weights model — under an MIT licence and runs on a single H100 node with quantisation. Qwen3-Coder is the strongest open model for non-English code completion. Llama 3.3 70B is the safe self-hosted default. The closed-source edge is no longer raw model quality; it is harness tuning and tool-use polish that Cursor and Claude Code book on top of the API.