Claude Sonnet 5: near-Opus agents at a third of the price
In brief
Anthropic launched Claude Sonnet 5 on June 30, 2026 and made it the default model for Free and Pro the next day. It runs agents — planning, tool use, long autonomous tasks — at close to Opus 4.8 quality for a fraction of the cost: $2/$10 per million tokens through August 31. Three migration changes and a new tokenizer are the things to check before you swap the model string.
Contents
Claude Sonnet 5 (claude-sonnet-5) shipped on June 30, 2026 and became the default model for every Free and Pro user on July 1. It's the next generation of the Sonnet line — the mid-tier model most production traffic actually runs on — and Anthropic's pitch is specific: it does the agentic work that used to require Opus, at Sonnet cost.
An agentic task is one where the model plans, calls tools like a browser or terminal, checks its own output, and runs for many steps without a human in the loop. Sonnet 4.6 could do this but often stalled on longer chains. Sonnet 5 is built to finish them.
The specs and the price
| Claude Sonnet 5 | Claude Sonnet 4.6 | Claude Opus 4.8 | |
|---|---|---|---|
| Model ID | claude-sonnet-5 |
claude-sonnet-4-6 |
claude-opus-4-8 |
| Input price | $2 / M (intro) → $3 / M | $3 / M | $5 / M |
| Output price | $10 / M (intro) → $15 / M | $15 / M | $25 / M |
| Context window | 1M tokens | 1M tokens | 1M tokens |
| Max output | 128k tokens | 128k tokens | 128k tokens |
| Priority Tier | Not available | Available | Available |
The introductory pricing — $2 input / $10 output per million tokens — runs through August 31, 2026, then rises to the standard $3/$15. Even at standard pricing that's the same input price as Sonnet 4.6 for a materially stronger model; through August it's cheaper. Sonnet 5 undercuts Opus 4.8, OpenAI's GPT-5.5, and Google's Gemini 3.1 Pro. It is not the cheapest option on the board — Gemini 3.5 Flash is cheaper — but it's the cheapest that runs long agentic chains at this quality.
One caveat for latency-sensitive workloads: Priority Tier is not available on Sonnet 5. If you depend on Priority Tier for guaranteed capacity, stay on Sonnet 4.6 or Opus for those paths until it's added.
How good is it, really
Anthropic's own numbers put Sonnet 5 just below Opus 4.8 on hard agentic work and slightly above it on knowledge work:
- Agentic coding: Sonnet 5 scores 63.2% where Opus 4.8 scores 69.2%. Opus is still the pick when you need the last few points of accuracy on the hardest tasks.
- Knowledge work: Sonnet 5 edges out Opus 4.8.
The practical read from early testers matched the framing. Zapier's team reported that complex multi-part automations that "used to stall halfway" with the prior model now "finished end to end." That's the whole value proposition: not a benchmark record, but a cheaper model that actually completes the long tasks you'd otherwise have paid Opus to run.
The honest routing rule: default new agentic and general work to Sonnet 5. Reserve Opus 4.8 for the tasks where the top few points of accuracy pay for themselves — the hardest reasoning, the longest-horizon coding. That inverts the old habit of reaching for Opus first.
Three changes to check before you migrate
Swapping claude-sonnet-4-6 for claude-sonnet-5 is mostly a string change, but three behavior changes will break code that assumed the old defaults:
1. Adaptive thinking is on by default. Sonnet 5 decides per turn whether to reason before answering. You don't enable it. If your app assumed no thinking blocks in the response, handle them now — set thinking.display to "summarized" if you want readable summaries, or leave it omitted.
2. Manual extended thinking is removed. Passing thinking: {type: "enabled", budget_tokens: N} now returns a 400 error (it was deprecated on Sonnet 4.6). Control reasoning depth with the effort parameter instead of a token budget.
3. Non-default sampling parameters return a 400. Setting temperature, top_p, or top_k to anything other than the default now errors — same rule already in place on Opus 4.7 and 4.8. If you tuned temperature, remove it.
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic();
// Correct on Sonnet 5: no manual thinking budget, no temperature override.
const res = await client.messages.create({
model: "claude-sonnet-5",
max_tokens: 4096,
messages: [{ role: "user", content: "Plan and run the migration." }],
// effort: "high", // use effort, not thinking.budget_tokens, to go deeper
});
The tokenizer tax
Sonnet 5 uses the tokenizer introduced with Opus 4.7. The same text produces roughly 30% more tokens than models before 4.7. This is the single most common budgeting mistake when moving to a current-generation model: the per-token price looks lower, but if you're projecting cost off old token counts, you'll under-estimate. Re-measure with the token counting API using model: "claude-sonnet-5" before you trust any cost model. The 30% figure varies with content and workload shape — measure your actual prompts.
What to do this week
- Point your agentic and general traffic at
claude-sonnet-5and keep Opus 4.8 for your hardest tasks. Write the routing rule down. - Remove any
temperature/top_p/top_koverrides and manualthinkingbudgets — they now 400. - Re-measure token counts under the new tokenizer before trusting your cost projection.
- Check Priority Tier dependencies. If a path relies on it, don't move that path to Sonnet 5 yet.
- Lock in the intro price mentally, not structurally — $2/$10 ends August 31. Budget for $3/$15 after.
Related reading
- Claude Opus 4.8: the new default — the model Sonnet 5 now sits just below, and your escalation target
- Choosing the right Claude model — the routing framework, updated for a stronger Sonnet
- Claude cost optimization — why "default to Sonnet, escalate to Opus" is a cost decision
- What to do when your AI model disappears — why every model swap should ride on an alias with a fallback
Source: Claude Platform release notes and What's new in Claude Sonnet 5, June 30, 2026.