What changes when you move Claude to API version 2026-10-21
Claude API 2026-10-21 removes sampling parameters and tightens message-block rules. Upgrade the request builder, saved history, and SDK together, then validate the wire request.

Moving Claude Messages requests to API version 2026-10-21 makes temperature, top_p, and top_k invalid—even at their default values. Updating an SDK can change its default API version too, so an unchanged request builder can behave differently after a dependency upgrade.
Treat the request builder, saved history, and SDK as one migration. This article checked the official migration guide and release notes on November 22, 2026. It focuses on Messages applications rather than Admin API field changes. No authenticated request was sent; code was checked offline only.
How are the SDK version and API version related?
An SDK major version selects its default API version. A model ID selects the model. These are separate choices.
On October 21, Anthropic released the API version and SDK major versions that default to it, including Python 2.0.0 and TypeScript 1.0.0. Direct HTTP integrations select the version with anthropic-version.
Record the locked SDK version, the actual outgoing API-version header, and the model ID. Redact credentials when inspecting traffic; support-log redaction explains how to retain useful metadata without exposing a key.
The announcement did not automatically shut down every old-version request. Applications relying on non-default sampling should review the documented old-version option and the selected model's support before switching. Amazon Bedrock has another constraint: 2026-10-21 is available only for Claude 4.7 and later models there.
Why does temperature 1 still return an error?
The new version removes the three sampling fields entirely. The invalid condition is their presence, not just a particular value.
Remove them from the request object rather than replacing them with null, zero, or a default. Check shared wrappers, client presets, workflow nodes, and each Messages request inside a Message Batch.
This is a request-body example for the new version. It still needs anthropic-version: 2026-10-21, valid authentication, and the correct endpoint; it was not sent here.
{
"model": "claude-sonnet-5-5",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Explain the difference between an API version and a model ID in two sentences."}
]
}
Removing a field does not preserve the effect of a low temperature. The guide explicitly says models that previously accepted non-default values lose that adjustment, with no direct replacement. Structured output may help constrain a format, but does not guarantee identical content on every run.
Likewise, earlier discussion of sampling and Claude text watermarks needs API-version context. Establish whether the request can send those parameters before interpreting a model-specific watermark condition.
Does saved conversation history need changes?
Check the role containing each content block. The new version rejects two specific shapes.
| Content shape | New-version behavior | Migration |
|---|---|---|
A document directly in an assistant message | 400 | Put supplied documents in user messages |
A user text block with non-empty citations, including within search_result | 400 | Remove those user-text citation arrays |
| Citations in previous assistant text | Accepted | Preserve model-generated references |
citations: {"enabled": true} on a document or search result | Accepted | Keep the citation-enabling setting |
Do not recursively remove every field named citations. That destroys legitimate assistant references and citation settings. Contract extraction with citations explains why a value and its source structure must be retained together.
The guide also permits documents nested in returned tool results such as web fetch. A document directly in the assistant content array is a different shape. Field-name-only transformations can damage valid histories.
What else changes in Python and proxies?
Python's MessageParam is now a role-specific type union rather than one TypedDict. Replace constructor-style calls with dictionary values.
from anthropic.types import MessageParam
message: MessageParam = {"role": "user", "content": "Hello"}
MessageParam(role="user", content="Hello") raises TypeError in the new SDK. When a role is variable, construct each role in its own branch for type checking. This article compiled the new syntax but did not install the SDK to test runtime behavior.
Most new SDK clients also send API keys using Authorization: Bearer rather than X-Api-Key, with platform-specific exceptions documented in the migration guide. Inspect proxies, redaction filters, and test stubs that recognize only the old header. Do not diagnose a 401 by logging credentials or blindly adding a second real credential.
Client-side compaction was removed from the TypeScript and Ruby tool runners, with migration guidance toward server-side compaction. Applications using it need the relevant language section. A successful text response cannot verify the full tool loop.
What proves the application still works?
Test the paths the application actually depends on in an isolated environment, retaining redacted request metadata and response structure.
At minimum, exercise plain text, a user document, cited saved history, and a tool call followed by its result. Add complete streaming and per-item batch checks where used. Define the expected result and behavior before judging success.
Offline checks can locate removed fields, compile updated code, and inspect synthetic history transformations. They do not verify the endpoint, proxy authentication, or live model behavior. Preserve version metadata and the actual error when a live request fails, and do not automatically retry a structural 400.
Nbility's Claude compatibility documentation still uses 2023-06-01 explicitly in its basic HTTP example. It does not establish validation of every new-version rule, SDK default, or beta feature. Use the SDK setup guide for basic configuration, then test the actual SDK, API version, and complete task together.


