
Claude API version 2026-10-21 drops temperature; new SDKs switch by default
Upgrading to Python SDK 2.0.0, TypeScript 1.0.0 or any new Claude SDK moves you to an API version that rejects temperature, top_p and top_k.
If you build on the Claude API, don't bump your SDK blindly this week. Anthropic released API version 2026-10-21 on Wednesday, along with new major versions of every official SDK and the ant CLI that send it by default, per the release notes. Under the new version, a request that sends temperature, top_p or top_k gets a 400 error, "even at the parameter's default value," per the migration guide. Read it first, then upgrade.
What changed#
The versions page lists 2026-10-21 as the first new version since 2023-06-01. The new SDKs are Python 2.0.0, TypeScript 1.0.0, C# 13.0.0, Go 2.0.0, Java 3.0.0, PHP 1.0.0, Ruby 2.0.0 and ant CLI 2.0.0. The Python and TypeScript changelogs list the new API version under breaking changes.
2023-06-01 (old SDKs) | 2026-10-21 (new SDKs) | |
|---|---|---|
temperature, top_p, top_k (Messages and Message Batches) | Accepted | 400 error on every model |
citations on text blocks in user messages | Accepted | 400 error |
document block directly in an assistant message | Accepted | 400 error |
| Admin API key workspace | workspace_id | scope.workspace_id |
| How most SDK clients send your key | X-Api-Key header | Authorization: Bearer |
| SDK and CLI license | MIT | Apache 2.0 |
Several Admin API and Enterprise Analytics fields also lose their old names, for example actor.email becomes actor.email_address. The new SDKs drop Text Completions from TypeScript, Go, Java, Ruby and the CLI, and split MessageParam into one type per role.
Why it matters#
On Claude 4.7 and later models, losing the sampling knobs changes nothing, because those models "already accept only the defaults." On older models such as Claude Sonnet 4.6, the guide says a request that lowered temperature for more consistent output "loses that effect. No other setting replaces it." The guide's options are to stop sending the parameter or keep that request on 2023-06-01. The versions page says previous versions "are considered deprecated and may be unavailable for new users," so our read is to plan the move rather than pin forever.
How to upgrade#
These are the guide's three steps.
- Switch to
2026-10-21. Upgrade to the SDK version listed above for your language. Without an SDK, send the headeranthropic-version: 2026-10-21. TypeScript: move@anthropic-ai/bedrock-sdk,vertex-sdk,foundry-sdk,aws-sdkandgoogle-cloud-sdkto v1 in the same upgrade, or your package manager installs a second, older copy of the SDK. Go: change every import togithub.com/anthropics/anthropic-sdk-go/v2; for the CLI,go installneeds the/v2path, because "The old path keeps installing the latest v1 release, with no error or warning." - Update your code for the breaking changes, then release the upgrade together with those fixes. To find them, this prompt for any coding agent (ours, untested) does a read-only pass:
Audit this repository for the Claude API 2026-10-21 upgrade. List every place that sends temperature, top_p or top_k; sends citations on text blocks in user messages; puts document blocks directly in assistant messages; calls the Text Completions API; or relies on the X-Api-Key header. Give file and line for each and the change the migration guide asks for. Don't edit anything.
- Test against
2026-10-21before you release, as the guide asks.
Good to know#
- Gateways that read
X-Api-Keybreak. The new SDKs send the key asAuthorization: Bearer, except the Foundry clients, which still sendX-Api-Key. Change a proxy that readsX-Api-Keyto readAuthorization. The API itself "accepts a key in either header," so direct callers need no change. - Bedrock is limited. "On Amazon Bedrock,
2026-10-21is available only for Claude 4.7 and later models." For older Bedrock models, the guide says to stay on the SDK version you use today. - The CLI drops key flags.
antno longer accepts--api-keyor--auth-token; useANTHROPIC_API_KEY,--api-key-stdinorant auth loginfor keys. - One credential per client. In Python 2.0.0, passing two credentials to a client raises
ValueError. - License trackers need an update. "Earlier versions remain under the MIT License." The npm and PyPI listings for the new versions show Apache-2.0.
What to watch: whether Anthropic sets a retirement date for 2023-06-01, and how fast frameworks that wrap the SDKs ship their own upgrades.
Steps
- Switch to 2026-10-21: upgrade to the first SDK major that uses it (Python 2.0.0, TypeScript 1.0.0, C# 13.0.0, Go 2.0.0, Java 3.0.0, PHP 1.0.0, Ruby 2.0.0, ant CLI 2.0.0), or set the anthropic-version header yourself.
- On Amazon Bedrock, keep calls to models older than Claude 4.7 on the SDK version you use today.
- Update your code for each breaking change that affects you, plus the SDK and CLI changes, and release them together with the upgrade.
- Test your integration against 2026-10-21 before you release.