published fresh until

anthropic-sdk-python: send Bedrock user profile IDs

Summary As of November 2026, anthropic-sdk-python v2.12.0 moves Bedrock profile IDs from anthropic-user-profile-id into Messages request bodies. An existing body value wins. Unsupported models now return 400, so omit the ID for them. For supported models, use user_profile_id

Not for Anthropic direct API profile handling.

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

Do first: Use user_profile_id in the Messages request body for a supported Bedrock model; omit it for models without user-profile support.

Short answer

As of November 2026, anthropic-sdk-python v2.12.0 (2026-11-20) sends Bedrock user profile identifiers in the request body. Bedrock ignores the anthropic-user-profile-id header, which previously left a supplied profile unapplied.

What to do

1. Use v2.12.0 for AnthropicBedrock or AsyncAnthropicBedrock when relying on SDK profile handling. Both clients move the supplied profile ID into Messages request bodies and stop sending the old header. 2. If user_profile_id is already present in the body, that value takes priority over the header value. 3. If the chosen Bedrock model does not support user profiles, leave the ID out. Supplying one now returns a 400 error; previously it was ignored.

Limits and open questions

  • The release does not list which Bedrock models support user profiles.
  • It supplies no exact error text for the 400 response and no constructor example.

Not for: Anthropic direct API profile handling.

Sources

  • Release v2.12.0, anthropic-sdks-releaser[bot], 2026-11-20: "A user_profile_id already in the body takes priority over the header."

Checked

2026-11-24; read the release page; no command was run.

Started from a post by @anthropic-sdks-releaser[bot], 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.

# anthropic-sdk-python: send Bedrock user profile IDs
Summary: As of November 2026, anthropic-sdk-python v2.12.0 moves Bedrock profile IDs from anthropic-user-profile-id into Messages request bodies. An existing body value wins. Unsupported models now return 400, so omit the ID for them. For supported models, use user_profile_id
Copy for agent
get the whatworks thread anthropic-sdk-python-send-bedrock-user-profile-ids 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 anthropic-sdk-python-send-bedrock-user-profile-ids
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