Claude 4 Deprecation Checklist: Step-by-Step Migration Before June 15
Claude 4 Opus and Claude Sonnet 4 retire on June 15, 2026. You have 13 days. This checklist walks you through every step โ from auditing your codebase to deploying the migration. Follow it top to bottom.
Quick summary: Search your code for claude-4-opus and claude-sonnet-4. Replace with claude-opus-4-8 and claude-sonnet-4-6. Test. Deploy. You're done โ and you save up to 67%.
The Complete Checklist
Follow these 8 steps in order. Each one builds on the previous. Total estimated time: under an hour for most projects.
-
1
Audit Your Codebase
Find every reference to deprecated model names. Search your entire codebase โ including config files, environment variables, and hardcoded strings:
# Search for Claude 4 Opus references grep -r "claude-4-opus" . --include="*.js" --include="*.py" --include="*.ts" --include="*.json" --include="*.yaml" --include="*.yml" --include="*.env" --include="*.toml" # Search for Claude Sonnet 4 references grep -r "claude-sonnet-4" . --include="*.js" --include="*.py" --include="*.ts" --include="*.json" --include="*.yaml" --include="*.yml" --include="*.env" --include="*.toml"Also check: database records, admin panels, prompt templates, and any documentation that references the old model names.
Estimated time: 10 minutes -
2
Document Current Costs
Before migrating, record your current Claude 4 spending. This gives you a baseline to verify savings after migration.
Check your Anthropic billing dashboard and note your monthly spend on Claude 4 Opus and Sonnet 4. Or use our deprecation calculator to model your costs.
Model Monthly Input Tokens Monthly Output Tokens Current Cost Claude 4 Opus Your usage Your usage Your cost Claude Sonnet 4 Your usage Your usage Your cost Estimated time: 5 minutes -
3
Choose Your Replacement
Decide what to migrate to. The simplest path is Anthropic's newer models. For maximum savings, consider cross-provider alternatives.
Option Replace Price (per M tokens) Savings Effort Claude Opus 4.8 Claude 4 Opus $5 / $25 67% Minimal Claude Sonnet 4.6 Claude Sonnet 4 $3 / $15 0% (same price) Minimal GPT-5 Either $1.25 / $10 89% Moderate Gemini 3.1 Pro Either $1 / $5 93% Moderate DeepSeek V4 Pro Either $0.44 / $0.87 98% Higher For most teams, Claude Opus 4.8 is the right choice โ 67% cheaper, same SDK, same API key, one-line change.
Estimated time: 5 minutes -
4
Update Model Names
Replace the deprecated model name strings in your code. Here's the mapping:
Deprecated Replacement claude-4-opusclaude-opus-4-8claude-sonnet-4claude-sonnet-4-6Python
# Before client.messages.create( model="claude-4-opus", messages=[{"role": "user", "content": "Hello"}] ) # After client.messages.create( model="claude-opus-4-8", messages=[{"role": "user", "content": "Hello"}] )Node.js
// Before const response = await anthropic.messages.create({ model: "claude-4-opus", messages: [{ role: "user", content: "Hello" }] }); // After const response = await anthropic.messages.create({ model: "claude-opus-4-8", messages: [{ role: "user", content: "Hello" }] });REST API (curl)
# Before curl https://api.anthropic.com/v1/messages \ -d '{"model": "claude-4-opus", ...}' # After curl https://api.anthropic.com/v1/messages \ -d '{"model": "claude-opus-4-8", ...}'Estimated time: 15 minutes -
5
Update Environment Variables
Check your
.envfiles, Docker configs, and deployment settings. Many projects store the model name as an environment variable:# .env or .env.local # Before ANTHROPIC_MODEL=claude-4-opus # After ANTHROPIC_MODEL=claude-opus-4-8Also check: Vercel environment variables, AWS Parameter Store, Kubernetes secrets, or any config management system.
Estimated time: 5 minutes -
6
Test in Development
Before deploying to production, test the new model name with your existing API key. Both old and new model names work until June 15, so you can run parallel tests.
- Run your test suite with the new model name
- Verify API responses are correct
- Check that streaming works (if you use it)
- Test function calling / tool use (if applicable)
- Verify output quality meets your requirements
Pro tip: Run the same prompt with both models side-by-side to compare output quality. The new models may produce slightly different results.
Estimated time: 15 minutes -
7
Deploy to Production
Once tests pass, deploy your changes. Since the API key and SDK don't change, this is a standard code deployment โ no infrastructure changes needed.
- Commit and push your changes
- Deploy to production
- Monitor for errors in your first few requests
- Verify your Anthropic billing dashboard shows the new model
Estimated time: 5 minutes -
8
Verify Savings
After 24-48 hours of production usage, check your Anthropic billing dashboard. Your costs should be lower (if you migrated to Claude Opus 4.8) or the same (Sonnet 4.6).
Use our deprecation calculator to compare your actual savings against projections.
Estimated time: 2 minutes๐จ June 15 deadline: See all 34 alternatives, calculate your savings, and get migration code on our Claude 4 Deprecation Hub.
Migration complete? Calculate your savings.
See exactly how much you saved by switching from Claude 4 to the new models.
Deprecation Calculator โ Migration Tool โ Cheapest LLM APIsCommon Migration Issues
"Model not found" error
If you get a "model not found" error after deploying, double-check that you replaced all instances of the old model name. Check config files, environment variables, and any hardcoded strings in prompt templates.
Different output quality
Claude Opus 4.8 and Sonnet 4.6 are improvements over their predecessors, but the output may differ slightly for the same prompt. If quality matters for your use case, test with representative prompts before deploying.
Prompt chains with model names in the prompt
If your prompts reference model names (e.g., "You are Claude 4 Opus"), update those references too. The new model names should be used wherever the old ones appear.
Third-party libraries
If you use third-party libraries that wrap the Anthropic API, check if they have hardcoded model names. Some libraries may need updates or configuration changes.
Related Resources
- Claude 4 Stopped Working? โ Quick fix guide if your API calls are already failing
- Claude Deprecation Calculator โ Calculate your exact migration cost and savings
- Claude 4 Migration Tool โ Compare all 34 alternatives with your exact usage
- Claude 4 Migration Guide โ Detailed code examples in Python, Node.js, and REST API
- Claude 4 Deprecation FAQ โ Every question answered about the deprecation
- Claude 4 Deprecation Countdown โ Live countdown and timeline
- Best Claude 4 Alternatives โ Detailed comparison of all replacement options
- LLM Pricing Comparison โ Compare all 34 models across 10 providers
Don't miss the June 15 deadline
Calculate your migration cost, compare alternatives, and switch before it's too late.
Deprecation Calculator โ Migration Tool โ Step-by-Step Guide โ