SunsetDiff

Replacement for claude-sonnet-4-20250514: what changes when you switch

The official replacement is claude-sonnet-5-5. claude-sonnet-4-20250514 shut down on 2026-06-15 per Anthropic's deprecation page (checked 2026-11-12). Price, context window, and max output were left blank because the official pages we checked did not publish them.

This is the canonical diff. Model page · Replacement page · Anthropic

Request errors

Request breaking changes

These rows are from the breaking-changes list. JSON · CSV

7rules that apply here.
Old settingWhat happensFixSource
temperature set to a non-default valuetemperature is deprecated for this modelRemove temperature from the request.Claude Sonnet 5.5 migration guide, checked 2026-10-20 · Error page
top_p or top_k set to a non-default valueThe Sonnet 5.5 migration guide says a non-default top_p or top_k returns a 400 on claude-sonnet-5-5. It does not print a separate error sentence for those fields. Claude Sonnet 4.6 and earlier, and Claude Haiku 4.5, still accept them.Remove top_p and top_k from the request.Claude Sonnet 5.5 migration guide, checked 2026-10-20 · Error page
thinking.type set to "disabled"To turn thinking off on this model, send "thinking": {"type": "between_tools"} instead of {"type": "disabled"}. The model does not think before responding. The short updates it writes between tool calls come back as thinking blocks.Send thinking type "between_tools". The guide accepts that value at low, medium, or high effort. between_tools takes no display, budget_tokens, or block_binding field.Claude Sonnet 5.5 migration guide, checked 2026-10-20 · Error page
thinking.type "between_tools" with output_config.effort "xhigh" or "max"The Sonnet 5.5 migration guide says between_tools returns a 400 at xhigh or max effort. It does not print a separate error sentence. between_tools is accepted at low, medium, and high effort.Set output_config.effort to low, medium, or high when thinking type is between_tools.Claude Sonnet 5.5 migration guide, checked 2026-10-20 · Error page
thinking.type "enabled" with budget_tokens"thinking.type.enabled" is not supported for this model. Use "thinking.type.adaptive" and "output_config.effort" to control thinking behavior.Remove budget_tokens. Send thinking type adaptive and output_config.effort.Claude Sonnet 5.5 migration guide, checked 2026-10-20 · Error page
tool_choice type "tool" or type "any"tool_choice: type "tool" and "any" are not supported for this model.Send tool_choice type "auto", set strict true on the tool, and say in the prompt when to call the tool.Claude Sonnet 5.5 migration guide, checked 2026-10-20 · Error page
a conversation whose last message is an assistant prefillThis model does not support assistant message prefill. The conversation must end with a user message.End the conversation with a user message. For output format, use structured outputs. For a continuation, move the instruction into the user message.Claude Sonnet 5.5 migration guide, checked 2026-10-20 · Error page

claude-sonnet-4-20250514 to claude-sonnet-5-5

Some values not published Checked 2026-11-12.

Price per 1M tokens

Price comparison. Example monthly cost for 10M input tokens and 2M output tokens. Labeled example, not a bill.
FieldOldNewChange
Input Not published $2 Not published
Output Not published $10 Not published
Cached input Not published $0.1 Not published
Example monthly cost Not published $40 Example only

Context and max output

Token limits
LimitOldNewChange
Context window Not published 1,000,000 Not published
Max output Not published 128,000 Not published

Capabilities that differ

No differing capability values are published for both models.

API changes

No parameter change is listed on the official pages we checked. The sample below only swaps the model id.

Code

python before
import anthropic
client = anthropic.Anthropic()
message = client.messages.create(
    model="claude-sonnet-4-20250514",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello"}],
)
python after
import anthropic
client = anthropic.Anthropic()
message = client.messages.create(
    model="claude-sonnet-5-5",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello"}],
)
typescript before
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic();
const message = await client.messages.create({
  model: "claude-sonnet-4-20250514",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Hello" }],
});
typescript after
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic();
const message = await client.messages.create({
  model: "claude-sonnet-5-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Hello" }],
});
curl before
curl https://api.anthropic.com/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{"model":"claude-sonnet-4-20250514","max_tokens":1024,"messages":[{"role":"user","content":"Hello"}]}'
curl after
curl https://api.anthropic.com/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{"model":"claude-sonnet-5-5","max_tokens":1024,"messages":[{"role":"user","content":"Hello"}]}'

Checklist

  1. Read the shutdown date for claude-sonnet-4-20250514 on the linked official page.
  2. Point your requests at claude-sonnet-5-5.
  3. Re-check price, context, and parameters on the provider pages linked here.
  4. Ship the change before the published shutdown date.

Questions

What is the replacement for claude-sonnet-4-20250514?

The official replacement is claude-sonnet-5-5. claude-sonnet-4-20250514 shut down on 2026-06-15 per Anthropic's deprecation page (checked 2026-11-12). Price, context window, and max output were left blank because the official pages we checked did not publish them.

Is claude-sonnet-5-5 cheaper than claude-sonnet-4-20250514?

A full price comparison is not published. One or both prices are missing from the official pages we checked.

Does claude-sonnet-5-5 have a bigger context window than claude-sonnet-4-20250514?

Context window sizes are not both published on the official pages we checked.