Best AI models for coding and software engineering as of June 2026
The best AI model for software engineering depends on the task. On APEX-SWE, Mercor's benchmark of real coding and software engineering tasks graded by expert engineers, Fable 5 leads overall with a 65.5% Pass@1 score, meaning it successfully completed 65.5% of benchmark tasks on its first attempt, ahead of Opus 4.8 and GPT 5.3 Codex.
The table below shows overall Pass@1 performance on APEX-SWE. Scores are captured as of June 2026.
| Rank | Model | Pass@1 (overall) | Δ since last update (Mar 2026) |
|---|---|---|---|
| 1 | Fable 5 | 65.5% ± 6.2 | ▲ New — leader |
| 2 | Opus 4.8 (High) | 45.3% ± 6.3 | ▲ New entry |
| 3 | GPT 5.3 Codex (High) | 41.5% ± 6.3 | — Former leader |
| 4 | Opus 4.7 (Max) | 41.3% ± 6.3 | ▲ New entry |
| 5 | GPT 5.5 (xHigh) | 40.8% ± 6.5 | ▲ New entry |
| 6 | Opus 4.6 (High) | 40.5% ± 6.3 | — |
| 7 | Opus 4.5 (High) | 38.7% ± 6.3 | — |
| 8 | GPT 5.4 (High) | 36.5% ± 6.3 | — |
| 9 | Gemini 3.5 Flash (High) | 32.5% ± 5.8 | ▲ New entry |
| 10 | Cognition SWE-1.6 Preview | 31.7% ± 5.8 | ▲ New entry |
View full APEX SWE Leaderboard →
Best AI model by software engineering task
Leaderboard rankings tell you which model is strongest on average when performing a specific task. However, it doesn’t tell you which model to choose for your actual project. The right choice will vary by task, with performance gaps between models widening once you split the benchmark by workload.
- Code generation - Fable 5 (65.5%), Opus 4.8 (45.3%), GPT 5.3 Codex (41.5%), Opus 4.7 Max (41.3%), and GPT 5.5 xHigh (40.8%)
- Integration - GPT 5.5 leads at 52.7%
- Debugging/Observability - Opus 4.8 leads at 43.3%
- Refactoring - Verify against your own test suite
- Self-hosted - Kimi K2.5 is the strongest
How to validate models on your own stack
Pick your AI model based on your primary workflow, then test it on two or three of your own tickets before standardizing. A ten-point benchmark gap may disappear or even reverse on your specific codebase because your stack, conventions, and failure modes are often different from those represented in the benchmark.
Who should use APEX-SWE?
APEX-SWE primarily serves 3 main types of users:
- Full-stack software engineers: These users typically choose a model deliberately instead of defaulting to whatever ships with their editor. APEX-SWE highlights which model to reach for when work shifts from building to debugging.
- Engineering leads and managers: Platform teams evaluating AI tools for software engineering can use APEX-SWE to standardize decisions across their organization.
- AI labs and companies building developer products: These organizations can use APEX-SWE to measure performance on expert-graded engineering work where public benchmarks have become largely saturated.
How are AI model rankings evaluated for coding and software engineering?
These rankings come from APEX-SWE, Mercor's benchmark for how frontier AI models are evaluated on expert tasks. Traditional coding benchmarks primarily measure isolated tasks, but developers spend much of their time on work like CI/CD, monitoring, deployment, and debugging. APEX-SWE was built to score that real-world engineering work.
What does APEX-SWE measure?
APEX-SWE measures whether a model can perform economically valuable software engineering tasks across 200 cases, split evenly between two settings:
- Integration: Requires end-to-end system construction across heterogeneous services.
- Observability: Requires debugging with production-style telemetry. Each task is graded by a human-authored rubric covering functional requirements, robustness, and code style, alongside unit tests, and is scored as Pass@1, which measures the percentage of tasks a model successfully completes on its first attempt without additional retries. It was created in collaboration with Cognition, which reviewed a subset of tasks to pressure test how production systems fail and get fixed.
How does APEX-SWE scoring work?
Every rubric is written by an experienced software engineer who understands what "correct" means for that task, including whether the solution meets the requirements, handles edge cases, and would pass code review. This is the same kind of expert judgment that shapes model coding ability through human feedback during training and that separates purpose-built coding models from general large language models through task-specific fine-tuning. To ensure the benchmark is reproducible, Mercor has open-sourced a 50-case subset and the evaluation harness, so others can replicate the results.
What type of prompts are evaluated by the APEX-SWE benchmark?
The following examples illustrate the two core task categories:
Example 1: Integration - a customer journey analytics pipeline
In this task, the model receives a short issue title and must first retrieve the full requirements from a project tracker via MCP tools before building a working end-to-end script. It orchestrates across multiple live services, including Plane, a Medusa commerce backend, Zammad ticketing, EspoCRM, LocalStack AWS services, and Mattermost, gathering context from each before writing a single executable Python deliverable that the harness runs and verifies. Guessing filenames or output formats is not enough; the model must understand and interact with the system, not just generate code.
Example 2: Observability - debugging a production transaction bug
In this task, the model is given a real issue from op-geth, a modified version of Ethereum's Go Ethereum (Geth) client used by the Optimism Layer 2 network: the transaction pool accepts transactions that lack the balance to cover operator fees, then fails them on execution. It must query Loki and Grafana logs to understand the failure, trace it through the codebase, and fix the legacy pool's fund-sufficiency check against 16 separate requirements, including correct rollup cost calculations before and after a network upgrade. This is representative of the long-horizon debugging work that remains difficult for most models.
What skills are evaluated by the APEX-SWE benchmark?
The skills being tested aren’t focused on syntax but rather on orchestration in the integration tasks and diagnosis in the observability tasks, including coding:
- Integration tasks are built around an ephemeral PostgreSQL database and Plane, with six additional services appearing at varying frequencies: LocalStack (56%), EspoCRM (35%), MailHog (33%), Mattermost (32%), Medusa (31%), and Zammad (26%).
- Observability tasks are derived from real GitHub issue-and-pull-request pairs sourced from repositories with at least 350 stars and are distributed across five widely used languages: Go (30%), Python (25%), TypeScript (25%), Java (10%), and C++ (10%).
What are the hardest software engineering tasks for AI?
Debugging: The best Observability score is 43.3%, versus 52.7% on Integration.
- Long-horizon debugging remains difficult. Models often struggle to trace issues across large codebases with incomplete telemetry.
- Multi-system workflows reduce performance. Integrating across services and executing multistep tasks remain major failure points.
- Top models validate before acting. The best performers test generated code against real system behavior.
- Senior engineers still outperform AI. Production debugging and complex system reasoning remain largely the preserve of human expertise.
Do AI models or AI coding tools matter more?
Both AI models and AI coding tools are important, but they do different jobs. The model, such as Opus, GPT, or Gemini, writes the code, while the tool, such as Cursor, Copilot, or Claude Code, wraps that code in an editor, provides context, and applies edits across your files.
The model sets the performance ceiling. A polished tool can’t compensate for a weak model. It will still write weak code for complex problems, and no amount of UI improvements will close a twenty-point Pass@1 gap. However, a good tool amplifies whatever the model offers, giving it repo awareness, test loops, and context retrieval that a raw API call doesn't have.
So which matters more? It depends on the work. For most everyday coding, the spread between the top models falls within the benchmark's margin of error, so your tool and workflow are what actually decide the result. On your most complex problems, the model's raw capability is the thing that wins. Pick the model for the ceiling you need, and pick the tool for how well it delivers that capability into your codebase.
Get the full APEX-SWE dataset
The public leaderboard shows the scores; the full picture is what teams use to make real decisions. The open-source dev set (n=50, CC-BY) and the eval harness are public on Hugging Face and GitHub for reproducibility, and the methodology is documented in the APEX-SWE technical report.
For teams that need more
Measure AI productivity on your own software engineering workflows with APEX-SWE with the full APEX-SWE dataset and custom evaluations.
Get in touchFrequently Asked Questions
What's the best AI model for software engineering right now?+−
As of June 2026, Fable 5 leads APEX-SWE with 65.5% Pass@1, ahead of Opus 4.8 (45.3%) and GPT 5.3 Codex (41.5%).
What’s the best AI model for coding/code generation?+−
The APEX-SWE leaders, Fable 5, Opus 4.8, and GPT 5.3 Codex, are the strongest proxy for code-generation performance.
Will AI replace software engineers?+−
On APEX-SWE, the best-performing model only solves about two-thirds of real engineering tasks, while every other model solves fewer than half. They are weakest in areas where senior-level judgment matters most, including debugging, edge-case handling, and meeting precise requirements. Engineers who use AI effectively will outpace those who don't, and there’s growing demand for new AI-adjacent roles for engineers that involve evaluating or reviewing AI-generated code.
What’s the best AI coding tool for developers?+−
There’s no single winner. It varies depending on your environment. Cursor is a common pick for an AI-native editor, GitHub Copilot suits teams needing enterprise governance and GitHub integration, while Claude Code and open-source tools such as Aider work well for terminal workflows.
Should I use Cursor or GitHub Copilot?+−
For engineers who choose their own tools, Cursor generally performs better on complex, multifile tasks. For teams with security requirements, IT governance, or existing GitHub contracts, Copilot is the more practical choice.
What's the difference between an AI model and a coding tool such as Copilot or Cursor?+−
The model, such as Fable 5, Opus, GPT, or Gemini, is the engine that writes the code. The tool, such as Cursor, Copilot, or Claude Code, is the product that wraps the model in an editor or workflow. APEX-SWE ranks model performance. The tools determine how effectively that performance is applied to your codebase.
Can I use ChatGPT or Claude on proprietary or confidential code?+−
Enterprise tiers from the major providers typically offer zero-retention and no-training options, and self-hostable open-weight models keep code entirely inside your network. Always confirm the specific data-handling terms of your plan before sending production code.
Do Cursor and Copilot matter more than the underlying model?+−
The model sets the performance ceiling, but the tool determines how much of that capability you can reach. For complex tasks, the model matters more because no interface can close a large Pass@1 gap. For routine day-to-day work where the top models sit within the margin of error, the tool and workflow often matter more.
How can my team benchmark AI models on our own engineering workflows?+−
The open-sourced cases and evaluation harness are publicly available on Hugging Face and GitHub, so you can run the APEX-SWE methodology yourself. For the full dataset or a custom evaluation graded by vetted engineers on your own models and stack, partner with Mercor.
How should engineering leaders evaluate AI models?+−
Start with an independent benchmark such as APEX-SWE, then test the top models on your own engineering tasks. Consider both performance and total cost, including inference, review time, and data-handling requirements. For team-wide adoption, these factors matter more than any single benchmark score.
How are software engineers actually using AI today?+−
Most software engineers embed AI coding assistants in their development workflows. Adoption is now widespread, with industry reports cited in Mercor's APEX-SWE announcement indicating that more than 90% of developers use AI coding tools, and nearly half of all code at major technology companies is AI-generated. Most of this usage is focused on assistance and productivity, not fully autonomous software engineering.

