◈AI Codex
Claude APIupdate

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.

9 min read·Temperature

Contents

♡Sign in to save

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 document block placed directly in an assistant message returns a 400. Send documents in user messages.
  • A text block with a non-empty citations array in a user message 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, not X-Api-Key. The API accepts either, but a proxy, gateway, log filter, or test stub that reads X-Api-Key will stop seeing the key. Foundry clients keep X-Api-Key.
  • MessageParam is now a union of UserMessageParam, AssistantMessageParam, and SystemMessageParam. Dict and object literals with a fixed role still work. Code that builds a message with role as a variable needs a branch per role to type-check. In Python, calling MessageParam(role=..., content=...) now raises TypeError.
  • 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-key and --auth-token flags. 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

  1. Search your code for temperature, top_p, top_k, X-Api-Key, and the old admin field names. That list is your blast radius.
  2. 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.
  3. Upgrade the SDK in one branch with the fixes from step 1. Ship them together.
  4. Run your eval set before and after on the same model. With sampling parameters removed, any output drift on older models shows up here.
  5. Leave stragglers on the old version deliberately. A job that must keep temperature=0 on 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.

Related tools

Weekly brief

For people actually using Claude at work.

Each week: one thing Claude can do in your work that most people haven't figured out yet — plus the failure modes to avoid. No tutorials. No hype.

No spam. Unsubscribe anytime.

What to read next

Picked for where you are now

All articles →