API version 2026-10-21: temperature is gone, and your SDK upgrade is a major version
In brief
On October 21, 2026 Anthropic released the first new Claude API version since 2023-06-01, along with new major versions of every SDK. Requests that send temperature, top_p, or top_k now fail with a 400. API keys move to the Authorization header. Here is what breaks, what to change, and how to upgrade without an outage.
Contents
Every Claude API request carries an anthropic-version header. For three years the only value anyone sent was 2023-06-01. On October 21, 2026, Anthropic released 2026-10-21, and shipped new major versions of every official SDK that send it by default.
Your code keeps working until you upgrade the SDK. When you do, some requests that worked yesterday return a 400.
The new SDK versions
These are the first versions that send 2026-10-21:
| SDK | Version |
|---|---|
Python (anthropic) |
2.0.0 |
TypeScript (@anthropic-ai/sdk) |
1.0.0 |
| Go | 2.0.0 (module path github.com/anthropics/anthropic-sdk-go/v2) |
| Java | 3.0.0 |
| C# | 13.0.0 |
| PHP | 1.0.0 |
| Ruby | 2.0.0 |
ant CLI |
2.0.0 |
They are also relicensed from MIT to Apache 2.0. No code change, but update your dependency license records.
If you use a pinned range like anthropic>=1,<2 or ^0.x, nothing changes until you raise it. That gives you time, but not forever: new features will target the new version.
What breaks in the Messages API
Sampling parameters return an error
temperature, top_p, and top_k are removed. Sending any of them returns a 400, even at the default value. The SDK types no longer have them, so a typed codebase will fail to compile before it fails at runtime.
# Before (anthropic 1.x)
client.messages.create(
model="claude-sonnet-5-5",
max_tokens=1024,
temperature=0.2,
messages=[{"role": "user", "content": "Classify this ticket: ..."}],
)
# After (anthropic 2.0)
client.messages.create(
model="claude-sonnet-5-5",
max_tokens=1024,
messages=[{"role": "user", "content": "Classify this ticket: ..."}],
)
For current models this changes nothing. Claude 4.7 and later already accepted only the defaults. The impact is on older models such as Sonnet 4.6, where a low temperature made output more consistent. On 2026-10-21 there is no replacement for that. If a pipeline depends on it, keep that request on 2023-06-01 while you move it to a newer model, and get consistency from structured outputs and tighter prompts instead. Our temperature explainer covers what the dial did.
Two message-shape rules
- A
documentblock placed directly in anassistantmessage returns a 400. Send documents inusermessages. - A
textblock with a non-emptycitationsarray in ausermessage returns a 400. Citations on Claude's own replies that you send back are still fine.
Both mostly affect code that hand-builds conversation history.
What breaks in the Admin and Analytics APIs
Several renamed fields lose their old names:
| Endpoint | Old field | Use instead |
|---|---|---|
| RBAC groups | roles |
role_ids |
| RBAC group members | group_id |
rbac_group_id |
| RBAC roles | name |
display_name |
| Rate limits | group_type |
group.type |
| API keys | workspace_id |
scope.workspace_id |
| Analytics user reports | actor.email |
actor.email_address |
| Activity summaries | summaries |
data |
If you built admin dashboards or provisioning scripts against these endpoints, grep for the old names.
What breaks in the SDKs themselves
These changes come with the new SDK major versions whatever API version you send:
- API keys go in
Authorization: Bearer, notX-Api-Key. The API accepts either, but a proxy, gateway, log filter, or test stub that readsX-Api-Keywill stop seeing the key. Foundry clients keepX-Api-Key. MessageParamis now a union ofUserMessageParam,AssistantMessageParam, andSystemMessageParam. Dict and object literals with a fixedrolestill work. Code that builds a message withroleas a variable needs a branch per role to type-check. In Python, callingMessageParam(role=..., content=...)now raisesTypeError.- Client-side compaction in the tool runner is gone (TypeScript and Ruby). Use server-side compaction.
- Text Completions is removed from the TypeScript, Go, Java, and Ruby SDKs.
- The CLI drops
--api-keyand--auth-tokenflags. Use the environment variable or--api-key-stdin.
TypeScript users on Bedrock, Vertex, Foundry, AWS, or Google Cloud: move the platform package (for example @anthropic-ai/bedrock-sdk) to 1.0.0 in the same change. Otherwise npm installs a second, older copy of the core SDK.
Bedrock has one more catch: 2026-10-21 works only with Claude 4.7 and later models there. Calls to older models on Bedrock must stay on the old SDK.
An upgrade plan that avoids an outage
- Search your code for
temperature,top_p,top_k,X-Api-Key, and the old admin field names. That list is your blast radius. - Check your gateway. If you route through LiteLLM, an internal proxy, or an API gateway that inspects
X-Api-Key, fix it first. It's the change most likely to fail quietly. - Upgrade the SDK in one branch with the fixes from step 1. Ship them together.
- Run your eval set before and after on the same model. With sampling parameters removed, any output drift on older models shows up here.
- Leave stragglers on the old version deliberately. A job that must keep
temperature=0on an older model can pin the old SDK. Write down why and when it moves.
If you use Claude Code, /claude-api api-version (added in Claude Code 2.1.307) walks a codebase through the migration. The full list of changes is in Anthropic's migration guide.