Migrating off Claude Sonnet 4
Claude Sonnet 4 has no announced Anthropic shutdown date but is directly superseded by Sonnet 4.6, a strict upgrade at the same position in Anthropic's lineup. This is the cleanest 1:1 migration on this page — same tier, same provider, same positioning.
The swap
// All AI Ask API
{
- "model": "claude-sonnet-4",
+ "model": "claude-sonnet-4-6",
"messages": [...]
}Same change applies if you call Anthropic directly with its own SDK — only the model identifier changes; request/response shape is otherwise unaffected for a same-provider swap.
What actually changes
| Claude Sonnet 4 | Claude Sonnet 4.6 | |
|---|---|---|
| Blended $/M | $6.00 | $6.00 |
| Context window | 200,000 tokens | 300,000 tokens |
| Max output | 32,000 tokens | 64,000 tokens |
| Modalities | text, vision | text, vision |
| Tokens / sec | unchanged / not measured | 76 |
Pricing from our live pricing registry; speed from our benchmark leaderboard where measured.
Gotchas
- Sonnet 4.6's context window is 50% larger (300K vs 200K tokens). If you were chunking long documents specifically to stay under Sonnet 4's 200K limit, that chunking logic can likely be relaxed, not just left in place as a safety margin.
- Extended-thinking (reasoning) token accounting differs slightly between the two model generations — if you set a hard `max_tokens` budget that included thinking tokens for Sonnet 4, re-verify it against Sonnet 4.6's documented token accounting rather than assuming it transfers unchanged.
- Sonnet 4.6 is priced the same or lower than Sonnet 4 depending on your input:output mix — this is a rare case where the upgrade doesn't cost you more, so there's little reason to delay the switch.
Alternatives beyond the obvious successor
OpenAI's equivalent "balanced" tier, if you want a cross-provider comparison before committing.
Faster and larger context window than either Sonnet generation, at a lower price.
Open-weights alternative with a 1M-token context window at a fraction of the cost, if coding is the primary workload.
FAQ
Is Claude Sonnet 4 being shut down?
Claude Sonnet 4 has no announced shutdown date, but it is superseded and no longer the recommended choice. Source: https://docs.anthropic.com/en/docs/about-claude/model-deprecations.
What should I switch to from Claude Sonnet 4?
Claude Sonnet 4.6 is the direct successor. See "The swap" below for the exact model id change.
Will switching cost more or less?
The successor is 0% more expensive at blended (3:1) pricing. See the comparison table for exact per-million-token numbers.
