Model Comparison

Claude 4 Sonnet vs Claude Sonnet 4.6 — What Changed?

Claude 4 Sonnet is dead. Claude Sonnet 4.6 is the successor — same price with 5x larger context window. Here's everything you need to know.

Published Jun 12, 2026 · 5 min read

Claude 4 Sonnet was retired on June 15, 2026. If you're still using it, your API calls are returning 404 errors. The good news: Claude Sonnet 4.6 is the official successor, it costs the same, and it has a 5x larger context window.

This comparison covers everything that changed between Claude 4 Sonnet and Claude Sonnet 4.6 — pricing, performance, context window, and how to migrate.

Quick Comparison

Feature Claude 4 Sonnet (DEAD) Claude Sonnet 4.6 (SUCCESSOR)
Status Retired June 15, 2026 Active — current model
Input Cost $3 / 1M tokens $3 / 1M tokens (same)
Output Cost $15 / 1M tokens $15 / 1M tokens (same)
Context Window 40K tokens 200K tokens (5x larger)
API Format Messages API Messages API (identical)
Model ID claude-4-sonnet claude-sonnet-4-6
Reasoning Good Improved
Coding Good Better
Speed Fast Faster
Availability None — 404 errors 100% uptime SLA

The Big Win: 5x Context Window

The most significant change is the context window: 200K tokens (up from 40K). That's 5x more text in a single prompt.

Context Window Claude 4 Sonnet Claude Sonnet 4.6
Tokens 40,000 200,000
Approximate Words ~30,000 ~150,000
Approximate Pages ~100 pages ~500 pages
Code Files ~20-30 files ~100-150 files

This means you can now process entire codebases, long documents, or complex multi-turn conversations without hitting context limits.

How to Migrate

Migration is a one-line change:

// Before (dead — returning 404)
model: "claude-4-sonnet"

// After (official successor)
model: "claude-sonnet-4-6"

Same API, same SDK, same parameters, same prompts. Your existing code works without any other changes.

LangChain / LlamaIndex

# LangChain
chat = ChatAnthropic(model="claude-sonnet-4-6")  # was "claude-4-sonnet"

# LlamaIndex
llm = Anthropic(model="claude-sonnet-4-6")  # was "claude-4-sonnet"

Find All References

grep -r "claude-4-sonnet" --include="*.js" --include="*.ts" --include="*.py" --include="*.json" .

Ready to Migrate?

Use the APIpulse migration calculator to see your exact costs, then update your model ID. It takes 30 minutes.

Calculate Costs →

Should You Switch to a Cheaper Alternative?

Sonnet 4.6 is the best drop-in replacement, but if cost is your primary concern, there are cheaper options:

Model Input / Output vs Claude 4 Sonnet Best For
Claude Sonnet 4.6 $3 / $15 Same price, 5x context Drop-in replacement
GPT-5 Mini $0.40 / $1.60 87% cheaper Budget, high volume
Gemini 2.5 Flash $0.15 / $0.60 96% cheaper Google ecosystem
DeepSeek V4 Pro $0.44 / $0.87 94% cheaper Maximum savings
Llama 4 Maverick $0.27 / $0.85 97% cheaper Self-hosted, open source

Use the APIpulse comparison tool to test these models against your specific use case.

Frequently Asked Questions

Will my prompts work the same on Sonnet 4.6?

Yes. Claude Sonnet 4.6 uses the same API format and responds to the same prompts. You may see slightly different outputs (it's a newer model), but your existing prompts will work without modification.

Is Sonnet 4.6 compatible with Claude 4 Sonnet SDKs?

Yes. The Anthropic SDK, OpenAI SDK (with Anthropic adapter), LangChain, LlamaIndex, and all other popular frameworks work with Sonnet 4.6. Only the model ID string changes.

What about Claude 4 Opus?

Claude 4 Opus is also retired. Its successor is Claude Opus 4.8 ($5/$25) — 67% cheaper with better performance. See the full Opus comparison.

Can I still use Claude 4 Sonnet through OpenRouter or Bedrock?

No. All providers have removed Claude 4 Sonnet from their available models. The model is gone from Anthropic's API entirely.

Related Reading