After upgrading to Anthropic API version 2026-10-21, why does a request that still sends temperature return 400?

As of 26 October 2026: 2026-10-21 rejects temperature, top_p, and top_k on Messages, including default values. Python SDK 2.0 sends it by default. Also fix document, citations, and Admin response renames.

The 2026-10-21 API version treats any Messages request that includes temperature, top_p, or top_k as invalid, including values that match the old defaults. The result is HTTP 400. Python SDK 2.0, TypeScript SDK 1.0, and ant CLI 2.0 send anthropic-version: 2026-10-21 by default. After a major SDK bump, legacy JSON bodies that still carry those three keys often fail before your own validation runs. The October 21 release also added enforcement_status and enforcement_actions on user profiles and renamed several Admin API response fields.

This piece is written for 26 October 2026, from the migration guide and versioning docs of 21 October. Two days ago we covered Decisions API answer JSON. That API fixes answer shapes; this upgrade changes Messages request bodies and Admin response JSON.

When you silently move to 2026-10-21

The migration guide says each SDK major version sends the API version that was current at its release. Upgrading to Python anthropic 2.0.0, TypeScript @anthropic-ai/sdk 1.0.0, or Go anthropic-sdk-go/v2 2.0.0 moves you to 2026-10-21 even if you never touch headers. Raw HTTP callers must set anthropic-version: 2026-10-21 explicitly.

On Amazon Bedrock, 2026-10-21 applies only to Claude 4.7 and later. Opus 4.6 and earlier models should stay on the older SDK or version header until you upgrade the model. See the official versioning page for Google Cloud and Foundry.

Why the three sampling keys must go

On 2023-06-01, omitting temperature meant the default 1.0. On 2026-10-21, the key itself is the error, not a bad value. Feature flags or serializers that inject "temperature": 0 will trigger a fleet-wide 400 on upgrade day.

{
  "model": "claude-sonnet-5-5",
  "max_tokens": 1024,
  "messages": [{"role": "user", "content": "Summarize this ticket."}]
}

Claude 4.7 and later already accepted only default sampling, so behavior matches a request that omitted the fields. If you still run Claude Sonnet 4.6 with temperature: 0.2 for steadier output, the guide says there is no replacement parameter: accept the default 1.0 or keep that call on 2023-06-01. Message Batch sub-requests follow the same rules.

Two more Messages 400 rules

  • document in assistant messages: do not place a document block directly under role: assistant. Use user messages, or keep documents nested inside tool results.
  • citations on user text: a non-empty citations array on a text block in a user message returns 400. Assistant text with citations is still allowed, as is document-level "citations": {"enabled": true}.

Agents that replay search hits into the next turn often hit the citations rule when they copy user-side citation blocks verbatim.

Admin response field renames

AreaOld fieldNew field
RBAC groupsrolesrole_ids
Group membersgroup_idrbac_group_id
RBAC rolesnamedisplay_name
Rate limitsgroup_typegroup.type
API keysworkspace_idscope.workspace_id or org scope.type
Analytics user reportsactor.emailactor.email_address
Activity summariessummariesdata

API keys are the easy footgun: workspace_id: null no longer means Default Workspace. Read scope instead. List filters still accept a workspace_id query parameter; only the response shape changed.

User profiles and enforcement fields

The October 21 release notes add enforcement_status and enforcement_actions on user profiles, plus an enforcement_status[] list filter. Test compliance flows in the same rollout window as the Messages upgrade.

Request snapshots during rollout

{
  "anthropic_version": "2026-10-21",
  "sdk": "anthropic-python-2.0.0",
  "model": "claude-sonnet-5-5",
  "request_keys": ["model", "max_tokens", "messages", "system"],
  "has_temperature": false,
  "has_top_p": false,
  "has_top_k": false,
  "http_status": 200
}
  • JSON Validator — confirm outbound Messages bodies omit the three sampling keys.
  • JSON Diff — compare Admin list responses before and after upgrade.
  • JSONPath — e.g. $.data[*].scope.workspace_id on API keys.

FAQ

Can a SDK-only upgrade cause 400 if my JSON is unchanged?

Yes, whenever the body still includes temperature, top_p, or top_k. Remove the keys at serialization or middleware, not only in typed SDK calls.

Is temperature 1.0 safe because it is the default?

No. The migration guide says even the default value returns 400. Delete the key entirely.

Do Message Batch sub-requests need the same cleanup?

Yes. Batches created with 2026-10-21 apply the same Messages rules to every sub-request.

Can Bedrock Opus 4.6 move to SDK 2.0 immediately?

The guide says stay on the older SDK or version header for Opus 4.6 and earlier on Bedrock, or upgrade to Claude 4.7+ first.

Can I still filter API keys by workspace_id?

The list query parameter is unchanged. Parse scope in the response instead of top-level workspace_id.

Does enforcement_status require the 2026-10-21 header?

Profile fields shipped in the same October 21 documentation wave. Confirm the profile or Admin endpoint you call matches the field list in the current docs.

Summary

2026-10-21 is about keys that must not exist, not values that are out of range. Drop temperature, top_p, and top_k; fix assistant documents and user citations; rename Admin and Analytics fields in your parsers. Ship SDK major upgrades together with request-body cleanup.