Picking the coding model is the most-revisited infrastructure decision of 2026, because the market refuses to sit still: all six models in this ranking shipped inside a single eight-week window, between April 21 and June 16, 2026. The stakes are real. The model behind your coding agents sets your cost per merged change, your review burden, and whether a long-horizon refactor finishes or wanders.
This ranking is for teams putting an LLM into production coding work: agentic coding in real repositories, refactors, code review, test generation, and long agent runs, not casual autocomplete. We ranked six serious options across the deployment spectrum: two closed frontier APIs, one frontier-class value play, two open-weights contenders, and one product-locked model. The order optimizes for what most teams shipping software actually need, and each verdict says when a lower-ranked option beats the winner.
TL;DR
For most engineering teams in mid-2026, the best LLM for coding is Claude Opus 4.8. It leads the third-party Artificial Analysis Intelligence Index at 61.4, it tops the agentic coding rows even in a competitor's published comparison table (SWE-bench Pro 69.2, Terminal-Bench 2.1 85.0 in Z.ai's own numbers), and its 1M-token context bills at flat rates with no long-context surcharge, at $5 input and $25 output per million tokens. Pick GPT-5.5 when your agents lean on OpenAI's first-party tool stack: hosted shell, computer use, and MCP under one API. Pick GLM-5.2 when cost or an open-weights mandate drives the decision: MIT-licensed weights within 0.7 points of Opus 4.8 on FrontierSWE at $1.40/$4.40. Gemini 3.5 Flash is the cheapest frontier-class lane at $1.50/$9.00 with full multimodality, and MAI-Code-1-Flash is the pick only inside GitHub Copilot, where it is the token-efficiency standout.
How this ranking was made
Verified July 6, 2026
We ranked for production coding work specifically: agentic coding, refactoring, and long-horizon agent runs, not general chat or reasoning. Every price, spec, and version fact on this page was pulled from the vendors' live pricing pages, model documentation, model cards, and license files, all fetched on the verification date shown here; nothing is quoted from memory or third-party listicles. Where third-party measurement exists (the Artificial Analysis Intelligence Index), we weighted it above vendor tables, and every vendor-run benchmark is labeled as such. Benchmark numbers published by different vendors come from different harnesses and are not directly comparable; we used them to bound the picture, not to decide single ranks. The operational judgments come from BearPlex's model-engineering work building and running coding agents for clients. No vendor paid for placement, and BearPlex sells none of these models. We excluded preview-stage models (Gemini 3.1 Pro), volume tiers that are not primary coding lanes (Claude Haiku, GPT-5.4 mini and nano, Gemini Flash-Lite), and Claude Fable 5, which is addressed in the FAQ.
Agentic coding capability
Performance on long-horizon coding work, weighted toward third-party measurement and cross-vendor tables over each vendor's own launch numbers.
Real cost per completed task
List price per million tokens corrected for measured token consumption per task, since verbose models quietly erase their per-token discount.
Context and codebase-scale work
Usable context window and, just as important, what the long end of that window costs: flat-rate or surcharged.
Deployment flexibility and lock-in
Weights availability, self-hosting path, multi-cloud reach, license terms, and how painful it is to leave.
Production reliability
Failure behavior in agent loops, vision support for screenshot-driven harnesses, and the stability of the feature surface you would build on.
SWE-bench Verified 71.6 vs Haiku 66.6 (Microsoft-run only)
Sweet spot
Hardest agentic work, long-horizon runs
Tool-heavy agents on one platform
Volume coding agents, open-weights mandates
Cost-sensitive multimodal agents
Vision-in-the-loop agents, lowest cost per task
Copilot fleet volume lanes
The ranking
1
Claude Opus 4.8
Anthropic
The strongest verified coding model of mid-2026: top of the third-party leaderboard, flat-rate 1M context, and a failure mode that announces itself.
Opus 4.8 wins on the only evidence hierarchy that matters: third-party first, competitor-published second, vendor-published last. Released May 28, 2026, it holds the top score on the Artificial Analysis Intelligence Index at 61.4, 1.2 points ahead of GPT-5.5 at its highest effort setting. More telling, it leads every agentic coding row of Z.ai's own published comparison for GLM-5.2: Terminal-Bench 2.1 at 85.0, SWE-bench Pro at 69.2, and FrontierSWE at 75.1. When a competitor's launch table concedes the top spot, believe it. The deployment story matches: a 1M-token context window and 128K output at flat rates (a 900K-token request bills the same per-token price as a 9K one), batch at half price, cache reads at 10% of input, and availability across the Claude API, Claude Platform on AWS, Amazon Bedrock, Google Cloud, and Microsoft Foundry. The behavioral edge matters most in agent loops: Anthropic reports it is around four times less likely than its predecessor to let flaws in its own code pass unremarked, which trades silent failures for flagged ones. Its honest weaknesses are price, at 4 to 6x the output rate of the open-weights entries, and a default-high effort setting you should tune per route rather than ship blind.
Best for
Long-horizon agentic coding where task completion and self-flagged errors matter more than token price
Repository-scale context work, since the 1M window carries no long-context surcharge
Teams whose procurement runs through AWS, Google Cloud, or Azure and need the same model on all of them
Not for
High-volume simple completion and extraction lanes, which belong on a cheaper tier
Workloads that must run on infrastructure you control: there are no weights
Cost-dominated agent fleets where GLM-5.2 or Kimi K2.6 delivers most of the capability at a fraction of the output price
Released
May 28, 2026
Context
1M tokens, 128K max output, flat pricing
Pricing
$5 / $25 per 1M tokens ($2.50 / $12.50 batch)
Third-party score
Artificial Analysis Intelligence Index 61.4, the leader
Availability
Claude API, Claude Platform on AWS, Bedrock, Google Cloud, Microsoft Foundry
Reliability claim
About 4x less likely to let its own code flaws pass unremarked (vendor-reported)
Pricing
$5 per million input tokens and $25 per million output on the Claude API, unchanged across the Opus 4.5 through 4.8 line. Batch halves that to $2.50/$12.50, cache reads bill at $0.50, and fast mode (a research preview) doubles it to $10/$50. The full 1M context bills at standard rates with no long-context premium.
2
GPT-5.5
OpenAI
The frontier alternative with the deepest first-party tool stack: hosted shell, computer use, and MCP under one API, 1.2 points off the leaderboard top.
GPT-5.5 (snapshot gpt-5.5-2026-04-23) is the model to beat on everything around the code. Its first-party tool surface is the broadest in this roundup: web search, file search, code interpreter, hosted shell, apply-patch, computer use, MCP, and tool search, all under one vendor and one bill, which is why so many agent products standardize on it. On raw capability it sits 1.2 points behind Opus 4.8 on the Artificial Analysis Intelligence Index, and Z.ai's cross-vendor table has it winning Terminal-Bench 2.1 (84.0 to GLM-5.2's 81.0) while trailing both GLM-5.2 and Opus 4.8 on SWE-bench Pro (58.6) and FrontierSWE (72.6). The reasoning_effort parameter (none, low, medium, high, xhigh, defaulting to medium) is the real cost and reliability dial, and the 1,050,000-token window is genuinely usable. Two commercial facts keep it at rank two for coding specifically: output tokens cost $30 per million, the highest in this roundup, and prompts beyond 272K input tokens bill at 2x input and 1.5x output, exactly the regime where repository-scale coding work lives and where Opus 4.8 and Gemini 3.5 Flash bill flat.
Best for
Agent products built on OpenAI's first-party tools: hosted shell, computer use, and MCP without integration work
Teams consolidating coding and broader multimodal workloads on one vendor
Mixed-difficulty pipelines that exploit the effort dial plus the cheaper GPT-5.4 mini tier for volume
Not for
Repository-scale prompts that routinely cross 272K input tokens, where the long-context surcharge compounds
Data-residency constraints that require weights on your own infrastructure
Output-heavy agent loops priced on tokens, where $30 per million output is the roundup's ceiling
Snapshot
gpt-5.5-2026-04-23
Context
1,050,000 tokens, 128K max output
Knowledge cutoff
December 1, 2025
Effort dial
reasoning_effort: none, low, medium (default), high, xhigh
$5.00 per million input tokens, $0.50 cached input, $30.00 output. Batch is a flat 50% off; priority processing runs $12.50/$75.00. Prompts beyond 272K input tokens bill at 2x input and 1.5x output. A gpt-5.5-pro tier exists at $30/$180 for the hardest problems.
3
GLM-5.2
Z.ai (Zhipu AI)
The open-weights price-performance pick: MIT weights within 0.7 points of Opus 4.8 on FrontierSWE at roughly a sixth of the output price.
GLM-5.2 is the first open-weights model where replacing a frontier API for coding is a serious engineering question rather than a cost fantasy. Released June 16, 2026 with weights on Hugging Face and ModelScope under a plain MIT license (Z.ai's announcement stresses no regional limits), the 753B-parameter MoE posts a 1M-token context and coding numbers that crowd the frontier: 62.1 on SWE-bench Pro, ahead of GPT-5.5's 58.6, and 74.4 on FrontierSWE against Opus 4.8's 75.1, per Z.ai's published table. The third-party signal backs the direction: Artificial Analysis scored it 51, the highest of any open-weights model, ahead of MiniMax-M3 (44), DeepSeek V4 Pro max (44), and Kimi K2.6 (43). Two costs hide behind the $1.40/$4.40 sticker. It is verbose: Artificial Analysis measured about 43K output tokens per Intelligence Index task, which lands it near $0.46 per task versus $0.31 for Kimi K2.6 and $0.18 for MiniMax-M3, so price it per completed task, never per megatoken. And it is text-only, which is a genuine integration hazard in coding harnesses that casually attach screenshots. Opus 4.8 also remains seven points clear on SWE-bench Pro, so keep a frontier escalation lane for the hardest tickets.
Best for
Coding-agent volume where verbosity-adjusted cost per task decides the lane
Open-weights mandates and teams that want a self-hosting exit ramp a closed API can never offer
Shadow evaluations against an incumbent frontier model, with escalation retained for the tail
Not for
Agents that need vision: there is no image input, and screenshot-driven harness steps will break
The hardest tier of tickets, where the seven-point SWE-bench Pro gap to Opus 4.8 lives
Tight interactive latency budgets that cannot absorb tens of thousands of reasoning tokens per step
License
MIT, weights on Hugging Face and ModelScope
Architecture
753B-parameter Mixture-of-Experts, text only
Context
1M tokens
Third-party score
Artificial Analysis 51, top open-weights model
Verbosity
About 43K output tokens per measured task, roughly $0.46 per task
$1.40 per million input tokens, $0.26 cached input, $4.40 output on Z.ai's API. The weights are free under MIT; self-hosting a 753B-parameter MoE is a datacenter conversation (roughly 1.5TB of weights at BF16 before KV cache), so most teams start on hosted endpoints.
4
Gemini 3.5 Flash
Google DeepMind
The cheapest frontier-class lane: $1.50/$9.00, a flat-rate million-token window, and full multimodality, with coding numbers that are Google's own.
Google's flagship in mid-2026 is a Flash model, and the price is the strategy: $1.50 input and $9.00 output per million tokens is 30% of GPT-5.5's output rate for a generally available frontier-class model. Announced May 19, 2026, it takes text, images, video, audio, and PDF in a 1,048,576-token window with no long-context surcharge, supports thinking, function calling, code execution, caching, and batch, and Google claims roughly 4x the output speed of other frontier models, which matters for interactive assistants. What keeps it at rank four in a coding ranking is the evidence base. Its coding numbers are Google-reported: 76.2% on Terminal-Bench 2.1 and 83.6% on MCP Atlas, framed as beating its own Gemini 3.1 Pro sibling, which remains in preview. No cross-vendor or third-party coding measurement we could verify on the verification date puts it above the three models ranked ahead of it, and its vendor-run Terminal-Bench figure sits below what Z.ai's table reports for Opus 4.8, GPT-5.5, and GLM-5.2, with the caveat that numbers from different vendors' harnesses are not directly comparable. Treat it as the value play with the strongest multimodal story, and validate the coding quality on your own repositories before routing volume.
Best for
Cost-sensitive teams that want frontier-class agents at the lowest closed-API prices in this roundup
Multimodal coding workflows: screenshot-heavy harnesses, PDF specs, and design-to-code inputs
Long-input work at flat rates, since the full window carries no surcharge and cache reads bill at $0.15
Not for
Teams that require third-party-verified coding parity before committing a production lane
Workflows that depend on computer use today: it is still marked preview on the model page
Buyers waiting for the Pro-branded top end, since Gemini 3.1 Pro remains preview-stage
About 4x the output speed of other frontier models (vendor-reported)
Pricing
$1.50 per million input tokens and $9.00 output on the paid tier, batch at $0.75/$4.50, context-cache reads at $0.15 plus $1.00 per million tokens per hour of storage. A free tier exists on the Gemini Developer API. No long-context surcharge at any prompt length, unlike Gemini 3.1 Pro, which doubles input pricing beyond 200K tokens.
5
Kimi K2.6
Moonshot AI
The open-weights coder with eyes: a trillion-parameter MoE with native vision, a near-MIT license, and the lowest per-task cost of the open contenders.
Kimi K2.6 (announced April 21, 2026) is the open-weights pick when your coding agents need to see. It is a 1-trillion-parameter MoE with 32B active per token, a 262,144-token context, and a 400M-parameter MoonViT vision encoder that takes images and video natively, which GLM-5.2 cannot do at all. The weights ship in native INT4 from quantization-aware training, and the license is MIT plus exactly one clause: display 'Kimi K2.6' in your product's UI only above 100 million monthly active users or $20 million in monthly revenue. Vendor benchmarks are frontier-adjacent: 80.2 on SWE-bench Verified, 58.6 on SWE-bench Pro, 66.7 on Terminal-Bench 2.0, and 89.6 on LiveCodeBench v6, and Moonshot claims the model scales to 300 parallel sub-agents executing 4,000 coordinated steps, up from 100 and 1,500 on K2.5. Read the swarm claim like an engineer: it is burst capacity that multiplies token spend linearly, not free throughput. It ranks below GLM-5.2 because the third-party picture favors its rival: Artificial Analysis scores K2.6 at 43 against GLM-5.2's 51, and Z.ai's SWE-bench Pro figure (62.1) beats Moonshot's (58.6). K2.6 wins the lane back on efficiency ($0.31 per measured task versus GLM-5.2's $0.46, on about 35K output tokens per task) and on any workflow with a screenshot in the loop.
Best for
Agent harnesses that attach screenshots and design mocks: the only open-weights entry here with native vision
Cost-per-task-driven volume, at the lowest measured per-task cost among the open contenders
Swarm-style decomposable work, run behind test gates and scoped write permissions
Not for
Pure text coding lanes, where GLM-5.2 posts stronger third-party and SWE-bench Pro numbers at similar prices
Small teams planning to self-host: provisioning a trillion-parameter MoE means hundreds of gigabytes of accelerator memory even at native INT4
Products past the 100M-MAU or $20M-monthly-revenue thresholds that cannot display the required attribution
License
Modified MIT: UI attribution only above 100M MAU or $20M monthly revenue
Architecture
1T total parameters, 32B active, native INT4
Context
262,144 tokens
Vision
MoonViT 400M encoder, image and video input
Vendor benchmarks
SWE-bench Verified 80.2, SWE-bench Pro 58.6, Terminal-Bench 2.0 66.7
Efficiency
About 35K output tokens and $0.31 per measured task (Artificial Analysis)
Pricing
$0.95 per million input tokens ($0.16 on cache hits) and $4.00 output at the full 262,144-token context on Moonshot's platform, the lowest frontier-adjacent API rates in this roundup. The weights are free under the Modified MIT license; the attribution clause triggers only above 100M monthly active users or $20M monthly revenue.
6
MAI-Code-1-Flash
Microsoft
The Copilot fleet special: Microsoft's first in-house coding model, strikingly token-efficient, and unusable anywhere outside GitHub Copilot.
MAI-Code-1-Flash sits last for one structural reason: you cannot deploy it. Per its own model card there are no weights and no API; distribution is GitHub Copilot, with any future API release framed strictly as a possibility. Inside that boundary, it is a genuinely interesting model. Released June 2, 2026 and generally available for Copilot Business and Enterprise since June 26 behind an admin policy, it is a 137B-parameter MoE with just 5B active, a 256K context, text-only and English-only, trained end to end by Microsoft without distillation from third-party models, and reinforcement-learned directly inside the production Copilot harness. Microsoft's published table, run in that harness against exactly one competitor, has it beating Claude Haiku 4.5 on SWE-bench Verified (71.6 to 66.6) while using 10.8K tokens per task to Haiku's 27.3K, on SWE-bench Pro (51.2 to 35.2), and on Terminal-Bench 2 (54.8 to 41.6); the one row it loses is visual coding, consistent with having no vision. Under Copilot's metered billing at $0.75/$4.50, that token efficiency is a cost claim worth testing. But a single-competitor, vendor-run comparison is the weakest evidence class in this roundup, and a model that exists inside one product is a fleet-routing decision, not an architecture choice.
Best for
Copilot Business and Enterprise fleets whose credit burn is dominated by high-volume agentic coding
Admins who will pilot behind the org policy and measure tokens per completed task on their own repositories
Procurement that values single-vendor model provenance with a published no-distillation training disclosure
Not for
Anything outside GitHub Copilot: as of the verification date there is no API and there are no weights
Multimodal or substantially non-English work; the model card lists text-only and English
Hard architecture and planning tickets, which belong with the frontier models in the same Copilot picker
Released
June 2, 2026; Business and Enterprise GA June 26 behind an admin policy
Architecture
137B total parameters, 5B active MoE
Context
256K tokens, text-only, English
Distribution
GitHub Copilot only; no API, no weights
Efficiency claim
Up to 60% fewer tokens on SWE-bench Verified vs Claude Haiku 4.5 (Microsoft-run)
Benchmark caveat
All published comparisons are vendor-run against a single competitor
Pricing
Priced only inside GitHub Copilot's metered billing: $0.75 per million input tokens, $0.075 cached input, $4.50 output, consumed from GitHub AI Credit allowances. On the same price list, Claude Haiku 4.5 runs $1.00/$5.00, GPT-5.4 mini matches at $0.75/$4.50, and Gemini 3 Flash undercuts at $0.50/$3.00.
When none of these is the answer
If you are shopping for a new model because your coding agents keep failing, the model is usually not the bottleneck. Past the top tier, capability differences are smaller than the differences your harness makes: test gates, scoped write permissions, schema-constrained outputs, escalation routing, and a golden-set eval that measures cost per merged, passing change. Swapping the model changes the bill more reliably than it changes the outcome.
The durable setup is also not single-model loyalty. All six of these models shipped inside eight weeks of each other, and whichever cell of the comparison table is bold will change again within a quarter. What survives that churn is a model-agnostic gateway that routes by task difficulty, keeps a cheap volume lane and a frontier escalation lane, and reruns the evaluation on your own repositories on a schedule. That is the work BearPlex does in model engineering engagements: the gateway, the evals, the routing, and the measurement that turns this ranking into your ranking.
As of July 2026, Claude Opus 4.8 is the strongest verified pick for production coding work. It leads the third-party Artificial Analysis Intelligence Index at 61.4, and even Z.ai's own published comparison table for GLM-5.2 shows Opus 4.8 ahead on every agentic coding benchmark it lists. The qualifier that matters: if your workload is dominated by cost, GLM-5.2 and Kimi K2.6 deliver most of the capability at a fraction of the output price, and the right answer for many teams is both, split by task difficulty.
By a small, real margin on the verified evidence. Opus 4.8 leads the Artificial Analysis Intelligence Index by 1.2 points, and Z.ai's cross-vendor table has it ahead of GPT-5.5 on SWE-bench Pro (69.2 vs 58.6) and FrontierSWE (75.1 vs 72.6), though GPT-5.5 posts a strong Terminal-Bench 2.1 (84.0 vs 85.0). Commercially, Opus 4.8's output tokens cost $25 versus $30, and its 1M context bills flat while GPT-5.5 charges 2x input and 1.5x output beyond 272K tokens. GPT-5.5 wins back ground on its first-party tool stack. Decide with task-level evals on your own repositories.
For a large share of the lane, yes, for the first time. GLM-5.2's published FrontierSWE score sits 0.7 points behind Opus 4.8, its SWE-bench Pro score beats GPT-5.5's, and Artificial Analysis independently rates it the strongest open-weights model on its index. The honest boundaries: Opus 4.8 stays seven points clear on SWE-bench Pro, GLM-5.2 has no vision input, and it spends about 43K output tokens per task. The pattern that works in production is the open model owning volume traffic with a frontier escalation lane for the hardest tickets.
Depends on the unit. On list price, Kimi K2.6 is the floor among serious options at $0.95 input and $4.00 output per million tokens, with GLM-5.2 at $1.40/$4.40 and Gemini 3.5 Flash the cheapest closed frontier-class lane at $1.50/$9.00. On measured cost per completed task, which is the unit that actually matters, Artificial Analysis clocked Kimi K2.6 at about $0.31 per task against GLM-5.2's $0.46, because K2.6 is materially less verbose. Inside GitHub Copilot, MAI-Code-1-Flash's token efficiency makes it the value candidate at $0.75/$4.50.
Two reasons, both verifiable on Anthropic's own documentation as of the verification date. First, Anthropic's model-selection guidance still tells buyers to start with Claude Opus 4.8 for complex agentic coding, positioning Fable 5 for workloads that need the highest available capability, particularly long-running agents. Second, Fable 5 costs $10 input and $50 output per million tokens, double Opus 4.8, and it became generally available on June 9, 2026, too recently to have the coding-specific third-party record this ranking weighs. When that record accumulates, we will re-rank.
Directionally, not precisely. Harness design moves these scores by whole points: Microsoft evaluated MAI-Code-1-Flash inside its production Copilot harness against one competitor, Z.ai published its own comparison table, and Google reports Gemini 3.5 Flash numbers from its own runs, so cross-vendor tables built from different harnesses are not directly comparable. We weight third-party measurement first, competitor-published concessions second, and vendor launch tables last. For a production decision, the metric that survives contact is cost per merged, passing change on your own repositories.
Run the economics, not the keynote. On GitHub's published Copilot price list, MAI-Code-1-Flash is $0.75/$4.50 per million tokens, below Claude Haiku 4.5's $1.00/$5.00, identical to GPT-5.4 mini, and above Gemini 3 Flash's $0.50/$3.00. Microsoft's claim of up to 60% fewer tokens on hard tasks is the whole business case: if it holds on your repositories, cost per task drops far more than list prices suggest. Enable the policy for one team, measure pass rate and tokens per completed task, and keep the frontier models in the picker for hard planning work.
At the top of this ranking, usually yes. The first three models cluster within a few points on the benchmarks that matter, and in our engagements the deltas between a disciplined harness and a naive one (test gates, scoped permissions, structured outputs, abstention handling, escalation routing) exceed the deltas between adjacent models on this list. Pick the model with a two-week shadow evaluation, then spend the engineering months where they compound: the harness, the evals, and the routing that lets you change this decision cheaply next quarter.