Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-anthropic for 
openSUSE:Factory checked in at 2026-11-21 21:47:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-anthropic (Old)
 and      /work/SRC/openSUSE:Factory/.python-anthropic.new.1340718 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-anthropic"

Sat Nov 21 21:47:33 2026 rev:37 rq:1399596 version:2.12.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-anthropic/python-anthropic.changes        
2026-11-20 14:50:43.448531737 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-anthropic.new.1340718/python-anthropic.changes
   2026-11-21 21:49:36.437236687 +0100
@@ -1,0 +2,12 @@
+Sat Nov 21 07:06:05 UTC 2026 - Martin Pluskal <[email protected]>
+
+- Update to version 2.12.0:
+  * API: add the image_dimensions_too_large error code
+  * Fix Bedrock clients to send the user profile ID in the
+    request body, which Bedrock reads, instead of the
+    anthropic-user-profile-id header, which it ignores;
+    a body value takes priority over the header
+  * Docs: clarify billing_policy in batches and two billing
+    errors
+
+-------------------------------------------------------------------

Old:
----
  anthropic-2.11.0.tar.gz

New:
----
  anthropic-2.12.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-anthropic.spec ++++++
--- /var/tmp/diff_new_pack.xXPkcA/_old  2026-11-21 21:49:37.219270089 +0100
+++ /var/tmp/diff_new_pack.xXPkcA/_new  2026-11-21 21:49:37.221270174 +0100
@@ -18,7 +18,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-anthropic
-Version:        2.11.0
+Version:        2.12.0
 Release:        0
 Summary:        The official Python library for the Anthropic API
 # Legal-Review-Notice: ships vendored httpx_aiohttp (BSD-3-Clause)

++++++ anthropic-2.11.0.tar.gz -> anthropic-2.12.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/anthropic-2.11.0/.version-manifest.json 
new/anthropic-2.12.0/.version-manifest.json
--- old/anthropic-2.11.0/.version-manifest.json 2020-02-02 01:00:00.000000000 
+0100
+++ new/anthropic-2.12.0/.version-manifest.json 2020-02-02 01:00:00.000000000 
+0100
@@ -1,3 +1,3 @@
 {
-  ".": "2.11.0"
+  ".": "2.12.0"
 }
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/anthropic-2.11.0/CHANGELOG.md 
new/anthropic-2.12.0/CHANGELOG.md
--- old/anthropic-2.11.0/CHANGELOG.md   2020-02-02 01:00:00.000000000 +0100
+++ new/anthropic-2.12.0/CHANGELOG.md   2020-02-02 01:00:00.000000000 +0100
@@ -1,5 +1,25 @@
 # Changelog
 
+## 
[2.12.0](https://github.com/anthropics/anthropic-sdk-python/compare/v2.11.0...v2.12.0)
 (2026-11-20)
+
+### Features
+
+* **api:** add the image_dimensions_too_large error code
+
+
+### Bug Fixes
+
+* **bedrock:** send the user profile ID in the request body
+
+  Amazon Bedrock reads `user_profile_id` from the request body and ignores the 
`anthropic-user-profile-id` header, so a profile ID given to `AnthropicBedrock` 
or `AsyncAnthropicBedrock` was not applied. Both clients now move it into the 
body of Messages requests and no longer send the header. A `user_profile_id` 
already in the body takes priority over the header.
+
+  Some models on Bedrock do not support user profiles. A request to one of 
them with a profile ID now fails with a 400 error; before, the ID was ignored. 
Leave the ID off requests to those models.
+
+
+### Chores
+
+* **docs:** clarify billing_policy in batches and two billing errors
+
 ## 
[2.11.0](https://github.com/anthropics/anthropic-sdk-python/compare/v2.10.0...v2.11.0)
 (2026-11-19)
 
 ### Features
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/anthropic-2.11.0/PKG-INFO 
new/anthropic-2.12.0/PKG-INFO
--- old/anthropic-2.11.0/PKG-INFO       2020-02-02 01:00:00.000000000 +0100
+++ new/anthropic-2.12.0/PKG-INFO       2020-02-02 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.3
 Name: anthropic
-Version: 2.11.0
+Version: 2.12.0
 Summary: The official Python library for the anthropic API
 Project-URL: Homepage, https://github.com/anthropics/anthropic-sdk-python
 Project-URL: Repository, https://github.com/anthropics/anthropic-sdk-python
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/anthropic-2.11.0/api.md new/anthropic-2.12.0/api.md
--- old/anthropic-2.11.0/api.md 2020-02-02 01:00:00.000000000 +0100
+++ new/anthropic-2.12.0/api.md 2020-02-02 01:00:00.000000000 +0100
@@ -316,6 +316,7 @@
     FileDocumentSourceParam,
     FileImageSourceParam,
     ImageBlockParam,
+    ImageDimensionsTooLargeErrorDetails,
     ImageTransformationsParam,
     InputJSONDelta,
     JSONOutputFormatParam,
@@ -523,6 +524,7 @@
     CompactionSignatureInvalidError,
     CompactionTooManyToolReferencesError,
     CompactionToolChangesMismatchError,
+    ImageDimensionsTooLargeError,
     ThreadAlreadyContinuedError,
     ThreadContinueInFlightError,
     ThreadFingerprintMismatchError,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/anthropic-2.11.0/pyproject.toml 
new/anthropic-2.12.0/pyproject.toml
--- old/anthropic-2.11.0/pyproject.toml 2020-02-02 01:00:00.000000000 +0100
+++ new/anthropic-2.12.0/pyproject.toml 2020-02-02 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
 [project]
 name = "anthropic"
-version = "2.11.0"
+version = "2.12.0"
 description = "The official Python library for the anthropic API"
 dynamic = ["readme"]
 license = "Apache-2.0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/anthropic-2.11.0/src/anthropic/_error_classes.py 
new/anthropic-2.12.0/src/anthropic/_error_classes.py
--- old/anthropic-2.11.0/src/anthropic/_error_classes.py        2020-02-02 
01:00:00.000000000 +0100
+++ new/anthropic-2.12.0/src/anthropic/_error_classes.py        2020-02-02 
01:00:00.000000000 +0100
@@ -45,6 +45,7 @@
 from .types.compaction_block_ambiguous_error import 
CompactionBlockAmbiguousError
 from .types.compaction_block_misplaced_error import 
CompactionBlockMisplacedError
 from .types.compaction_incomplete_turn_error import 
CompactionIncompleteTurnError
+from .types.image_dimensions_too_large_error import 
ImageDimensionsTooLargeError
 from .types.shared.ramp_limit_exceeded_error import RampLimitExceededError
 from .types.thread_unsupported_request_error import 
ThreadUnsupportedRequestError
 from .types.compaction_content_mismatch_error import 
CompactionContentMismatchError
@@ -191,6 +192,7 @@
     (400, "external_key_validation_failed"): ExternalKeyValidationFailedError,
     (400, "external_key_validation_timed_out"): 
ExternalKeyValidationTimedOutError,
     (400, "file_not_downloadable"): FileNotDownloadableError,
+    (400, "image_dimensions_too_large"): ImageDimensionsTooLargeError,
     (400, "invalid_config_type_change"): BetaInvalidConfigTypeChangeError,
     (400, "invalid_metadata"): BetaInvalidMetadataError,
     (400, "invite_already_exists"): InviteAlreadyExistsError,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/anthropic-2.11.0/src/anthropic/_version.py 
new/anthropic-2.12.0/src/anthropic/_version.py
--- old/anthropic-2.11.0/src/anthropic/_version.py      2020-02-02 
01:00:00.000000000 +0100
+++ new/anthropic-2.12.0/src/anthropic/_version.py      2020-02-02 
01:00:00.000000000 +0100
@@ -1,2 +1,2 @@
 __title__ = "anthropic"
-__version__ = "2.11.0"  # x-release-please-version
+__version__ = "2.12.0"  # x-release-please-version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/anthropic-2.11.0/src/anthropic/lib/bedrock/_client.py 
new/anthropic-2.12.0/src/anthropic/lib/bedrock/_client.py
--- old/anthropic-2.11.0/src/anthropic/lib/bedrock/_client.py   2020-02-02 
01:00:00.000000000 +0100
+++ new/anthropic-2.12.0/src/anthropic/lib/bedrock/_client.py   2020-02-02 
01:00:00.000000000 +0100
@@ -9,7 +9,7 @@
 
 from .._env import with_environment_headers
 from ._beta import Beta, AsyncBeta
-from ..._types import Omit, Timeout, NotGiven, OpenTelemetryClientOption, 
not_given
+from ..._types import Omit, Headers, Timeout, NotGiven, 
OpenTelemetryClientOption, omit, not_given
 from ..._utils import is_dict, asyncify, is_given, get_async_library
 from ..._client import _keep_client_header_params
 from ..._compat import model_copy
@@ -26,16 +26,19 @@
     AsyncAPIClient,
     FinalRequestOptions,
     build_headers,
+    merge_headers,
 )
 from ._stream_decoder import AWSEventStreamDecoder
 from .._platform_client import copy_platform_client
 from ...resources.messages import Messages, AsyncMessages
 
+USER_PROFILE_ID_HEADER = "anthropic-user-profile-id"
+
 _HttpxClientT = TypeVar("_HttpxClientT", bound=Union[httpx2.Client, 
httpx2.AsyncClient])
 _DefaultStreamT = TypeVar("_DefaultStreamT", bound=Union[Stream[Any], 
AsyncStream[Any]])
 
 
-def _prepare_options(input_options: FinalRequestOptions) -> 
FinalRequestOptions:
+def _prepare_options(input_options: FinalRequestOptions, custom_headers: 
Mapping[str, str]) -> FinalRequestOptions:
     options = model_copy(_keep_client_header_params(input_options), deep=True)
 
     if is_dict(options.json_data):
@@ -50,6 +53,12 @@
         if not is_dict(options.json_data):
             raise RuntimeError("Expected dictionary json_data for post 
/v1/messages endpoint")
 
+        headers: Headers = options.headers if is_given(options.headers) else {}
+        user_profile_id = build_headers(custom_headers, 
headers)[0].get(USER_PROFILE_ID_HEADER)
+        if user_profile_id is not None:
+            options.headers = merge_headers(headers, {USER_PROFILE_ID_HEADER: 
omit})
+            options.json_data.setdefault("user_profile_id", user_profile_id)
+
         model = options.json_data.pop("model", None)
         # A server that drops ";params" from a segment before routing sees 
only what precedes the first ";".
         before_params = str(model or "").partition(";")[0]
@@ -201,7 +210,7 @@
 
     @override
     def _prepare_options(self, options: FinalRequestOptions) -> 
FinalRequestOptions:
-        return _prepare_options(options)
+        return _prepare_options(options, self._custom_headers)
 
     @override
     def _prepare_request(self, request: httpx2.Request) -> None:
@@ -382,7 +391,7 @@
 
     @override
     async def _prepare_options(self, options: FinalRequestOptions) -> 
FinalRequestOptions:
-        return _prepare_options(options)
+        return _prepare_options(options, self._custom_headers)
 
     @override
     async def _prepare_request(self, request: httpx2.Request) -> None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/anthropic-2.11.0/src/anthropic/resources/beta/messages/messages.py 
new/anthropic-2.12.0/src/anthropic/resources/beta/messages/messages.py
--- old/anthropic-2.11.0/src/anthropic/resources/beta/messages/messages.py      
2020-02-02 01:00:00.000000000 +0100
+++ new/anthropic-2.12.0/src/anthropic/resources/beta/messages/messages.py      
2020-02-02 01:00:00.000000000 +0100
@@ -267,6 +267,12 @@
               rejected rather than billed to you. Omit the field, or send 
`"bill_to": "self"`
               (the default), to be billed as usual.
 
+              Message Batches does not currently support billing the customer 
behind a user
+              profile. In a batch, omit the field or send `"bill_to": "self"`. 
A request in a
+              batch that sets `"bill_to": "user_profile"` gets an `errored` 
result with an
+              `invalid_request_error`, nobody is billed for it, and the 
batch's other requests
+              run as usual.
+
           cache_control: Top-level cache control automatically applies a 
cache_control marker to the last
               cacheable block in the request.
 
@@ -514,6 +520,8 @@
 
           CompactionToolChangesMismatchError:
 
+          ImageDimensionsTooLargeError:
+
           OrganizationOnHoldError:
 
           RequestBodyEncodingInvalidError:
@@ -714,6 +722,12 @@
               rejected rather than billed to you. Omit the field, or send 
`"bill_to": "self"`
               (the default), to be billed as usual.
 
+              Message Batches does not currently support billing the customer 
behind a user
+              profile. In a batch, omit the field or send `"bill_to": "self"`. 
A request in a
+              batch that sets `"bill_to": "user_profile"` gets an `errored` 
result with an
+              `invalid_request_error`, nobody is billed for it, and the 
batch's other requests
+              run as usual.
+
           cache_control: Top-level cache control automatically applies a 
cache_control marker to the last
               cacheable block in the request.
 
@@ -952,6 +966,8 @@
 
           CompactionToolChangesMismatchError:
 
+          ImageDimensionsTooLargeError:
+
           OrganizationOnHoldError:
 
           RequestBodyEncodingInvalidError:
@@ -1152,6 +1168,12 @@
               rejected rather than billed to you. Omit the field, or send 
`"bill_to": "self"`
               (the default), to be billed as usual.
 
+              Message Batches does not currently support billing the customer 
behind a user
+              profile. In a batch, omit the field or send `"bill_to": "self"`. 
A request in a
+              batch that sets `"bill_to": "user_profile"` gets an `errored` 
result with an
+              `invalid_request_error`, nobody is billed for it, and the 
batch's other requests
+              run as usual.
+
           cache_control: Top-level cache control automatically applies a 
cache_control marker to the last
               cacheable block in the request.
 
@@ -1390,6 +1412,8 @@
 
           CompactionToolChangesMismatchError:
 
+          ImageDimensionsTooLargeError:
+
           OrganizationOnHoldError:
 
           RequestBodyEncodingInvalidError:
@@ -2599,6 +2623,12 @@
               rejected rather than billed to you. Omit the field, or send 
`"bill_to": "self"`
               (the default), to be billed as usual.
 
+              Message Batches does not currently support billing the customer 
behind a user
+              profile. In a batch, omit the field or send `"bill_to": "self"`. 
A request in a
+              batch that sets `"bill_to": "user_profile"` gets an `errored` 
result with an
+              `invalid_request_error`, nobody is billed for it, and the 
batch's other requests
+              run as usual.
+
           cache_control: Top-level cache control automatically applies a 
cache_control marker to the last
               cacheable block in the request.
 
@@ -2846,6 +2876,8 @@
 
           CompactionToolChangesMismatchError:
 
+          ImageDimensionsTooLargeError:
+
           OrganizationOnHoldError:
 
           RequestBodyEncodingInvalidError:
@@ -3046,6 +3078,12 @@
               rejected rather than billed to you. Omit the field, or send 
`"bill_to": "self"`
               (the default), to be billed as usual.
 
+              Message Batches does not currently support billing the customer 
behind a user
+              profile. In a batch, omit the field or send `"bill_to": "self"`. 
A request in a
+              batch that sets `"bill_to": "user_profile"` gets an `errored` 
result with an
+              `invalid_request_error`, nobody is billed for it, and the 
batch's other requests
+              run as usual.
+
           cache_control: Top-level cache control automatically applies a 
cache_control marker to the last
               cacheable block in the request.
 
@@ -3284,6 +3322,8 @@
 
           CompactionToolChangesMismatchError:
 
+          ImageDimensionsTooLargeError:
+
           OrganizationOnHoldError:
 
           RequestBodyEncodingInvalidError:
@@ -3484,6 +3524,12 @@
               rejected rather than billed to you. Omit the field, or send 
`"bill_to": "self"`
               (the default), to be billed as usual.
 
+              Message Batches does not currently support billing the customer 
behind a user
+              profile. In a batch, omit the field or send `"bill_to": "self"`. 
A request in a
+              batch that sets `"bill_to": "user_profile"` gets an `errored` 
result with an
+              `invalid_request_error`, nobody is billed for it, and the 
batch's other requests
+              run as usual.
+
           cache_control: Top-level cache control automatically applies a 
cache_control marker to the last
               cacheable block in the request.
 
@@ -3722,6 +3768,8 @@
 
           CompactionToolChangesMismatchError:
 
+          ImageDimensionsTooLargeError:
+
           OrganizationOnHoldError:
 
           RequestBodyEncodingInvalidError:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/anthropic-2.11.0/src/anthropic/resources/messages/messages.py 
new/anthropic-2.12.0/src/anthropic/resources/messages/messages.py
--- old/anthropic-2.11.0/src/anthropic/resources/messages/messages.py   
2020-02-02 01:00:00.000000000 +0100
+++ new/anthropic-2.12.0/src/anthropic/resources/messages/messages.py   
2020-02-02 01:00:00.000000000 +0100
@@ -440,6 +440,8 @@
 
           CompactionToolChangesMismatchError:
 
+          ImageDimensionsTooLargeError:
+
           OrganizationOnHoldError:
 
           RequestBodyEncodingInvalidError:
@@ -808,6 +810,8 @@
 
           CompactionToolChangesMismatchError:
 
+          ImageDimensionsTooLargeError:
+
           OrganizationOnHoldError:
 
           RequestBodyEncodingInvalidError:
@@ -1176,6 +1180,8 @@
 
           CompactionToolChangesMismatchError:
 
+          ImageDimensionsTooLargeError:
+
           OrganizationOnHoldError:
 
           RequestBodyEncodingInvalidError:
@@ -2240,6 +2246,8 @@
 
           CompactionToolChangesMismatchError:
 
+          ImageDimensionsTooLargeError:
+
           OrganizationOnHoldError:
 
           RequestBodyEncodingInvalidError:
@@ -2608,6 +2616,8 @@
 
           CompactionToolChangesMismatchError:
 
+          ImageDimensionsTooLargeError:
+
           OrganizationOnHoldError:
 
           RequestBodyEncodingInvalidError:
@@ -2976,6 +2986,8 @@
 
           CompactionToolChangesMismatchError:
 
+          ImageDimensionsTooLargeError:
+
           OrganizationOnHoldError:
 
           RequestBodyEncodingInvalidError:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/anthropic-2.11.0/src/anthropic/types/__init__.py 
new/anthropic-2.12.0/src/anthropic/types/__init__.py
--- old/anthropic-2.11.0/src/anthropic/types/__init__.py        2020-02-02 
01:00:00.000000000 +0100
+++ new/anthropic-2.12.0/src/anthropic/types/__init__.py        2020-02-02 
01:00:00.000000000 +0100
@@ -420,6 +420,7 @@
 from .computer_left_click_config_param import ComputerLeftClickConfigParam as 
ComputerLeftClickConfigParam
 from .computer_mouse_move_config_param import ComputerMouseMoveConfigParam as 
ComputerMouseMoveConfigParam
 from .computer_screenshot_config_param import ComputerScreenshotConfigParam as 
ComputerScreenshotConfigParam
+from .image_dimensions_too_large_error import ImageDimensionsTooLargeError as 
ImageDimensionsTooLargeError
 from .response_computer_tool_use_block import ResponseComputerToolUseBlock as 
ResponseComputerToolUseBlock
 from .thread_unsupported_request_error import ThreadUnsupportedRequestError as 
ThreadUnsupportedRequestError
 from .tool_name_conflict_error_details import ToolNameConflictErrorDetails as 
ToolNameConflictErrorDetails
@@ -622,6 +623,9 @@
 from .compaction_incomplete_turn_error_details import (
     CompactionIncompleteTurnErrorDetails as 
CompactionIncompleteTurnErrorDetails,
 )
+from .image_dimensions_too_large_error_details import (
+    ImageDimensionsTooLargeErrorDetails as ImageDimensionsTooLargeErrorDetails,
+)
 from .response_browser_hold_key_tool_use_block import (
     ResponseBrowserHoldKeyToolUseBlock as ResponseBrowserHoldKeyToolUseBlock,
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/anthropic-2.11.0/src/anthropic/types/beta/message_create_params.py 
new/anthropic-2.12.0/src/anthropic/types/beta/message_create_params.py
--- old/anthropic-2.11.0/src/anthropic/types/beta/message_create_params.py      
2020-02-02 01:00:00.000000000 +0100
+++ new/anthropic-2.12.0/src/anthropic/types/beta/message_create_params.py      
2020-02-02 01:00:00.000000000 +0100
@@ -139,6 +139,12 @@
     to the profile, or has not allowed your organization to bill it, the 
request is
     rejected rather than billed to you. Omit the field, or send `"bill_to": 
"self"`
     (the default), to be billed as usual.
+
+    Message Batches does not currently support billing the customer behind a 
user
+    profile. In a batch, omit the field or send `"bill_to": "self"`. A request 
in a
+    batch that sets `"bill_to": "user_profile"` gets an `errored` result with 
an
+    `invalid_request_error`, nobody is billed for it, and the batch's other 
requests
+    run as usual.
     """
 
     cache_control: Optional[BetaCacheControlEphemeralParam]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/anthropic-2.11.0/src/anthropic/types/beta/thread_create_params.py 
new/anthropic-2.12.0/src/anthropic/types/beta/thread_create_params.py
--- old/anthropic-2.11.0/src/anthropic/types/beta/thread_create_params.py       
2020-02-02 01:00:00.000000000 +0100
+++ new/anthropic-2.12.0/src/anthropic/types/beta/thread_create_params.py       
2020-02-02 01:00:00.000000000 +0100
@@ -35,6 +35,12 @@
     to the profile, or has not allowed your organization to bill it, the 
request is
     rejected rather than billed to you. Omit the field, or send `"bill_to": 
"self"`
     (the default), to be billed as usual.
+
+    Message Batches does not currently support billing the customer behind a 
user
+    profile. In a batch, omit the field or send `"bill_to": "self"`. A request 
in a
+    batch that sets `"bill_to": "user_profile"` gets an `errored` result with 
an
+    `invalid_request_error`, nobody is billed for it, and the batch's other 
requests
+    run as usual.
     """
 
     cache_control: Optional[BetaCacheControlEphemeralParam] | Omit
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/anthropic-2.11.0/src/anthropic/types/beta/thread_send_params.py 
new/anthropic-2.12.0/src/anthropic/types/beta/thread_send_params.py
--- old/anthropic-2.11.0/src/anthropic/types/beta/thread_send_params.py 
2020-02-02 01:00:00.000000000 +0100
+++ new/anthropic-2.12.0/src/anthropic/types/beta/thread_send_params.py 
2020-02-02 01:00:00.000000000 +0100
@@ -57,6 +57,12 @@
     to the profile, or has not allowed your organization to bill it, the 
request is
     rejected rather than billed to you. Omit the field, or send `"bill_to": 
"self"`
     (the default), to be billed as usual.
+
+    Message Batches does not currently support billing the customer behind a 
user
+    profile. In a batch, omit the field or send `"bill_to": "self"`. A request 
in a
+    batch that sets `"bill_to": "user_profile"` gets an `errored` result with 
an
+    `invalid_request_error`, nobody is billed for it, and the batch's other 
requests
+    run as usual.
     """
 
     cache_control: Optional[BetaCacheControlEphemeralParam] | Omit
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/anthropic-2.11.0/src/anthropic/types/image_dimensions_too_large_error.py 
new/anthropic-2.12.0/src/anthropic/types/image_dimensions_too_large_error.py
--- 
old/anthropic-2.11.0/src/anthropic/types/image_dimensions_too_large_error.py    
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/anthropic-2.12.0/src/anthropic/types/image_dimensions_too_large_error.py    
    2020-02-02 01:00:00.000000000 +0100
@@ -0,0 +1,15 @@
+from typing_extensions import Literal
+
+from .._exceptions import BadRequestError
+from .image_dimensions_too_large_error_details import 
ImageDimensionsTooLargeErrorDetails
+
+__all__ = ["ImageDimensionsTooLargeError"]
+
+
+class ImageDimensionsTooLargeError(BadRequestError):
+    """
+    The longest side of one or more images in the request exceeds the image 
size limit. Scale each image in `paths` so that neither side exceeds 
`max_side_length_pixels`, or remove it, then retry.
+    """
+
+    error_code: Literal["image_dimensions_too_large"]  # pyright: 
ignore[reportIncompatibleVariableOverride]
+    details: ImageDimensionsTooLargeErrorDetails  # pyright: 
ignore[reportIncompatibleVariableOverride]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/anthropic-2.11.0/src/anthropic/types/image_dimensions_too_large_error_details.py
 
new/anthropic-2.12.0/src/anthropic/types/image_dimensions_too_large_error_details.py
--- 
old/anthropic-2.11.0/src/anthropic/types/image_dimensions_too_large_error_details.py
        1970-01-01 01:00:00.000000000 +0100
+++ 
new/anthropic-2.12.0/src/anthropic/types/image_dimensions_too_large_error_details.py
        2020-02-02 01:00:00.000000000 +0100
@@ -0,0 +1,27 @@
+from typing import List
+from typing_extensions import Literal
+
+from .._models import BaseModel
+
+__all__ = ["ImageDimensionsTooLargeErrorDetails"]
+
+
+class ImageDimensionsTooLargeErrorDetails(BaseModel):
+    """
+    The longest side of one or more images in the request exceeds the image 
size limit. Scale each image in `paths` so that neither side exceeds 
`max_side_length_pixels`, or remove it, then retry.
+    """
+
+    error_code: Literal["image_dimensions_too_large"]
+
+    max_side_length_pixels: int
+    """
+    The limit the images exceeded: the largest width or height, in pixels, 
that an
+    image on this request may have.
+    """
+
+    paths: List[str]
+    """
+    The position of every image over the limit, in the order you sent them, 
nested
+    blocks included, such as `messages.0.content.1`, or
+    `messages.0.content.1.content.0` for an image in a `tool_result` block.
+    """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/anthropic-2.11.0/src/anthropic/types/shared/error_details.py 
new/anthropic-2.12.0/src/anthropic/types/shared/error_details.py
--- old/anthropic-2.11.0/src/anthropic/types/shared/error_details.py    
2020-02-02 01:00:00.000000000 +0100
+++ new/anthropic-2.12.0/src/anthropic/types/shared/error_details.py    
2020-02-02 01:00:00.000000000 +0100
@@ -29,6 +29,7 @@
 from ..compaction_block_ambiguous_error_details import 
CompactionBlockAmbiguousErrorDetails
 from ..compaction_block_misplaced_error_details import 
CompactionBlockMisplacedErrorDetails
 from ..compaction_incomplete_turn_error_details import 
CompactionIncompleteTurnErrorDetails
+from ..image_dimensions_too_large_error_details import 
ImageDimensionsTooLargeErrorDetails
 from ..thread_unsupported_request_error_details import 
ThreadUnsupportedRequestErrorDetails
 from .claude_code_version_too_old_error_details import 
ClaudeCodeVersionTooOldErrorDetails
 from ..compaction_content_mismatch_error_details import 
CompactionContentMismatchErrorDetails
@@ -157,6 +158,7 @@
         CompactionSignatureInvalidErrorDetails,
         CompactionTooManyToolReferencesErrorDetails,
         CompactionToolChangesMismatchErrorDetails,
+        ImageDimensionsTooLargeErrorDetails,
         OrganizationOnHoldErrorDetails,
         RequestBodyEncodingInvalidErrorDetails,
         RequestBodyEncodingUnsupportedErrorDetails,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/anthropic-2.11.0/src/anthropic/types/user_profile_billing_not_authorized_error.py
 
new/anthropic-2.12.0/src/anthropic/types/user_profile_billing_not_authorized_error.py
--- 
old/anthropic-2.11.0/src/anthropic/types/user_profile_billing_not_authorized_error.py
       2020-02-02 01:00:00.000000000 +0100
+++ 
new/anthropic-2.12.0/src/anthropic/types/user_profile_billing_not_authorized_error.py
       2020-02-02 01:00:00.000000000 +0100
@@ -8,7 +8,7 @@
 
 class UserProfileBillingNotAuthorizedError(PermissionDeniedError):
     """
-    The customer that the named user profile represents has not authorized the 
caller to bill them, or the authorization that the request's credential uses 
has ended. The response does not say which applies.
+    The customer that the request's user profile represents has not authorized 
the caller to bill them, or the authorization that the request's credential 
uses has ended. The response does not say which applies.
     """
 
     error_code: Literal["user_profile_billing_not_authorized"]  # pyright: 
ignore[reportIncompatibleVariableOverride]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/anthropic-2.11.0/src/anthropic/types/user_profile_billing_not_authorized_error_details.py
 
new/anthropic-2.12.0/src/anthropic/types/user_profile_billing_not_authorized_error_details.py
--- 
old/anthropic-2.11.0/src/anthropic/types/user_profile_billing_not_authorized_error_details.py
       2020-02-02 01:00:00.000000000 +0100
+++ 
new/anthropic-2.12.0/src/anthropic/types/user_profile_billing_not_authorized_error_details.py
       2020-02-02 01:00:00.000000000 +0100
@@ -7,7 +7,7 @@
 
 class UserProfileBillingNotAuthorizedErrorDetails(BaseModel):
     """
-    The customer that the named user profile represents has not authorized the 
caller to bill them, or the authorization that the request's credential uses 
has ended. The response does not say which applies.
+    The customer that the request's user profile represents has not authorized 
the caller to bill them, or the authorization that the request's credential 
uses has ended. The response does not say which applies.
     """
 
     error_code: Literal["user_profile_billing_not_authorized"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/anthropic-2.11.0/src/anthropic/types/user_profile_not_billable_error.py 
new/anthropic-2.12.0/src/anthropic/types/user_profile_not_billable_error.py
--- old/anthropic-2.11.0/src/anthropic/types/user_profile_not_billable_error.py 
2020-02-02 01:00:00.000000000 +0100
+++ new/anthropic-2.12.0/src/anthropic/types/user_profile_not_billable_error.py 
2020-02-02 01:00:00.000000000 +0100
@@ -7,7 +7,7 @@
 
 
 class UserProfileNotBillableError(PermissionDeniedError):
-    """The caller is not allowed to bill the user profile that the request 
names.
+    """The request's user profile cannot be billed.
 
     The response gives no more specific error code and does not say what the 
reason is.
     """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/anthropic-2.11.0/src/anthropic/types/user_profile_not_billable_error_details.py
 
new/anthropic-2.12.0/src/anthropic/types/user_profile_not_billable_error_details.py
--- 
old/anthropic-2.11.0/src/anthropic/types/user_profile_not_billable_error_details.py
 2020-02-02 01:00:00.000000000 +0100
+++ 
new/anthropic-2.12.0/src/anthropic/types/user_profile_not_billable_error_details.py
 2020-02-02 01:00:00.000000000 +0100
@@ -6,7 +6,7 @@
 
 
 class UserProfileNotBillableErrorDetails(BaseModel):
-    """The caller is not allowed to bill the user profile that the request 
names.
+    """The request's user profile cannot be billed.
 
     The response gives no more specific error code and does not say what the 
reason is.
     """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/anthropic-2.11.0/tests/lib/test_bedrock.py 
new/anthropic-2.12.0/tests/lib/test_bedrock.py
--- old/anthropic-2.11.0/tests/lib/test_bedrock.py      2020-02-02 
01:00:00.000000000 +0100
+++ new/anthropic-2.12.0/tests/lib/test_bedrock.py      2020-02-02 
01:00:00.000000000 +0100
@@ -912,7 +912,8 @@
             url="/v1/messages",
             json_data={"model": "anthropic.claude-sonnet-4-5"},
             headers={"Anthropic-Beta": "context-1m-2025-08-07,other-beta"},
-        )
+        ),
+        {},
     )
 
     assert cast("dict[str, object]", options.json_data).get("anthropic_beta") 
== [
@@ -972,7 +973,7 @@
 
 
 @pytest.mark.respx()
-def test_user_profile_id_is_sent_in_the_header(respx_mock: MockRouter) -> None:
+def test_user_profile_id_is_sent_in_the_body(respx_mock: MockRouter) -> None:
     respx_mock.post(INVOKE_URL).mock(return_value=httpx2.Response(200, 
json={"foo": "bar"}))
 
     sync_api_key_client.messages.create(
@@ -981,102 +982,10 @@
         model="anthropic.claude-3-5-sonnet-20241022-v2:0",
         user_profile_id="uprof_test",
     )
-    sync_api_key_client.beta.messages.create(
-        max_tokens=1024,
-        messages=[{"role": "user", "content": "Say hello there!"}],
-        model="anthropic.claude-3-5-sonnet-20241022-v2:0",
-        user_profile_id="uprof_test",
-    )
-    sync_api_key_client.messages.create(
-        max_tokens=1024,
-        messages=[{"role": "user", "content": "Say hello there!"}],
-        model="anthropic.claude-3-5-sonnet-20241022-v2:0",
-        extra_headers={"Anthropic-User-Profile-Id": "uprof_test"},
-    )
-
-    calls = cast("list[MockRequestCall]", respx_mock.calls)
-    assert len(calls) == 3
-    for call in calls:
-        assert call.request.headers["anthropic-user-profile-id"] == 
"uprof_test"
-        assert "user_profile_id" not in json.loads(call.request.content)
-
-
[email protected]()
[email protected]()
-async def test_user_profile_id_is_sent_in_the_header_async(respx_mock: 
MockRouter) -> None:
-    respx_mock.post(INVOKE_URL).mock(return_value=httpx2.Response(200, 
json={"foo": "bar"}))
-
-    await async_api_key_client.messages.create(
-        max_tokens=1024,
-        messages=[{"role": "user", "content": "Say hello there!"}],
-        model="anthropic.claude-3-5-sonnet-20241022-v2:0",
-        user_profile_id="uprof_test",
-    )
-    await async_api_key_client.beta.messages.create(
-        max_tokens=1024,
-        messages=[{"role": "user", "content": "Say hello there!"}],
-        model="anthropic.claude-3-5-sonnet-20241022-v2:0",
-        user_profile_id="uprof_test",
-    )
-    await async_api_key_client.messages.create(
-        max_tokens=1024,
-        messages=[{"role": "user", "content": "Say hello there!"}],
-        model="anthropic.claude-3-5-sonnet-20241022-v2:0",
-        extra_headers={"Anthropic-User-Profile-Id": "uprof_test"},
-    )
-
-    calls = cast("list[MockRequestCall]", respx_mock.calls)
-    assert len(calls) == 3
-    for call in calls:
-        assert call.request.headers["anthropic-user-profile-id"] == 
"uprof_test"
-        assert "user_profile_id" not in json.loads(call.request.content)
-
 
[email protected]()
-def test_client_user_profile_id_is_kept(respx_mock: MockRouter) -> None:
-    respx_mock.post(INVOKE_URL).mock(return_value=httpx2.Response(200, 
json={"foo": "bar"}))
-    client = 
sync_api_key_client.with_options(default_headers={"anthropic-user-profile-id": 
"uprof_client"})
-
-    client.messages.create(
-        max_tokens=1024,
-        messages=[{"role": "user", "content": "Say hello there!"}],
-        model="anthropic.claude-3-5-sonnet-20241022-v2:0",
-    )
-    client.messages.create(
-        max_tokens=1024,
-        messages=[{"role": "user", "content": "Say hello there!"}],
-        model="anthropic.claude-3-5-sonnet-20241022-v2:0",
-        user_profile_id="uprof_request",
-    )
-
-    calls = cast("list[MockRequestCall]", respx_mock.calls)
-    assert len(calls) == 2
-    assert calls[0].request.headers["anthropic-user-profile-id"] == 
"uprof_client"
-    assert calls[1].request.headers["anthropic-user-profile-id"] == 
"uprof_request"
-
-
[email protected]()
[email protected]()
-async def test_client_user_profile_id_is_kept_async(respx_mock: MockRouter) -> 
None:
-    respx_mock.post(INVOKE_URL).mock(return_value=httpx2.Response(200, 
json={"foo": "bar"}))
-    client = 
async_api_key_client.with_options(default_headers={"anthropic-user-profile-id": 
"uprof_client"})
-
-    await client.messages.create(
-        max_tokens=1024,
-        messages=[{"role": "user", "content": "Say hello there!"}],
-        model="anthropic.claude-3-5-sonnet-20241022-v2:0",
-    )
-    await client.messages.create(
-        max_tokens=1024,
-        messages=[{"role": "user", "content": "Say hello there!"}],
-        model="anthropic.claude-3-5-sonnet-20241022-v2:0",
-        user_profile_id="uprof_request",
-    )
-
-    calls = cast("list[MockRequestCall]", respx_mock.calls)
-    assert len(calls) == 2
-    assert calls[0].request.headers["anthropic-user-profile-id"] == 
"uprof_client"
-    assert calls[1].request.headers["anthropic-user-profile-id"] == 
"uprof_request"
+    [call] = cast("list[MockRequestCall]", respx_mock.calls)
+    assert "anthropic-user-profile-id" not in call.request.headers
+    assert json.loads(call.request.content)["user_profile_id"] == "uprof_test"
 
 
 @pytest.mark.respx()
@@ -1127,7 +1036,7 @@
 
 
 @pytest.mark.respx()
-def test_no_header_without_a_user_profile_id(respx_mock: MockRouter) -> None:
+def test_user_profile_id_is_not_sent_when_unset(respx_mock: MockRouter) -> 
None:
     respx_mock.post(INVOKE_URL).mock(return_value=httpx2.Response(200, 
json={"foo": "bar"}))
 
     sync_api_key_client.messages.create(
@@ -1139,6 +1048,7 @@
     calls = cast("list[MockRequestCall]", respx_mock.calls)
     assert len(calls) == 1
     assert "anthropic-user-profile-id" not in calls[0].request.headers
+    assert "user_profile_id" not in json.loads(calls[0].request.content)
 
 
 @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/anthropic-2.11.0/uv.lock new/anthropic-2.12.0/uv.lock
--- old/anthropic-2.11.0/uv.lock        2020-02-02 01:00:00.000000000 +0100
+++ new/anthropic-2.12.0/uv.lock        2020-02-02 01:00:00.000000000 +0100
@@ -188,7 +188,7 @@
 
 [[package]]
 name = "anthropic"
-version = "2.11.0"
+version = "2.12.0"
 source = { editable = "." }
 dependencies = [
     { name = "anyio" },

Reply via email to