Head to head
This is one of the most-searched matchups of the year, and it is usually framed wrong. People treat it as "which model is smarter," when the honest answer is that Claude Opus 4.8 and Gemini 3.1 Pro are strong at different jobs. Opus is the repo surgeon — it tops the benchmark that measures whether a model can fix a real, messy codebase. Gemini 3.1 Pro is the contest specialist and the throughput play — it posts a leading algorithmic score at a fraction of the price. We run both on our live benchmarks (VCI weights SWE-bench Verified 40, Terminal-Bench 30, LiveCodeBench 30), and here is the un-tribal read.
Where Opus 4.8 wins
The top of the repo-surgery board. On SWE-bench Verified — resolving real GitHub issues across real repositories — Opus 4.8 lands at 88.6, well clear of Gemini 3.1 Pro's 75.6. That thirteen-point gap is not cosmetic; it is exactly the axis that decides whether an agent finishes a gnarly multi-file change or gets most of the way and stalls. When the task is untangling a real refactor rather than solving a self-contained puzzle, Opus fails less and finishes more.
Agentic shell reliability. Opus 4.8 posts 78.9 on Terminal-Bench, the suite that measures whether a model can actually drive a shell through a multi-step task without wandering off. Gemini 3.1 Pro's Terminal-Bench score is not yet published, so we cannot make a clean comparison there — but 78.9 is a top-tier number, and it is why Opus is the model people trust to leave running on a delegated job.
Judgment on ambiguity. Opus's real edge in daily use is knowing when to read more before editing, when to abandon a bad approach, and when to stop and ask. That does not show up in a tokens-per-second figure, but it is what makes an agent trustworthy when the spec is vague and the blast radius is large.
Where Gemini 3.1 Pro wins
The contest crown. On LiveCodeBench — algorithmic, contest-style problems — Gemini 3.1 Pro hits 88.5, edging out Opus 4.8's 87.8. If your work leans toward self-contained algorithmic problem-solving, competitive-style challenges, or well-specified single-function tasks, this is the model built for exactly that shape of problem.
Price and throughput. Gemini 3.1 Pro is $2 per million input and $12 per million output, streaming at 147 tokens per second. Opus 4.8 is $5/$25. That is roughly a 2.5x price gap on input and output alike, plus Gemini's signature million-token context window. For high-frequency, interactive loops and whole-repo comprehension, that combination of speed, context, and cost is a real, differentiated advantage.
The numbers side by side
| Model | SWE-bench | Terminal-Bench | LiveCodeBench | In / Out per M | tok/s |
|---|---|---|---|---|---|
| 88.6 | 78.9 | 87.8 | $5 / $25 | not published | |
| 75.6 | not published | 88.5 | $2 / $12 | 147 |
Reading the split correctly
The trap here is reading one benchmark and stopping. Gemini 3.1 Pro leads on LiveCodeBench but trails by thirteen points on SWE-bench, and those two numbers measure genuinely different skills: LiveCodeBench is algorithmic and self-contained, SWE-bench is real-repo issue resolution across many files. A model can be excellent at the first and merely good at the second — which is precisely Gemini 3.1 Pro's profile. It is a contest specialist that is weaker on the messy, sprawling changes real codebases throw at you. Opus is the mirror image: less flashy on contests, dominant on the repo work that pays the bills.
The price gap frames how you should read that split. Gemini 3.1 Pro isn't just cheaper — at $2/$12 against Opus's $5/$25, it's less than half the cost on both input and output. That changes the calculus for the algorithmic and whole-repo-read work it's genuinely good at: for those tasks, paying flagship rates would be overkill, and Gemini delivers a leading contest score for a fraction of the money. Where the gap stops mattering is hard repo surgery, because there the thirteen-point SWE deficit means cheaper tokens turn into more retries, and more retries erase the savings. The efficient move is to let price win on the tasks Gemini clears cleanly and let capability win on the ones it doesn't.
Who should reach for Opus 4.8
- Repo surgery is your daily reality. The 88.6 SWE-bench is exactly where large, messy, multi-file work lives, and 78.9 Terminal-Bench means it holds up driving a shell.
- You delegate and review. The judgment edge is why you can leave Opus running on an ambiguous task and trust the result.
- You'd rather pay for one clean pass than three cheaper attempts that each need a second look.
Who should reach for Gemini 3.1 Pro
- Your work leans algorithmic. The 88.5 LiveCodeBench suits competitive-style and self-contained problems.
- You're context-bound or speed-bound. The 1M window and 147 tok/s remove two very real ceilings.
- Budget matters. At $2/$12 versus $5/$25, Gemini is the cheaper daily driver by a wide margin.
The honest close
This is not a fight with one winner. Opus 4.8 is the model you reach for when the change is hard and lives in a real repo; Gemini 3.1 Pro is the one you reach for when the problem is well-shaped, the loop needs to be fast, or the bill needs to be small. Plenty of developers keep both and route per task — hard multi-file work to Opus, fast contests and whole-repo reads to Gemini — which is exactly the multi-engine, bring-your-own-key workflow The Vibe Father runs in one macOS deck. For the wider field, see our best model for each agent role guide, the cheapest capable models roundup, and the full board at /benchmarks.