Skip to content

Claude API 2026-10-21 drops temperature, top_p and top_k

Anthropic released Claude API version 2026-10-21 on October 21, 2026. Sending temperature, top_p or top_k now returns a 400 error, and seven SDKs get majors.

By Tech AI Wire Team

4 min read

XLinkedIn
The version history section of Anthropic's Claude Platform docs, listing version 2026-10-21 and the Messages API requests that now return a 400 error.

By the numbers

the new anthropic-version header value
2026-10-21
error returned for temperature, top_p or top_k
400
SDKs and CLIs with new major versions
8

Anthropic released a new Claude API version, 2026-10-21, on October 21, 2026. It removes the temperature, top_p and top_k sampling settings, and any request that sends one now fails with a 400 error. Seven official SDKs and the ant command-line tool shipped new major versions that use it by default.

The previous version, 2023-06-01, has been the default for more than three years. Munder Difflin's daily agent-tools roundup describes this as Anthropic's first new API version since then.

How Claude API versions work

Every request to the Claude API carries an anthropic-version header. Its value is a date that pins the request to one fixed set of behavior. To use the new version without an SDK, send anthropic-version: 2026-10-21.

Within one version, Anthropic's versioning page promises that existing input and output fields stay as they are. Anthropic can still add optional inputs, new output values and new streaming event types. Removing or renaming a field needs a new dated version, which is what happened here.

The SDKs pick the version for you. The migration guide says requests "use the API version that was current when your SDK's major version was released." Code on an older SDK major keeps sending 2023-06-01 until you upgrade it.

What breaks in the Messages API

Three request shapes now return a 400 error, according to Anthropic's release notes:

  • Sampling settings. temperature, top_p and top_k are removed. Sending any of them fails on every model.
  • Documents in assistant turns. A document block placed directly in an assistant message is rejected.
  • Citations in user turns. A text block with a non-empty citations array in a user message is rejected. That includes one nested inside a search_result block.

The Admin API also renames several fields. RBAC groups use role_ids instead of roles, and roles use display_name instead of name. API keys move workspace_id into scope.workspace_id. Two Claude Enterprise Analytics fields change as well: actor.email becomes actor.email_address, and summaries becomes data.

The new version works on the Claude API, Claude Platform on AWS, Microsoft Foundry and Google Cloud. On Amazon Bedrock it covers Claude 4.7 and later models only.

The new SDK major versions

These are the first releases that send 2026-10-21, per the release notes and migration guide:

SDK or toolFirst version on 2026-10-21
Python (anthropic)2.0.0
TypeScript (@anthropic-ai/sdk)1.0.0
C# (Anthropic)13.0.0
Go (anthropic-sdk-go/v2)2.0.0
Java (com.anthropic:anthropic-java)3.0.0
PHP (anthropic-ai/sdk)1.0.0
Ruby (anthropic gem)2.0.0
ant CLI2.0.0

The SDKs carry breaking changes of their own, separate from the API version. The migration guide lists the main ones:

  • Authorization header. The SDKs and CLI now send the key as Authorization: Bearer, not X-Api-Key. The API accepts either header, but a proxy or gateway that reads X-Api-Key must change.
  • One credential per client. Passing both an API key and an auth token is now an error. In Python it raises ValueError; in TypeScript, TypeError.
  • Text Completions removed. The old completions interface is gone from the TypeScript, Go, Java and Ruby SDKs and from the CLI. Use the Messages API.
  • Go module path. Go code must change every import to github.com/anthropics/anthropic-sdk-go/v2 and needs Go 1.25 or later.
  • PHP upgrade command. A plain composer update stays on the old major version. Use composer require to move to 1.0.0.

The licence changes too. Starting with these versions, the SDKs and CLI are licensed under Apache 2.0 instead of MIT. Earlier versions stay under MIT, and the guide says no code changes are needed for that.

Later on October 21, Python SDK 2.1.0 and TypeScript SDK 1.1.0 added enforcement status and actions to user profiles. That is a separate feature, not part of the version change.

What this means for developers

Nothing breaks until you upgrade an SDK major version or change the header yourself. That gives you time, but the release notes name no shutdown date for 2023-06-01. Plan the move rather than waiting for one.

  • Search for sampling settings first. Find every call that sets temperature, top_p or top_k, including in wrappers and config files. Each one becomes a 400 error after the upgrade.
  • Check what sits between you and the API. A logging proxy, gateway or secret scanner that reads X-Api-Key will stop seeing the key once the SDK sends Authorization: Bearer.
  • Pin the major version in your lockfile. An unpinned anthropic or @anthropic-ai/sdk range can jump to the new major on the next install. Upgrade on purpose, with tests.
  • Review stored conversations. If you replay saved message histories, check them for documents in assistant turns or citations in user turns.
  • Tell whoever tracks licences. The new majors are Apache 2.0, not MIT. Record the change before the upgrade ships.

Sources

  1. Claude Platform release notes: API - Anthropic
  2. Migrating to API version 2026-10-21 - Anthropic
  3. Versions - Anthropic
  4. Agent Tools Today, 22 Oct 2026: Claude API 2026-10-21, LayerFS 1.0, PHP2Shell - Munder Difflin

Related articles

The weekly digest

One email every Friday with the week's top stories from all six desks: AI, dev tools, coding, the tech industry, startups and what's next. Free, no spam.

Unsubscribe anytime with one click.