claude-news7 min read

Claude Model Deprecations June 2026: Complete Migration Guide for Developers

Haiku 3 is gone, Sonnet 4 and Opus 4 retire June 15, 2026. Here's exactly how to migrate your Claude API calls before the deadline — with code examples.

Claude Model Deprecations June 2026: Complete Migration Guide for Developers

If you're running Claude API calls in production, your inbox may have lit up last week. Anthropic confirmed a sweeping deprecation wave: Claude Haiku 3 is already gone, and Claude Sonnet 4 and Opus 4 retire on June 15, 2026. If your app still points at any of these model IDs, you have roughly seven weeks to migrate — or you'll start seeing errors.

This guide walks you through exactly what's being removed, why the timing matters, which replacement models to use, and how to swap your code safely.


What's Being Deprecated (And When)

Here's the current sunset schedule as of April 2026:

Model IDStatusDeadline
claude-haiku-3Already retiredApril 19, 2026
claude-haiku-3-5AvailableNo sunset announced
claude-sonnet-4DeprecatedJune 15, 2026
claude-opus-4DeprecatedJune 15, 2026
claude-sonnet-4-6AvailableNo sunset announced
claude-opus-4-6AvailableNo sunset announced
claude-haiku-4-5-20251001AvailableNo sunset announced

The pattern is clear: Anthropic is consolidating around the .4-5 and .4-6 generation. Any model string without a patch version (like claude-sonnet-4 or claude-opus-4) is being phased out in favor of its versioned equivalent.

Source: Anthropic Release Notes · Startup Fortune coverage of the April 19 outage and deprecation announcements

Why Is Anthropic Doing This Now?

Two forces are converging:

1. The 4.6 generation is stable. Claude Sonnet 4.6 and Opus 4.6 have been in production since late 2025. Anthropic has had enough time to harden them, and the older .4 variants no longer get safety updates or capability improvements. Keeping them alive has real infrastructure cost. 2. Enterprise procurement season. April–June is when large companies finalize AI vendor contracts and lock in usage tiers. Forcing migration before those contracts sign means enterprise customers bake the new model IDs into their agreements — which significantly reduces Anthropic's support burden for legacy endpoints.

The April 19 API outage (which hit Claude 4 and Opus endpoints in West Coast data centers) may have accelerated the timeline. Maintaining divergent infrastructure for deprecated models is a reliability risk, not just a cost center.


The Migration: Model-by-Model Swaps

If you were using claude-haiku-3

Haiku 3 is already gone. Every call to this model ID returns an error today. Your replacement is claude-haiku-4-5-20251001.

What changes in practice:

  • Speed: Haiku 4.5 is slightly slower on P50 latency but significantly better on longer prompts
  • Cost: Identical pricing tier — Haiku 4.5 is Anthropic's budget-tier model
  • Quality: Measurably better at structured output, JSON formatting, and instruction following

typescript// Before (broken)
const response = await anthropic.messages.create({
  model: "claude-haiku-3",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Summarize this article..." }]
});

// After (working)
const response = await anthropic.messages.create({
  model: "claude-haiku-4-5-20251001",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Summarize this article..." }]
});

If you were using claude-sonnet-4

Your replacement is claude-sonnet-4-6. You have until June 15 — but don't wait.

Sonnet 4.6 is strictly better than Sonnet 4: it handles a 1M-token context window (vs 200K), scores higher on coding benchmarks, and has improved tool-use reliability. The API is identical; it's a one-line string change.

typescript// Before
model: "claude-sonnet-4"

// After
model: "claude-sonnet-4-6"

If you rely on extended thinking / interleaved thinking, double-check your thinking block handling — Sonnet 4.6 returns thinking tokens differently in streaming mode. The Anthropic streaming docs have the updated examples.

If you were using claude-opus-4

Your replacement is claude-opus-4-6. Same June 15 deadline.

