// benchmarks and budget
Opus 4.7 vs Sonnet 4.6 for coding
Both models can code. One costs 1.7× the other. Here's when spending 1.7× is worth it, and when it's a waste.
Opus 4.7
Sonnet 4.6
Input / M
$2.50
$1.50
Output / M
$12.50
$7.50
Context
200K
200K
SWE-bench Verified
~72%
~65%
Latency
Higher
~2× faster
Tool-call accuracy
Better
Good
Benchmarks approximate Anthropic's published Opus 4.5+ scores. On llmrelay both models run at 50% off official list — the ratio between them is what matters here.
Use Opus 4.7 when
- +You're in agent mode. Multi-file refactors, long tool trajectories, planner-executor loops. Opus's edge on SWE-bench compounds when the agent has 20+ tool calls in a task.
- +You're debugging real production code. Sonnet often "fixes" the wrong thing; Opus reads the stack trace and finds the actual bug.
- +Cursor Composer, Cline, Roo Code agent mode — anything where the model plans its own steps.
Use Sonnet 4.6 when
- +You're chatting, not agenting. Ask a question, get a code snippet, move on. Sonnet is fine and 40% cheaper.
- +You're building a RAG or long-context pipeline. Sonnet's speed matters more than Opus's reasoning depth.
- +You're running batch inference over thousands of items. Save the $ on the boring 90%.
Real budget math
Heavy Cursor agent user: ~50M input, 5M output per month.
Opus 4.7 on Anthropic
$375/mo
Opus 4.7 on llmrelay
$187.50/mo
-50%
Sonnet 4.6 on llmrelay
$112.50/mo
-70% vs Anthropic Opus
Try both — a single key covers all models
The right answer is "use both — Opus for the tough tasks, Sonnet for everything else." One key. Prepaid. No expiry.
Get API key →