
On June 15, 2026 at 9 AM PT, claude-sonnet-4-20250514 and claude-opus-4-20250514 stop accepting API calls. No grace period, no silent fallback to a successor model — just errors. If either of those model strings is anywhere in your production code, you have 13 days. Fix it now.
Who This Actually Affects
This is an API-level change only. If you are using Claude via Claude.ai or Claude Code, Anthropic manages model selection for you and you are not affected. The deprecation targets developers calling the Anthropic API directly — Python SDK, TypeScript SDK, raw REST — with pinned model version strings.
In other words: if your code contains the string claude-sonnet-4-20250514 or claude-opus-4-20250514, it will break on June 15. Full stop.
The Fix
The migration is straightforward for most cases. Update your model string and run a parallel test before deploying. Here is the change:
# BEFORE (breaks June 15, 2026)
response = client.messages.create(
model="claude-sonnet-4-20250514",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello"}]
)
# AFTER
response = client.messages.create(
model="claude-sonnet-4-6",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello"}]
)
Anthropic’s stated default replacement routes to 4.5, but if you are already touching this code, go straight to claude-sonnet-4-6 or claude-opus-4-7. You get meaningfully better models at the same cost and with the same API surface — there is no reason to stop at 4.5.
Opus Users: Read This Before Migrating
Sonnet 4.6 is a clean upgrade with no breaking changes — prompting styles, tool use, and JSON response formats are all backward-compatible. Opus 4.7 is a different story. If you are migrating from Opus 4.0, three things will break:
- Extended thinking is gone. Calls passing
budget_tokenswill return a 400 error. The replacement is adaptive thinking, which is disabled by default. Opt in explicitly or remove the parameter. - Sampling parameters are gone.
temperature,top_p, andtop_know return 400 if you pass non-default values. Remove them from your API calls and use prompting to guide model behavior instead. - New tokenizer. The same prompt can cost up to 35% more tokens on Opus 4.7. If you are anywhere near your context window limits, audit this before you deploy.
These are real breaking changes, not theoretical ones. If you are running Opus in an automated pipeline, allocate time for testing — not just a model string swap.
Why Not Just Stay on 4.5?
Anthropic’s default replacement alias points to 4.5, but 4.6 and 4.7 are where the actual gains are. Claude Sonnet 4.6 is the first Sonnet model to outperform the previous generation’s Opus on coding benchmarks. Claude Opus 4.7 brings a 1M token context window at standard pricing (no long-context surcharge), self-verifying outputs, and task budget awareness for agentic loops.
If you are running agents with long-running tasks, Opus 4.7’s self-verification is worth the migration friction: it runs sanity checks on generated code and fixes obvious errors before returning results. For a deeper look at what Opus 4.7 changes for long-running agent workloads, Caylent’s breakdown is worth reading alongside the official docs.
Before You Ship: A Checklist
- Update the model string (the obvious one)
- Run the same prompts against both old and new models and compare outputs
- If on Opus: remove
budget_tokens, remove sampling parameters, retest - Check token usage against the new tokenizer — 35% increase can cause context overflows
- Search your codebase for any hardcoded model strings in configs, environment files, and CI pipelines
The deadline is June 15, and Anthropic has been explicit that there is no grace period. Most teams can complete this migration in an afternoon. Do not leave it for June 14.
The full list of deprecated model IDs and their recommended replacements is on Anthropic’s model deprecations page. For the current model lineup and version IDs, see the models overview. If you are migrating Opus and need step-by-step guidance on the breaking changes, the official migration guide covers each parameter change with examples. For ongoing version tracking across all Claude releases, endoflife.date/claude is a useful bookmark.













