apiwatch

All changes / Anthropic

Breaking rest

On API version 2026-10-21, released October 21, 2026 and sent by default by the new SDK majors, Messages requests that send temperature, top_p or top_k, a document block directly in an assistant message, or citations on text blocks in user messages return a 400 error

Took effect · Claude API version 2026-10-21 (opt-in; default in the new SDK majors) — Messages API, token counting and Message Batches requests

Reviewed against the vendor source on Oct 23, 2026 (AI-assisted review). Key facts are re-checked against the source daily.

What changes

Opt-in: requests on 2023-06-01 are unchanged; the change applies once a project sets anthropic-version: 2026-10-21 or upgrades to Python SDK 2.0.0, TypeScript SDK 1.0.0, Go SDK v2, Java SDK 3.0.0, C# SDK 13.0.0, PHP SDK 1.0.0, Ruby SDK 2.0.0 or ant CLI 2.0.0, which send 2026-10-21 by default (their Bedrock and Google Cloud clients too). It covers POST /v1/messages, token counting and each request in a Message Batch created with 2026-10-21. temperature, top_p and top_k return a 400 even at their default values, and the new SDKs and CLI no longer have the three parameters; without them a request samples with the defaults (temperature 1.0), so a request that lowered temperature on a model that accepts other values (such as Claude Sonnet 4.6) loses that effect, and nothing replaces it. A document block placed directly in an assistant message returns a 400 (a document nested in another block, such as a web fetch tool result, is still accepted). A text block with a non-empty citations array in a user message, including inside search_result blocks, returns a 400; citations on assistant text blocks and the "citations": {"enabled": true} setting on documents and search results are still accepted. On Amazon Bedrock, 2026-10-21 is available only for Claude 4.7 and later models.

Breaking: Calls fail after this date.

What to do

Before moving to 2026-10-21 (or the new SDK major): remove temperature, top_p and top_k from Messages, token-counting and batch requests, including any extra_body or raw JSON that still sends them; a request that needs a non-default value can stay on 2023-06-01, since nothing replaces it on 2026-10-21. Move document blocks out of assistant messages into user messages. Remove citations from text blocks (and search_result content) in user messages; assistant citations and "citations": {"enabled": true} can stay. On Bedrock, switch a call to a Claude 4.7 or later model before moving it to 2026-10-21, or keep the version it sends today. Release the upgrade together with these fixes.

Strings to search for

"temperature""top_p""top_k"temperature:top_p:top_k:

Counts only in files that mention anthropic + messages.create or anthropic + messages.stream or anthropic + messages->create or anthropic + /v1/messages or anthropic + count_tokens or anthropic + countTokens or anthropic + batches.create or anthropic + toolRunner or anthropic + tool_runner; repos that depend on anthropic 2.x (pypi) or @anthropic-ai/sdk 1.x (npm) or anthropic 2.x (rubygems) or anthropic-ai/sdk 1.x (packagist); or repos that mention anthropic-sdk-go/v2 or anthropic-cli/v2 or com.anthropic:anthropic-java:3. or include="anthropic" version="13. or anthropic-version + 2026-10-21 (including dependency manifests).

Source

https://platform.claude.com/docs/en/api/migration-2026-10-21.md