ACTION REQUIRED - JUNE 15 DEADLINE
Replace claude-sonnet-4-20250514 with claude-sonnet-4-6
Replace claude-opus-4-20250514 with claude-opus-4-8
After June 15, both model strings return API errors. No grace period has been announced.
What Is Being Deprecated and Why
Anthropic uses timestamped model strings (e.g. claude-sonnet-4-20250514) for specific versions, and unversioned aliases (e.g. claude-sonnet-4-6) that always point to the current recommended model in that tier. Timestamped strings are deprecated on a rolling basis when a significantly better version has been available long enough for teams to migrate. Claude Sonnet 4 launched May 14, 2025 and has been superseded by Sonnet 4.6 (February 17, 2026) for over three months. Claude Opus 4 launched May 14, 2025 and was superseded by Opus 4.7 (April 16) and then Opus 4.8 (May 28, 2026).
Anthropic's recommendation is explicit in the release notes: "We recommend migrating to Claude Sonnet 4.6 and Claude Opus 4.8 respectively." These are strictly better models at the same price tier — the migration is not a downgrade. Sonnet 4.6 outperforms the original Sonnet 4 on coding, instruction following, and agent reliability. Opus 4.8 outperforms Opus 4 on every published benchmark and adds Dynamic Workflows, a 2.5x Fast Mode, and a 4x improvement in honesty and code reliability.
The Full June 15 Deprecation List
| Retiring model string |
Retire date |
Replacement |
Input / Output pricing |
| claude-sonnet-4-20250514 |
June 15, 2026 |
claude-sonnet-4-6 |
$3.00 / $15.00 per M tokens |
| claude-opus-4-20250514 |
June 15, 2026 |
claude-opus-4-8 |
$5.00 / $25.00 per M tokens |
Migration Checklist - Where to Look
Find all instances of retiring model strings
Bash - search your entire codebase
grep -r "claude-sonnet-4-20250514\|claude-opus-4-20250514" . --include="*.py" --include="*.ts" --include="*.js" --include="*.json" --include="*.yaml" --include="*.env" --include="*.toml"
Python - simple replacement
model = "claude-sonnet-4-6" # was: claude-sonnet-4-20250514
model = "claude-opus-4-8" # was: claude-opus-4-20250514
Environment variables - check these files too
.env .env.production .env.staging
docker-compose.yml kubernetes/ terraform/
config/ settings/ constants/
What Changes When You Migrate
Sonnet 4 → Sonnet 4.6: What improves
Coding quality, instruction following accuracy, and agent tool-calling reliability all improve. Sonnet 4.6 was released February 17, 2026 with significant improvements over the original Sonnet 4 on coding benchmarks. You should see better results on complex multi-step tasks. Response format and length characteristics are broadly similar.
Opus 4 → Opus 4.8: What improves and what to watch
Opus 4.8 is a significant upgrade: SWE-bench Pro at 69.2% (vs Opus 4's ~50%), 4x improvement in honesty and code reliability, Dynamic Workflows in Claude Code, and a 2.5x Fast Mode at $10/$50 per million tokens. Two things to test: (1) Opus 4.8 uses approximately 35% fewer output tokens on equivalent tasks due to more efficient reasoning - your costs may drop but your output length may be shorter if you relied on verbose Opus 4 outputs; (2) the honesty improvement means the model is more likely to flag uncertainty or flag issues it previously would have silently passed.
Watch out for: prompt sensitivity
Newer models can respond differently to prompts tuned for older ones. After migrating, run your test suite and check outputs against your quality baseline - particularly for long-running agentic workflows, structured output requirements, and any prompts that rely on specific formatting patterns from the old models. Most teams find the quality improves enough to justify any prompt tuning needed.
The August Deprecation - Plan Ahead
A third deprecation is also confirmed: claude-opus-4-1-20250805 retires on August 5, 2026. If you are on this model string, you have eight weeks - more runway than the June 15 deprecations. The migration target is claude-opus-4-8. Flag this now and schedule the migration before your August sprint cycle rather than scrambling at the deadline.
For the full context on what Opus 4.8 delivers vs prior versions, see our Claude Opus 4.8 launch and benchmarks article. For broader API cost comparisons across providers following these changes, see our ChatGPT vs Claude vs Grok 2026. For all June AI news including model releases as they happen, see the June 2026 AI news calendar.
Frequently Asked Questions
What happens if I don't migrate before June 15?
API calls using claude-sonnet-4-20250514 or claude-opus-4-20250514 will return error responses after June 15. Anthropic has not announced a grace period. Production systems using these model strings will break on June 15 without migration.
Will the pricing change when I migrate?
No - the pricing tier stays the same. Sonnet models are $3/$15 per million tokens (input/output). Opus models are $5/$25 per million tokens. What may change is your effective monthly cost if Opus 4.8's 35% token efficiency improvement reduces your output token consumption on equivalent tasks.
I'm using claude-sonnet-4-6 already - do I need to do anything?
No. The unversioned alias claude-sonnet-4-6 continues to work and points to the current recommended Sonnet model. You are not affected by this deprecation. The same applies if you are already on claude-opus-4-8.
What if I need the old model behavior for a specific use case?
The old model strings will not be available after June 15 - Anthropic does not provide indefinite backward compatibility for deprecated versions. If specific behavior from Sonnet 4 or Opus 4 is critical for your use case, document it now, migrate to the new model, and if the behavior differs significantly, file a support ticket with Anthropic describing the regression. The alternative is to implement the specific behavior through system prompt adjustments on the new model.