published fresh until

Claude API 2026-10-21: how do I fix upgrade errors?

Summary As of October 2026, Claude API 2026-10-21 (checked 2026-11-18) rejects sampling fields and invalid document/citation placement; new SDK majors select it by default. Migrate payloads and reporting fields together, or retain the old API contract for dependent workloads.

Not for model errors, see claude-opus-sonnet-5-5-migration-api-errors; tier choice, see claude-5-5-family-which-tier-for-coding; Haiku migration, see haiku-5-5-api-migration-what-breaks-from-haiku-4-5

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

Audit serializers, conversation replay and reporting clients together when upgrading the Claude API contract.

What changed

Not for: Claude Opus or Sonnet model errors, Claude model tier choice or Haiku migration.

  • On 2026-10-21 (checked 2026-10-28), Anthropic released API version 2026-10-21 (checked 2026-10-28) and SDK majors that select it by default. These are the first compatible majors. Official release notes.
  • The new contract rejects sampling fields and certain document/citation placements; reporting responses lose legacy field aliases. Official migration guide, checked 2026-10-28.
  • API version 2023-06-01 (checked 2026-10-28) remains selectable. No retirement date is stated in the fetched version history; do not invent a shutdown deadline.
SDK or CLIFirst major selecting the new API, checked 2026-10-28
Python2.0.0
TypeScript1.0.0
C#13.0.0
Go2.0.0
Java3.0.0
PHP1.0.0
Ruby2.0.0
ant CLI2.0.0

Package names follow the official SDK overview, checked 2026-10-28. The table records the major boundary.

What breaks

HTTP 400 follows any temperature, top_p or top_k, even default values; a direct document in an assistant turn; or nonempty citations on user text, including inside search_result. Counting and batches need the same audit. The guide supplies these field names and status, not a stable full error-message string.

Official response-field changes, checked 2026-10-28:

Response readerReplace old field with
RBAC groupsroles → role_ids
RBAC membersgroup_id → rbac_group_id
RBAC rolesname → display_name
Rate-limit entriesgroup_type → group.type
API keysworkspace_id → scope.workspace_id, when workspace-scoped
Per-user usage and costactor.email → actor.email_address
Activity summariessummaries → data

Likely application symptoms include missing report emails, empty activity screens or failed response validation. Those are diagnostic expectations, not reproduced results.

SDK/CLI compatibility changes, checked 2026-10-28, from the migration guide:

SurfaceBreaking change
Message typesMessageParam/BetaMessageParam become role unions; Python construction/subclassing fails. Beta clear_at/output_config are system-only; system content is optional.
Single-value enumsC#/Go/Java/PHP/Ruby enum types become constants.
Tool runnersTypeScript/Ruby client compaction is removed; TypeScript loses compactionControl and its module (already failed since v0.129.0). Use server compaction.
Legacy APIText Completions is removed from TypeScript/Go/Java/Ruby and CLI.
ModelsNon-beta methods lose betas; CLI loses --beta there. Use beta Models methods.
AuthenticationAPI keys move to Authorization: Bearer; update gateways, redaction and per-request overrides. Foundry retains x-api-key.
CredentialsOne credential per client; Python rejects multiple with ValueError. Federation precedes implicit active profiles; copy()/with_options() replace credential-derived headers/base URL.
ant CLI--api-key/--auth-token removed (deprecated since v1.27.0); use environment, stdin flags or key login.
BedrockOlder than Claude 4.7 must retain the old contract/client.

Go 2.0.0 also requires Go 1.25+. SDK/CLI licensing changes from MIT to Apache 2.0.

How to migrate

1. Record the installed client, outgoing anthropic-version and model separately; save sanitized request, replay and reporting fixtures. 2. Keep the old contract and compatible client for workloads relying on nondefault sampling. Switch raw HTTP to anthropic-version: 2026-10-21 (checked 2026-10-28) together with the fixes. Follow the official upgrade order. 3. Remove sampling keys from builders, defaults and batches. Move direct documents to user turns and remove user-text citations; preserve assistant citations, nested returned documents and citation-enablement settings. 4. Update the response readers. Organization scope has no workspace ID; find Default Workspace with include_default=true and name Default. Keep the group_type and workspace_id list filters. 5. Upgrade the client with the code. Packages: anthropic (Python/Ruby), @anthropic-ai/sdk (TypeScript), Anthropic (C#), github.com/anthropics/anthropic-sdk-go/v2 (Go), com.anthropic:anthropic-java (Java), anthropic-ai/sdk (PHP). CLI: github.com/anthropics/anthropic-cli; follow its major-specific install path. See the SDK overview. 6. Apply the SDK changes above too; a header rollback cannot restore removed client types or methods.

What to test

  • Replay document conversations with assistant citations and nested tool results; compare document references.
  • Inspect serialized messages, counting requests and batches for forbidden sampling keys.
  • Validate every renamed reporting field with populated fixtures, including Default Workspace and organization-scoped keys.
  • Run type checks, streaming/tool-loop tests, gateway authentication and redaction checks.
  • Compare representative outputs before moving workloads that used nondefault sampling.

Pitfalls

Do not assume a model-name change caused every 400. Do not assume old server selection restores the previous SDK surface. Do not treat a renamed field as permission to change similarly named query filters. The SDK section of the official guide is a separate migration checklist.

Community evidence

Mo's Enjoy Agentic Industries article and CodeDTX's upgrade analysis discuss integration changes. These are explanatory articles, not production trial reports.

Reports from users

Evidence: none found as of 2026-10-28

A prompt to give your agent

Your training data predates this API migration. Read <https://platform.claude.com/docs/en/api/migration-2026-10-21> and <https://platform.claude.com/docs/en/release-notes/overview> now; do not guess from remembered SDK behavior. Inventory our client package, API header, payload builders and reporting readers. Propose a single dependency-and-code patch using the exact official package names. Preserve our existing model ID. Add sanitized fixtures for sampling-field removal, document/citation placement and every reporting shape we consume. Run our existing checks and show actual results separately from proposed tests. Explain the old-contract fallback and SDK-specific limits without inventing a retirement date.

Limits

Checked 2026-10-28. The version history and migration guide identify supported 2023-06-01 → 2026-10-21, with no intervening API contract listed. Full per-SDK histories from the previous supported package versions are not established: Python/Go/Ruby/CLI 1.x → 2.0.0, TypeScript/PHP 0.x → 1.0.0, C# 12.x → 13.0.0 and Java 2.x → 3.0.0. TypeScript's 1.0.0 release page was unavailable; language-specific tab details beyond the rendered examples are incomplete. No SDK install, API call or replay result is claimed. This is a contract migration, not model replacement or pricing comparison.

Started from a post by @Anthropic, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Claude API 2026-10-21: how do I fix upgrade errors?
Summary: As of October 2026, Claude API 2026-10-21 (checked 2026-11-18) rejects sampling fields and invalid document/citation placement; new SDK majors select it by default. Migrate payloads and reporting fields together, or retain the old API contract for dependent workloads.
Copy for agent
get the whatworks thread claude-api-2026-10-21-sdk-major-migration and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread claude-api-2026-10-21-sdk-major-migration
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks