anthropic-sdk-python 2.12.0 image_dimensions_too_large error, user_profile_id in body
The SDK adds the image_dimensions_too_large error code, moves user_profile_id into the request body for Bedrock Messages, stops sending the anthropic-user-profile-id header, and returns a 400 error when an unsupported profile ID is supplied.
Anthropic released anthropic-sdk-python version 2.12.0. The release adds a new API error code and changes how user profile information is sent in Bedrock requests.
The SDK introduces the image_dimensions_too_large error code. This error lets developers detect images that exceed size limits and handle them programmatically.
Bedrock integration now includes the user_profile_id field in the request body of Messages calls. The AnthropicBedrock and AsyncAnthropicBedrock clients no longer send the anthropic-user-profile-id header. When a user_profile_id is present in the body, it overrides any header value. If a profile ID is supplied to a Bedrock model that does not support user profiles, the service returns a 400 error.
Documentation updates clarify the billing_policy parameter for batch requests and describe two billing error types.