Opus 4.6 adds:

  • Vision at 3× higher resolution (relevant if you're processing images or PDFs)
  • "xhigh" effort level (useful for complex reasoning tasks that previously needed multiple Opus calls)
  • Task budgets — you can now set a token ceiling per task, which helps control costs in agentic workflows

typescript// Before
model: "claude-opus-4"

// After
model: "claude-opus-4-6"


Safe Migration Checklist

Before you push the model ID change to production, run through this:

1. Audit every model reference in your codebase

bash# Find all model ID strings in your project
grep -r "claude-haiku-3\|claude-sonnet-4\|claude-opus-4" --include="*.ts" --include="*.js" --include="*.py" .

Don't forget: environment variables, .env files, database config tables, CI/CD pipeline configs, and any hardcoded strings in data pipelines.

2. Run your eval suite against the new model

If you have an eval harness (you should — see the CCA exam prep section on evaluations), run your golden dataset through the new model ID before deploying. Prompt behavior is subtly different, especially for structured JSON output and long-context tasks.

3. Test streaming behavior

Streaming is where breaking changes hide. If you're using SSE streaming, test the full message lifecycle — especially content_block_start, content_block_delta, and message_stop events. Sonnet 4.6's thinking block changes the event sequence slightly.

4. Monitor token usage for 48 hours post-migration

Haiku 4.5 and Sonnet 4.6 are slightly more verbose than their predecessors. Your max_tokens limits are almost certainly fine, but cost projections based on the old models will be slightly off. Set up a PostHog or DataDog alert for token spend spikes in the first two days.

5. Update your model version in documentation

If you publish internal docs, README files, or Notion playbooks that reference model IDs — update them. Stale internal docs cause the most production incidents in AI integrations.


What This Means for CCA Certification Candidates

If you're studying for the Claude Certified Architect (CCA-F) exam, the deprecation timeline is testable material. The exam covers:

  • Anthropic's model versioning conventions (why patch versions matter)
  • Correct model selection for latency vs. capability trade-offs
  • Migration patterns for production Claude deployments
  • Cost optimization using the appropriate tier (Haiku vs. Sonnet vs. Opus)

The June 15 deprecation is recent enough that it may appear in updated exam question banks. Understanding why Anthropic deprecated these models — infrastructure consolidation, safety update cadence, enterprise contract timing — is the kind of reasoning the CCA exam rewards over simple memorization.


Common Migration Mistakes (And How to Avoid Them)

Mistake 1: Assuming claude-sonnet-4 and claude-sonnet-4-6 are identical

They're close, but not identical. Sonnet 4.6's extended context handling changes how it prioritizes information in very long prompts. Test your long-context use cases explicitly.

Mistake 2: Migrating prod and staging at the same time

Migrate staging first. Give it a week of traffic. Then migrate production. The cost of a week's delay is far lower than an incident in production during enterprise procurement season.

Mistake 3: Not updating your cost estimates

The newer models have the same per-token pricing but different token efficiency. A response that cost X tokens with Sonnet 4 may cost slightly more or fewer tokens with Sonnet 4.6, depending on the task. Re-baseline your cost projections.

Mistake 4: Ignoring the model-deprecated header

Anthropic returns a model-deprecated warning header in API responses before hard retirement. If you're not logging response headers, you won't catch the warning until calls start failing. Add header logging to your API wrapper now.


Key Takeaways

  • Claude Haiku 3 is already gone (retired April 19, 2026) — migrate to claude-haiku-4-5-20251001 immediately
  • Claude Sonnet 4 and Opus 4 retire June 15, 2026 — migrate to claude-sonnet-4-6 and claude-opus-4-6
  • Model ID changes are one-line swaps, but test your streaming, structured output, and long-context use cases before deploying
  • Grep your entire codebase — not just your main API call, but env files, CI configs, and database records
  • CCA candidates: the deprecation cycle, versioning conventions, and migration patterns are examinable topics


Next Steps

For developers: Start with the grep command above. If you find any deprecated model IDs, open a migration PR today — don't wait until June. For CCA exam candidates: Our free CCA practice test includes questions on model selection, versioning, and API best practices. The question bank is updated monthly — the June 2026 deprecation cycle is already in the rotation. For teams building production Claude apps: Consider pinning your model IDs using the full versioned string (e.g., claude-sonnet-4-6) and subscribing to the Anthropic status page for deprecation notices before they hit your error logs.
Sources: Anthropic Release Notes · Startup Fortune — Claude API Outage and Deprecation Coverage

Ready to Start Practicing?

300+ scenario-based practice questions covering all 5 CCA domains. Detailed explanations for every answer.

Free CCA Study Kit

Get domain cheat sheets, anti-pattern flashcards, and weekly exam tips. No spam, unsubscribe anytime.