DEV Community

FlareCanary
FlareCanary

Posted on

Claude Opus 4 and Sonnet 4 retire June 15 — your `claude-opus-4-0` alias is about to start failing

On April 14, 2026, Anthropic deprecated claude-opus-4-20250514 and claude-sonnet-4-20250514. Both models retire on June 15, 2026 — about four weeks from today. After that, the Anthropic API returns errors for those snapshot IDs.

Most teams reading this already know that. What they often don't know is what else breaks on June 15, because Claude 4 is more entangled in production code than just one model ID.

Here is the silent-fail surface we keep seeing on review:

1. The claude-opus-4-0 and claude-sonnet-4-0 aliases retire with the snapshot

Anthropic exposes versioned aliases like claude-opus-4-0 and claude-sonnet-4-0 so callers don't have to track datestamp suffixes. The aliases are convenient — until the underlying snapshot is the one being retired.

claude-opus-4-0 resolves to claude-opus-4-20250514. That is the snapshot being retired. On June 15, the alias breaks too.

This catches teams that did due-diligence audits by searching their codebase for 20250514. The snapshot ID isn't in the code — the alias is. Grep both:

git grep -E "claude-(opus|sonnet)-4-0\b|claude-(opus|sonnet)-4-20250514"
Enter fullscreen mode Exit fullscreen mode

If you find -4-0 references, those calls fail on June 15 the same as the explicit snapshot.

2. Don't confuse 4-0 with 4-1

The Anthropic deprecation table lists only claude-opus-4-20250514 as retiring on June 15. claude-opus-4-1-20250805 — Opus 4.1 — is still active, retirement "not sooner than August 5, 2026."

Reading that quickly invites a wrong conclusion: "we're on Opus 4-point-something, we're fine."

You aren't. The retirement is specific to the bare 4 release. If your code says claude-opus-4-0, you're not on 4.1, you're on the model that retires next month.

3. Bedrock and Vertex AI run their own schedule

The retirement dates Anthropic publishes apply to the Anthropic API, the Claude Platform on AWS, and Microsoft Foundry. Partner-operated platforms — Amazon Bedrock and Vertex AI — set their own schedules.

In practice, the same alias may keep working on Bedrock past June 15 while failing against the Anthropic API. We've seen this fail one specific way:

  • Local dev + CI test against a Bedrock endpoint, all green.
  • Prod calls the Anthropic API direct, starts erroring.
  • The error doesn't reproduce in the dev environment because Bedrock's anthropic.claude-opus-4-v1:0 model identifier hasn't retired yet.

If you run a multi-cloud Anthropic stack, check the Bedrock and Vertex AI tables separately. Don't infer one from the other.

4. Mocked SDK tests will not catch this

A common test pattern:

@patch("anthropic.Anthropic")
def test_summarizer(mock_client):
    mock_client.return_value.messages.create.return_value = MagicMock(
        content=[MagicMock(text="summary")]
    )
    result = summarize("...")
    assert result == "summary"
Enter fullscreen mode Exit fullscreen mode

The mock doesn't care which model string you pass. The string "claude-opus-4-0" is just a parameter the mock ignores. The test stays green forever — including the moment after the model is retired in production.

The fix is to push at least one integration test (gated on an API key in CI) against the live Anthropic API for each model ID your code references. If the model is retired, that test goes red. If it's mocked-only, you find out from a customer.

5. Model-router fallback configs go silent

Teams that built model-router fallbacks during the 2025 outages have configs that look like this:

models:
  primary: claude-opus-4-7
  fallback:
    - claude-opus-4-0       # <-- retires June 15
    - claude-opus-3
  on_error: ["rate_limit", "model_unavailable"]
Enter fullscreen mode Exit fullscreen mode

The intent is "if 4.7 is rate-limited or unavailable, fall back to a different model." After June 15, the fallback list contains a retired model. Routing through to the fallback now produces a hard error instead of degraded service. Worse: most routers count the fallback attempt as a successful retry and never escalate.

Audit your router configs alongside your direct call sites.

6. Evals and comparison harnesses lose their baseline

If your team runs comparative evals against fixed model versions — common for regression testing prompt changes — you have a hardcoded claude-opus-4-20250514 somewhere in the eval harness. On June 15 that branch of the eval errors out. Most eval runners are written to mark errors as "skip," not "fail," because the assumption was the error is transient. After June 15, the skip is permanent and you've quietly stopped measuring against that baseline.

Capture a final round of baseline scores before June 15, snapshot the outputs, and switch the eval target to a still-active model.

The fix

Anthropic's recommended replacements (from the official deprecation table):

Retiring Recommended replacement
claude-opus-4-20250514 (claude-opus-4-0) claude-opus-4-7
claude-sonnet-4-20250514 (claude-sonnet-4-0) claude-sonnet-4-6

API format, auth, and response structure are unchanged — only the model identifier needs to update. Pricing and capabilities differ from 4.0; do not assume the swap is cost-neutral.

If you're already doing the migration work, claude-opus-4-7 is the current top-of-line and worth jumping to rather than stopping at 4.5.

A clean migration checklist

  1. git grep -E "claude-(opus|sonnet)-4-0\b|claude-(opus|sonnet)-4-20250514" across all repos, including infra-as-code, config files, prompts, and eval harnesses.
  2. Check Bedrock and Vertex AI configs separately if you use them.
  3. Audit model-router fallback chains for any 4.0 references.
  4. Add at least one integration test per model ID that hits the live Anthropic API, gated on a CI secret. Mocked tests do not catch retirement.
  5. Capture a final baseline of any comparative evals against the retiring models before June 15. Snapshot the outputs.
  6. Replace claude-opus-4-0claude-opus-4-7, claude-sonnet-4-0claude-sonnet-4-6. Test response shape and cost in staging.
  7. Re-run evals on the replacement to confirm acceptable quality on your tasks.

The fact that the API format is unchanged is what makes this dangerous. There is no schema diff to spot at code-review time. The only signal you'll get is the request failing in production at 12:00 UTC on June 15 — unless you go looking for the alias now.


FlareCanary watches your third-party APIs and SDKs for breaking changes like this one — including model retirements and alias remappings — and surfaces them before they hit production. Free tier monitors 5 endpoints.

Top comments (0)