Inter-office memo
- To
- Everyone building on the Claude API
- From
- Mo, Chief Executive
- Date
- October 22, 2026, 7:08 PM CDT
- Re
- Claude API version 2026-10-21
Claude API version 2026-10-21 removes temperature. What breaks, and how to upgrade
On October 21, 2026, Anthropic released Claude API version 2026-10-21, its first since 2023-06-01, with new SDK major versions that send it by default, among them Python 2.0.0 and TypeScript 1.0.0. It removes temperature, top_p and top_k, which now return a 400 error. Requests on 2023-06-01 keep working, and Anthropic hasn’t set an end date for it.
What changed on October 21
Anthropic released Claude API version 2026-10-21 on October 21, 2026, according to its release notes. It is the first new version since 2023-06-01: the version history lists 2023-01-01, 2023-06-01, and now 2026-10-21. Every request names its version in the anthropic-version header, and the SDKs set it for you.
The same day, Anthropic released a new major version of each client SDK and of its ant CLI. Its SDK overview says each major version sends one API version by default, and “a new major version comes with each new API version.”
| SDK | Package | First version on 2026-10-21 | Latest on October 22 |
|---|---|---|---|
| Python | anthropic |
2.0.0 | 2.1.0 |
| TypeScript | @anthropic-ai/sdk |
1.0.0 | 1.1.0 |
| C# | Anthropic |
13.0.0 | 13.1.0 |
| Go | anthropic-sdk-go/v2 |
2.0.0 | 2.1.0 |
| Java | com.anthropic:anthropic-java |
3.0.0 | 3.1.0 |
| PHP | anthropic-ai/sdk |
1.0.0 | 1.1.0 |
| Ruby | anthropic |
2.0.0 | 2.1.0 |
ant CLI |
anthropic-cli |
2.0.0 | 2.1.0 |
Earlier versions send 2023-06-01. The new ones are licensed under Apache 2.0 instead of MIT; earlier versions stay under MIT.
The new API version works on the Claude API, Claude Platform on AWS, both Google Cloud offerings and Microsoft Foundry. On Amazon Bedrock it works only with Claude 4.7 and later models.
What breaks in the API
Three changes to the Messages API, which also apply to token counting and to Message Batches:
temperature,top_pandtop_kare removed. A request that sends any of them returns a 400 error, “even at the parameter’s default value.”- Documents go in user messages. A
documentblock placed directly in anassistantmessage returns a 400 error. - Citations stay out of user messages. A
textblock with a non-emptycitationsarray in ausermessage returns a 400 error.
The Admin API and the Claude Enterprise Analytics API stop returning the old names of renamed fields. RBAC groups return role_ids instead of roles, usage and cost reports return actor.email_address instead of actor.email, and API keys return scope instead of workspace_id. The migration guide has the full list.
What it means for temperature
On current models, less than it sounds. Under 2023-06-01, Claude 4.7 and later models already returned a 400 error for a non-default temperature, top_p or top_k, according to Anthropic’s deprecations page. Those models “sample as before.” What’s new is that even a default value, such as temperature: 1.0, is now an error, so the parameter has to come out of the request.
It matters on older models that still accept other values, such as Claude Sonnet 4.6, which Anthropic still offers as a legacy model. A request there that lowered temperature for more consistent output “loses that effect. No other setting replaces it.” Anthropic’s recommended replacement is prompting. If a request depends on a low temperature, the guide says to keep that request on 2023-06-01.
What breaks in the SDKs
The new SDK versions bring changes of their own:
- The API key moves header. The SDKs and the CLI send it as
Authorization: Bearer <key>instead ofX-Api-Key. The API accepts either, but a proxy, gateway, log filter or test stub that readsX-Api-Keyhas to change. - A client holds one credential. Passing both an API key and an auth token now raises an error, a
ValueErrorin Python and aTypeErrorin TypeScript, where earlier versions sent both. - Messages have a type for each role.
MessageParamis now a union of user, assistant and system types. Messages written as plain dicts or object literals mostly need no change; code that constructs or subclassesMessageParamdoes. - Text Completions is gone from the TypeScript, Go, Java and Ruby SDKs and from the CLI.
- Go needs Go 1.25 or later and the
/v2import path. The CLI drops--api-keyand--auth-token; useANTHROPIC_API_KEY,--api-key-stdinorant auth login.
Who has to act now
Nothing forces a move today. Requests that send 2023-06-01 keep working, and so do SDKs below the new major versions. Anthropic “recommends using the latest API version whenever possible,” but hasn’t announced an end date for 2023-06-01.
You do have something to do if:
- Your dependency isn’t pinned.
pip install anthropicnow installs 2.x, and a requirement such asanthropic>=1.0picks it up on the next fresh install. Pin below the new major,anthropic<2in Python, until you’ve made the changes. - You rely on a low temperature on an older model. Keep those requests on
2023-06-01, or move them to a current model and steer it with the prompt. - You call older Claude models on Bedrock. Stay on your current SDK version for those calls, or switch them to Claude 4.7 or later first.
- A gateway in front of the API reads
X-Api-Key. Change it to readAuthorizationbefore you upgrade the SDK. - You use a TypeScript platform package, such as
@anthropic-ai/bedrock-sdkor@anthropic-ai/vertex-sdk. Move it to its v1 in the same upgrade, or your package manager installs a second, older copy of the SDK for it.
How to upgrade
Anthropic’s migration guide gives three steps:
- Switch to
2026-10-21. Upgrade to the SDK version in the table above, or, if you call the API without an SDK, set theanthropic-versionheader to2026-10-21. - Update your code for each breaking change that affects you, in the API and in the SDK. Release the upgrade together with the fixes.
- Test against
2026-10-21before you release.
If you use Claude Code, version 2.1.307, released October 21, added /claude-api api-version “to move Claude API code to API version 2026-10-21,” in its changelog’s words. Review what it changes like any other diff, and decide for yourself about requests that set a temperature on an older model: dropping the parameter changes their output.
We’ll update this memo if Anthropic sets a date for retiring 2023-06-01.
7.Questions.
Why does the Claude API reject temperature now?
- Because API version 2026-10-21 removes temperature, top_p and top_k. A request on that version that sends any of them gets a 400 error, even at the default value, so take them out. The new SDKs send 2026-10-21 and no longer have the three parameters.
Do I have to upgrade to 2026-10-21?
- Not yet. Requests that send 2023-06-01, and SDKs below the new major versions, keep working, and Anthropic hasn’t announced an end date for 2023-06-01. It recommends the latest version “whenever possible.”
Will pip install anthropic break my code?
- It can. pip install anthropic now installs version 2.x, which sends 2026-10-21 and drops temperature, top_p and top_k, along with other breaking changes. Pin anthropic<2 until you’ve made the changes, then upgrade.
What replaces temperature if I want consistent output?
- Nothing. Anthropic’s guide says no other setting replaces it and recommends prompting. Claude 4.7 and later models already accepted only the defaults, so they sample as before. On older models such as Claude Sonnet 4.6, keep requests that need a low temperature on 2023-06-01.
Does this change Claude Code or my Claude plan?
- Not according to Anthropic’s notes, which cover the API and its SDKs and don’t mention Claude’s apps, Claude Code or the plans. Claude Code did gain a command on October 21, /claude-api api-version, that moves Claude API code in your project to the new version.
Is the Anthropic SDK still MIT licensed?
- Not from the new major versions. They are licensed under Apache 2.0, and earlier versions remain under the MIT License. No code changes are needed, but update your dependency records.