head-to-head
| Metric | Grok 4.5 | Claude Sonnet 5 |
|---|---|---|
| SWE-bench Verified | 86.6% | 85.2% |
| SWE-bench Pro | 64.7% | 63.2% |
| Terminal-Bench | 83.3% (TB2.1) | 80.4% (TB2.1) |
| Input $ / 1M | $2 | $2 |
| Output $ / 1M | $6 | $10 |
| Context | — | 1M |
| Open weights | No | No |
| Access | API · SpaceXAI console · Grok Build · Cursor (all plans); not in EU yet | API · Claude Code · claude.ai (Free/Pro default) |
| Maker | SpaceXAI (xAI) | Anthropic |
what do the benchmarks actually say?
On SWE-bench Verified — real, human-validated GitHub issues resolved end-to-end — Grok 4.5 posts 86.6% against 85.2% for Claude Sonnet 5, a 1.4-point gap. Verified is the closest public proxy for "can it fix a real bug in a real repo without help", which is why it anchors our ranking.
SWE-bench Pro is the harder, less-saturated test — bigger repos, multi-file changes, no memorized answers. Here Grok 4.5 leads with 64.7% to 63.2%, a 1.5-point margin. On Terminal-Bench (agentic terminal work) it's Grok 4.5 at 83.3% (TB2.1) versus Claude Sonnet 5 at 80.4% (TB2.1).
A few points either way is real but not decisive: within that band, the agent scaffolding around the model — how it retrieves files, runs tests, and retries — often matters as much as the base model. Treat the gap as a lean, not a verdict.
which is cheaper to run?
Both list at $2 per 1M input tokens, so the sticker price is a wash — output rates ($6 vs $10) and token efficiency decide the real bill. Coding workloads are output-heavy — agents write diffs, tests and retries — so weight the output rate more than the input rate when you estimate a monthly bill.
when to pick each
The best value at the top of the board: it solves a SWE-bench Verified task for about $2.31 of input, less than half what the two models above it cost, and it is the fastest of the leaders.
The best closed-model value — near-Opus scores at ~2.5× less, and the default daily driver for most developers.
how were these scores verified?
We only print a number once it's confirmed against a primary source or an independent evaluation, and each row on our leaderboard records which kind it is:
- Grok 4.5: Independent (vals.ai, Jul 14 2026, mini-swe-agent bash-only harness): SWE-bench Verified 86.6% ±1.52. Verified Jul 17, 2026 — it launched Jul 8 with no Verified score and we had it unranked as "Opus-class, unproven"; the independent number now backs the Opus-class claim, landing it 2 points under Claude Opus 4.8 at 40% of the input price. On our price-per-solved-task metric that is ~$2.31 against $5.64 for Opus 4.8 and $10.53 for Fable 5, the cheapest of any model scoring above 85%. It is also quick: 199.6s mean latency per task versus 566.9s for Opus 4.8. SWE-bench Pro 64.7% and Terminal-Bench 2.1 83.3% remain SpaceXAI-reported. Priced $2/$6 per 1M. Still not available in the EU.
- Claude Sonnet 5: Vendor-reported (Anthropic), on Anthropic's own scaffold. Independent comparison: vals.ai's bash-only harness measures Sonnet 5 at 79.6% ±1.80, 5.6 points lower — a gap that reflects the harness as much as the model, so treat the 85.2% as a best-case number. Intro pricing $2/$10 per 1M through Aug 31, 2026, then $3/$15.
Full reviewsGrok 4.5, decodedClaude Sonnet 5, decoded
Ranked on our AI Coding Leaderboard, updated 2026-07-17. Scores are confirmed against primary sources; prices are per 1M input tokens and can change.
- SpaceXAI (xAI)vals.ai — SWE-bench Verified (independent) — Independent (vals.ai, Jul 14 2026, mini-swe-agent bash-only harness): SWE-bench Verified 86.6% ±1.52. Verified Jul 17, 2026 — it launched Jul 8 with no Verified score and we had it unranked as "Opus-class, unproven"; the independent number now backs the Opus-class claim, landing it 2 points under Claude Opus 4.8 at 40% of the input price. On our price-per-solved-task metric that is ~$2.31 against $5.64 for Opus 4.8 and $10.53 for Fable 5, the cheapest of any model scoring above 85%. It is also quick: 199.6s mean latency per task versus 566.9s for Opus 4.8. SWE-bench Pro 64.7% and Terminal-Bench 2.1 83.3% remain SpaceXAI-reported. Priced $2/$6 per 1M. Still not available in the EU.
- AnthropicGENZ TECH — Claude Sonnet 5, decoded — Vendor-reported (Anthropic), on Anthropic's own scaffold. Independent comparison: vals.ai's bash-only harness measures Sonnet 5 at 79.6% ±1.80, 5.6 points lower — a gap that reflects the harness as much as the model, so treat the 85.2% as a best-case number. Intro pricing $2/$10 per 1M through Aug 31, 2026, then $3/$15.
- BenchmarkSWE-bench — the real-GitHub-issue benchmark