anthropic 2.11.0 → 2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/README.md +1 -1
- data/lib/anthropic/error_classes.rb +1 -0
- data/lib/anthropic/helpers/bedrock/client.rb +12 -2
- data/lib/anthropic/models/beta/message_create_params.rb +6 -0
- data/lib/anthropic/models/beta/messages/batch_create_params.rb +6 -0
- data/lib/anthropic/models/error_details.rb +14 -4
- data/lib/anthropic/models/image_dimensions_too_large_error.rb +21 -0
- data/lib/anthropic/models/image_dimensions_too_large_error_details.rb +41 -0
- data/lib/anthropic/models/user_profile_billing_not_authorized_error.rb +1 -1
- data/lib/anthropic/models/user_profile_billing_not_authorized_error_details.rb +1 -1
- data/lib/anthropic/models/user_profile_not_billable_error.rb +2 -2
- data/lib/anthropic/models/user_profile_not_billable_error_details.rb +2 -2
- data/lib/anthropic/models.rb +4 -0
- data/lib/anthropic/resources/beta/messages.rb +3 -0
- data/lib/anthropic/resources/messages.rb +3 -0
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +2 -0
- data/rbi/anthropic/models/beta/message_create_params.rbi +12 -0
- data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +12 -0
- data/rbi/anthropic/models/error_details.rbi +15 -0
- data/rbi/anthropic/models/image_dimensions_too_large_error.rbi +18 -0
- data/rbi/anthropic/models/image_dimensions_too_large_error_details.rbi +63 -0
- data/rbi/anthropic/models/user_profile_billing_not_authorized_error.rbi +1 -1
- data/rbi/anthropic/models/user_profile_billing_not_authorized_error_details.rbi +1 -1
- data/rbi/anthropic/models/user_profile_not_billable_error.rbi +2 -2
- data/rbi/anthropic/models/user_profile_not_billable_error_details.rbi +2 -2
- data/rbi/anthropic/models.rbi +5 -0
- data/rbi/anthropic/resources/beta/messages.rbi +18 -0
- data/sig/anthropic/models/error_details.rbs +11 -0
- data/sig/anthropic/models/image_dimensions_too_large_error.rbs +9 -0
- data/sig/anthropic/models/image_dimensions_too_large_error_details.rbs +30 -0
- data/sig/anthropic/models.rbs +4 -0
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ca693e130ca3c70963ee708a047dfbcd349a065d1d2f808e7f548eb8d528b84b
|
|
4
|
+
data.tar.gz: e9e90a26c4386c28a4cd69444d94364b7e1cb6962bdbf4dbbb88646ed7fe3c19
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7dd986e8a4371209157a478aa2a0b0bfb6a10070d002cf0a38ad30258f55a1649403dc197475577dab928d94a0152bd7427ed3a9e59c7d823fee51a48487b4dd
|
|
7
|
+
data.tar.gz: 85900815be3754949039e871fc1f56c64773251187d655e595571281668cc2184bd8e6e4c02cd709eb7cdeb217d03bbb8efc823591c48b4136d53a33d41fd29f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.12.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v2.11.0...v2.12.0) (2026-11-20)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **api:** add the image_dimensions_too_large error code
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **bedrock:** send the user profile ID in the request body
|
|
13
|
+
|
|
14
|
+
Amazon Bedrock reads `user_profile_id` from the request body and ignores the `anthropic-user-profile-id` header, so a profile ID given to `Anthropic::BedrockClient` was not applied. `Anthropic::BedrockClient` now moves it into the body of Messages requests and no longer sends the header. A `user_profile_id` already in the body takes priority over the header.
|
|
15
|
+
|
|
16
|
+
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.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Chores
|
|
20
|
+
|
|
21
|
+
* **docs:** clarify billing_policy in batches and two billing errors
|
|
22
|
+
|
|
3
23
|
## [2.11.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v2.10.0...v2.11.0) (2026-11-19)
|
|
4
24
|
|
|
5
25
|
### Features
|
data/README.md
CHANGED
|
@@ -51,6 +51,7 @@ module Anthropic
|
|
|
51
51
|
[400, "external_key_validation_failed"] => Anthropic::Models::Organization::ExternalKeyValidationFailedError,
|
|
52
52
|
[400, "external_key_validation_timed_out"] => Anthropic::Models::Organization::ExternalKeyValidationTimedOutError,
|
|
53
53
|
[400, "file_not_downloadable"] => Anthropic::Models::FileNotDownloadableError,
|
|
54
|
+
[400, "image_dimensions_too_large"] => Anthropic::Models::ImageDimensionsTooLargeError,
|
|
54
55
|
[400, "invalid_config_type_change"] => Anthropic::Models::Beta::BetaInvalidConfigTypeChangeError,
|
|
55
56
|
[400, "invalid_metadata"] => Anthropic::Models::Beta::BetaInvalidMetadataError,
|
|
56
57
|
[400, "invite_already_exists"] => Anthropic::Models::Organization::InviteAlreadyExistsError,
|
|
@@ -333,8 +333,9 @@ module Anthropic
|
|
|
333
333
|
# @api private
|
|
334
334
|
#
|
|
335
335
|
# Rewrites the canonical Anthropic request into Bedrock's shape — moves
|
|
336
|
-
# the `anthropic-version` header into the body,
|
|
337
|
-
#
|
|
336
|
+
# the `anthropic-version` header into the body, moves the
|
|
337
|
+
# `anthropic-user-profile-id` header of a Messages request into the
|
|
338
|
+
# body, drops `:model`/`:stream` from the body and retargets the URL to
|
|
338
339
|
# `/model/{model}/invoke[-with-response-stream]`. Called from
|
|
339
340
|
# {#provider_middleware}, so user middleware sees the canonical
|
|
340
341
|
# request. Pure: the incoming request, its body, and its URI are never
|
|
@@ -357,6 +358,15 @@ module Anthropic
|
|
|
357
358
|
|
|
358
359
|
return req.with(body: body) unless req.method == :post && messages_route
|
|
359
360
|
|
|
361
|
+
profile_headers, headers = req.headers.partition do |name, _|
|
|
362
|
+
name.to_s.casecmp?("anthropic-user-profile-id")
|
|
363
|
+
end
|
|
364
|
+
user_profile_id = profile_headers.last&.last
|
|
365
|
+
unless user_profile_id.to_s.empty?
|
|
366
|
+
body[:user_profile_id] = user_profile_id unless body.keys.any? { _1.to_s == "user_profile_id" }
|
|
367
|
+
req = req.with(headers: headers.to_h)
|
|
368
|
+
end
|
|
369
|
+
|
|
360
370
|
model = Anthropic::Internal::Util.encode_path(body.delete(:model).to_s)
|
|
361
371
|
stream = body.delete(:stream) || false
|
|
362
372
|
invoke_path = stream ? "model/#{model}/invoke-with-response-stream" : "model/#{model}/invoke"
|
|
@@ -119,6 +119,12 @@ module Anthropic
|
|
|
119
119
|
# rejected rather than billed to you. Omit the field, or send `"bill_to": "self"`
|
|
120
120
|
# (the default), to be billed as usual.
|
|
121
121
|
#
|
|
122
|
+
# Message Batches does not currently support billing the customer behind a user
|
|
123
|
+
# profile. In a batch, omit the field or send `"bill_to": "self"`. A request in a
|
|
124
|
+
# batch that sets `"bill_to": "user_profile"` gets an `errored` result with an
|
|
125
|
+
# `invalid_request_error`, nobody is billed for it, and the batch's other requests
|
|
126
|
+
# run as usual.
|
|
127
|
+
#
|
|
122
128
|
# @return [Anthropic::Models::Beta::BetaBillingPolicy, nil]
|
|
123
129
|
optional :billing_policy, -> { Anthropic::Beta::BetaBillingPolicy }, nil?: true
|
|
124
130
|
|
|
@@ -197,6 +197,12 @@ module Anthropic
|
|
|
197
197
|
# rejected rather than billed to you. Omit the field, or send `"bill_to": "self"`
|
|
198
198
|
# (the default), to be billed as usual.
|
|
199
199
|
#
|
|
200
|
+
# Message Batches does not currently support billing the customer behind a user
|
|
201
|
+
# profile. In a batch, omit the field or send `"bill_to": "self"`. A request in a
|
|
202
|
+
# batch that sets `"bill_to": "user_profile"` gets an `errored` result with an
|
|
203
|
+
# `invalid_request_error`, nobody is billed for it, and the batch's other requests
|
|
204
|
+
# run as usual.
|
|
205
|
+
#
|
|
200
206
|
# @return [Anthropic::Models::Beta::BetaBillingPolicy, nil]
|
|
201
207
|
optional :billing_policy, -> { Anthropic::Beta::BetaBillingPolicy }, nil?: true
|
|
202
208
|
|
|
@@ -47,6 +47,9 @@ module Anthropic
|
|
|
47
47
|
# The `compaction` block's `tool_changes` differs from what was returned with the block.
|
|
48
48
|
variant :compaction_tool_changes_mismatch, -> { Anthropic::CompactionToolChangesMismatchErrorDetails }
|
|
49
49
|
|
|
50
|
+
# 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.
|
|
51
|
+
variant :image_dimensions_too_large, -> { Anthropic::ImageDimensionsTooLargeErrorDetails }
|
|
52
|
+
|
|
50
53
|
# Anthropic has disabled the organization for trust and safety reasons. An organization disabled for any other reason, such as billing, does not get this code. `appeal_url`, when present, is where the organization can appeal.
|
|
51
54
|
variant :organization_on_hold, -> { Anthropic::OrganizationOnHoldErrorDetails }
|
|
52
55
|
|
|
@@ -85,11 +88,11 @@ module Anthropic
|
|
|
85
88
|
variant :linked_organization_spend_limit_reached,
|
|
86
89
|
-> { Anthropic::LinkedOrganizationSpendLimitReachedErrorDetails }
|
|
87
90
|
|
|
88
|
-
# The customer that the
|
|
91
|
+
# 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.
|
|
89
92
|
variant :user_profile_billing_not_authorized,
|
|
90
93
|
-> { Anthropic::UserProfileBillingNotAuthorizedErrorDetails }
|
|
91
94
|
|
|
92
|
-
# The
|
|
95
|
+
# The request's user profile cannot be billed. The response gives no more specific error code and does not say what the reason is.
|
|
93
96
|
variant :user_profile_not_billable, -> { Anthropic::UserProfileNotBillableErrorDetails }
|
|
94
97
|
|
|
95
98
|
# No usable Thread state was found for `previous_message_id`. Replay the full conversation with `thread: {"type": "create"}` to start a new Thread.
|
|
@@ -352,6 +355,7 @@ module Anthropic
|
|
|
352
355
|
COMPACTION_SIGNATURE_INVALID = :compaction_signature_invalid
|
|
353
356
|
COMPACTION_TOO_MANY_TOOL_REFERENCES = :compaction_too_many_tool_references
|
|
354
357
|
COMPACTION_TOOL_CHANGES_MISMATCH = :compaction_tool_changes_mismatch
|
|
358
|
+
IMAGE_DIMENSIONS_TOO_LARGE = :image_dimensions_too_large
|
|
355
359
|
ORGANIZATION_ON_HOLD = :organization_on_hold
|
|
356
360
|
REQUEST_BODY_ENCODING_INVALID = :request_body_encoding_invalid
|
|
357
361
|
REQUEST_BODY_ENCODING_UNSUPPORTED = :request_body_encoding_unsupported
|
|
@@ -444,7 +448,7 @@ module Anthropic
|
|
|
444
448
|
end
|
|
445
449
|
|
|
446
450
|
# @!method self.variants
|
|
447
|
-
# @return [Array(Anthropic::Models::AvailableToolsLimitExceededErrorDetails, Anthropic::Models::ClaudeCodeKeyCreatorNotMemberErrorDetails, Anthropic::Models::ClaudeCodeVersionTooOldErrorDetails, Anthropic::Models::CMEKKeyDisabledErrorDetails, Anthropic::Models::CMEKKeyNetworkBlockedErrorDetails, Anthropic::Models::CompactionBlockAmbiguousErrorDetails, Anthropic::Models::CompactionBlockMisplacedErrorDetails, Anthropic::Models::CompactionContentMismatchErrorDetails, Anthropic::Models::CompactionIncompleteTurnErrorDetails, Anthropic::Models::CompactionNothingToSummarizeErrorDetails, Anthropic::Models::CompactionSignatureInvalidErrorDetails, Anthropic::Models::CompactionTooManyToolReferencesErrorDetails, Anthropic::Models::CompactionToolChangesMismatchErrorDetails, Anthropic::Models::OrganizationOnHoldErrorDetails, Anthropic::Models::RequestBodyEncodingInvalidErrorDetails, Anthropic::Models::RequestBodyEncodingUnsupportedErrorDetails, Anthropic::Models::ThreadAlreadyContinuedErrorDetails, Anthropic::Models::ThreadContinueInFlightErrorDetails, Anthropic::Models::ThreadFingerprintMismatchErrorDetails, Anthropic::Models::ThreadUnsupportedRequestErrorDetails, Anthropic::Models::ToolNameConflictErrorDetails, Anthropic::Models::ToolReferenceUnresolvedErrorDetails, Anthropic::Models::UserProfileRequiredErrorDetails, Anthropic::Models::LinkedOrganizationBillingUnavailableErrorDetails, Anthropic::Models::LinkedOrganizationSpendLimitReachedErrorDetails, Anthropic::Models::UserProfileBillingNotAuthorizedErrorDetails, Anthropic::Models::UserProfileNotBillableErrorDetails, Anthropic::Models::ThreadNotFoundErrorDetails, Anthropic::Models::SkillReadBlockedUndecryptableErrorDetails, Anthropic::Models::RequestBodyTooLargeAfterDecodingErrorDetails, Anthropic::Models::ContractSpendLimitReachedErrorDetails, Anthropic::Models::EnforcedSpendLimitReachedErrorDetails, Anthropic::Models::RampLimitExceededErrorDetails, Anthropic::Models::CMEKKeyUnreachableErrorDetails, Anthropic::Models::CompactionUnavailableErrorDetails, Anthropic::Models::StorageQuotaExceededErrorDetails, Anthropic::Models::FileNotDownloadableErrorDetails, Anthropic::Models::FileExpiredErrorDetails, Anthropic::Models::CMEKContextUnavailableErrorDetails, Anthropic::Models::Organization::OrgAPIKeyLimitExceededErrorDetails, Anthropic::Models::Organization::WorkspaceAPIKeyLimitExceededErrorDetails, Anthropic::Models::SandboxEgressRestrictedErrorDetails, Anthropic::Models::UserProfileNotFoundErrorDetails, Anthropic::Models::Organization::ExternalKeyInWorkspacePolicyErrorDetails, Anthropic::Models::Organization::AlreadyMemberErrorDetails, Anthropic::Models::Organization::CannotInviteEmailsWithUnverifiedDomainsErrorDetails, Anthropic::Models::Organization::EmailDomainNotAllowedErrorDetails, Anthropic::Models::Organization::InviteAlreadyExistsErrorDetails, Anthropic::Models::OrgMemberLimitExceededErrorDetails, Anthropic::Models::Organization::RBACGroupGrantsOwnerAccessErrorDetails, Anthropic::Models::Organization::RBACGroupOwnerAccessUnconfirmedErrorDetails, Anthropic::Models::Organization::CannotRemoveLastMemberErrorDetails, Anthropic::Models::ConcurrentMembershipChangeErrorDetails, Anthropic::Models::Organization::ExternalKeyValidationFailedErrorDetails, Anthropic::Models::Organization::ExternalKeyValidationTimedOutErrorDetails, Anthropic::Models::Organization::KeyProfileMismatchErrorDetails, Anthropic::Models::Organization::WorkspacePolicyViolationErrorDetails, Anthropic::Models::Organization::ExternalKeyChangedErrorDetails, Anthropic::Models::Organization::WorkspaceMemberLimitExceededErrorDetails, Anthropic::Models::OrganizationTypeNotSupportedErrorDetails, Anthropic::Models::ParentOrganizationRequiredErrorDetails, Anthropic::Models::RBACRoleNotFoundErrorDetails, Anthropic::Models::Beta::BetaEnvironmentCreateDisabledErrorDetails, Anthropic::Models::Beta::BetaEnvironmentArchivedErrorDetails, Anthropic::Models::Beta::BetaInvalidConfigTypeChangeErrorDetails, Anthropic::Models::Beta::BetaEnvironmentUpdateDisabledErrorDetails, Anthropic::Models::Beta::Environments::BetaHeartbeatPreconditionFailedErrorDetails, Anthropic::Models::Beta::BetaInvalidMetadataErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutPrimaryOwnerErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutSelfErrorDetails, Anthropic::Models::BetaOrganizationNotEnrolledInBetaErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutManagedMemberErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutMembershipAdminErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutOwnerErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutPrivilegedMemberErrorDetails, Anthropic::Models::Beta::Organization::BetaSpendLimitsAdminAPIWritesNotEnabledErrorDetails, Anthropic::Models::BetaUnsupportedCharsetErrorDetails, Anthropic::Models::Beta::Organization::BetaPluginNameTakenErrorDetails, Anthropic::Models::Beta::Organization::BetaSkillNameTakenErrorDetails, Anthropic::Models::Beta::Organization::BetaRegistrationPendingErrorDetails, Anthropic::Models::Beta::Organization::BetaScanFailedErrorDetails, Anthropic::Models::Beta::Organization::BetaScanPendingErrorDetails, Anthropic::Models::BetaRequestBodyTimeoutErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaSettingsDocumentLimitExceededErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaSettingsHistoryLimitExceededErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaCMEKFeatureUnsupportedErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaRBACGroupManagedSettingsNotFoundErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaRBACGroupOrderLimitExceededErrorDetails, Anthropic::Models::Beta::Organization::BetaRBACGroupNotFoundErrorDetails, Anthropic::Models::Beta::Organization::BetaSlackChannelSetUpSettingsRefusedErrorDetails, Anthropic::Models::Beta::Organization::BetaAPIKeyScopeMissingErrorDetails, Anthropic::Models::Beta::Organization::BetaClaudeTagWritesNotEnabledErrorDetails, Anthropic::Models::Beta::Organization::BetaComplianceConfigurationRestrictedErrorDetails, Anthropic::Models::Beta::Organization::BetaOrganizationLevelScopedAPIKeyRequiredErrorDetails, Anthropic::Models::Beta::BetaEnvironmentNotFoundErrorDetails, Anthropic::Models::Beta::Organization::BetaSlackChannelSetUpEnvironmentNotFoundErrorDetails, Anthropic::Models::Beta::Organization::BetaSlackChannelSetUpSettingsConflictErrorDetails, Anthropic::Models::Beta::Organization::BetaBundleAttachmentNotSupportedErrorDetails, Anthropic::Models::Beta::Organization::BetaBundleOnCallErrorDetails)]
|
|
451
|
+
# @return [Array(Anthropic::Models::AvailableToolsLimitExceededErrorDetails, Anthropic::Models::ClaudeCodeKeyCreatorNotMemberErrorDetails, Anthropic::Models::ClaudeCodeVersionTooOldErrorDetails, Anthropic::Models::CMEKKeyDisabledErrorDetails, Anthropic::Models::CMEKKeyNetworkBlockedErrorDetails, Anthropic::Models::CompactionBlockAmbiguousErrorDetails, Anthropic::Models::CompactionBlockMisplacedErrorDetails, Anthropic::Models::CompactionContentMismatchErrorDetails, Anthropic::Models::CompactionIncompleteTurnErrorDetails, Anthropic::Models::CompactionNothingToSummarizeErrorDetails, Anthropic::Models::CompactionSignatureInvalidErrorDetails, Anthropic::Models::CompactionTooManyToolReferencesErrorDetails, Anthropic::Models::CompactionToolChangesMismatchErrorDetails, Anthropic::Models::ImageDimensionsTooLargeErrorDetails, Anthropic::Models::OrganizationOnHoldErrorDetails, Anthropic::Models::RequestBodyEncodingInvalidErrorDetails, Anthropic::Models::RequestBodyEncodingUnsupportedErrorDetails, Anthropic::Models::ThreadAlreadyContinuedErrorDetails, Anthropic::Models::ThreadContinueInFlightErrorDetails, Anthropic::Models::ThreadFingerprintMismatchErrorDetails, Anthropic::Models::ThreadUnsupportedRequestErrorDetails, Anthropic::Models::ToolNameConflictErrorDetails, Anthropic::Models::ToolReferenceUnresolvedErrorDetails, Anthropic::Models::UserProfileRequiredErrorDetails, Anthropic::Models::LinkedOrganizationBillingUnavailableErrorDetails, Anthropic::Models::LinkedOrganizationSpendLimitReachedErrorDetails, Anthropic::Models::UserProfileBillingNotAuthorizedErrorDetails, Anthropic::Models::UserProfileNotBillableErrorDetails, Anthropic::Models::ThreadNotFoundErrorDetails, Anthropic::Models::SkillReadBlockedUndecryptableErrorDetails, Anthropic::Models::RequestBodyTooLargeAfterDecodingErrorDetails, Anthropic::Models::ContractSpendLimitReachedErrorDetails, Anthropic::Models::EnforcedSpendLimitReachedErrorDetails, Anthropic::Models::RampLimitExceededErrorDetails, Anthropic::Models::CMEKKeyUnreachableErrorDetails, Anthropic::Models::CompactionUnavailableErrorDetails, Anthropic::Models::StorageQuotaExceededErrorDetails, Anthropic::Models::FileNotDownloadableErrorDetails, Anthropic::Models::FileExpiredErrorDetails, Anthropic::Models::CMEKContextUnavailableErrorDetails, Anthropic::Models::Organization::OrgAPIKeyLimitExceededErrorDetails, Anthropic::Models::Organization::WorkspaceAPIKeyLimitExceededErrorDetails, Anthropic::Models::SandboxEgressRestrictedErrorDetails, Anthropic::Models::UserProfileNotFoundErrorDetails, Anthropic::Models::Organization::ExternalKeyInWorkspacePolicyErrorDetails, Anthropic::Models::Organization::AlreadyMemberErrorDetails, Anthropic::Models::Organization::CannotInviteEmailsWithUnverifiedDomainsErrorDetails, Anthropic::Models::Organization::EmailDomainNotAllowedErrorDetails, Anthropic::Models::Organization::InviteAlreadyExistsErrorDetails, Anthropic::Models::OrgMemberLimitExceededErrorDetails, Anthropic::Models::Organization::RBACGroupGrantsOwnerAccessErrorDetails, Anthropic::Models::Organization::RBACGroupOwnerAccessUnconfirmedErrorDetails, Anthropic::Models::Organization::CannotRemoveLastMemberErrorDetails, Anthropic::Models::ConcurrentMembershipChangeErrorDetails, Anthropic::Models::Organization::ExternalKeyValidationFailedErrorDetails, Anthropic::Models::Organization::ExternalKeyValidationTimedOutErrorDetails, Anthropic::Models::Organization::KeyProfileMismatchErrorDetails, Anthropic::Models::Organization::WorkspacePolicyViolationErrorDetails, Anthropic::Models::Organization::ExternalKeyChangedErrorDetails, Anthropic::Models::Organization::WorkspaceMemberLimitExceededErrorDetails, Anthropic::Models::OrganizationTypeNotSupportedErrorDetails, Anthropic::Models::ParentOrganizationRequiredErrorDetails, Anthropic::Models::RBACRoleNotFoundErrorDetails, Anthropic::Models::Beta::BetaEnvironmentCreateDisabledErrorDetails, Anthropic::Models::Beta::BetaEnvironmentArchivedErrorDetails, Anthropic::Models::Beta::BetaInvalidConfigTypeChangeErrorDetails, Anthropic::Models::Beta::BetaEnvironmentUpdateDisabledErrorDetails, Anthropic::Models::Beta::Environments::BetaHeartbeatPreconditionFailedErrorDetails, Anthropic::Models::Beta::BetaInvalidMetadataErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutPrimaryOwnerErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutSelfErrorDetails, Anthropic::Models::BetaOrganizationNotEnrolledInBetaErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutManagedMemberErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutMembershipAdminErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutOwnerErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutPrivilegedMemberErrorDetails, Anthropic::Models::Beta::Organization::BetaSpendLimitsAdminAPIWritesNotEnabledErrorDetails, Anthropic::Models::BetaUnsupportedCharsetErrorDetails, Anthropic::Models::Beta::Organization::BetaPluginNameTakenErrorDetails, Anthropic::Models::Beta::Organization::BetaSkillNameTakenErrorDetails, Anthropic::Models::Beta::Organization::BetaRegistrationPendingErrorDetails, Anthropic::Models::Beta::Organization::BetaScanFailedErrorDetails, Anthropic::Models::Beta::Organization::BetaScanPendingErrorDetails, Anthropic::Models::BetaRequestBodyTimeoutErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaSettingsDocumentLimitExceededErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaSettingsHistoryLimitExceededErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaCMEKFeatureUnsupportedErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaRBACGroupManagedSettingsNotFoundErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaRBACGroupOrderLimitExceededErrorDetails, Anthropic::Models::Beta::Organization::BetaRBACGroupNotFoundErrorDetails, Anthropic::Models::Beta::Organization::BetaSlackChannelSetUpSettingsRefusedErrorDetails, Anthropic::Models::Beta::Organization::BetaAPIKeyScopeMissingErrorDetails, Anthropic::Models::Beta::Organization::BetaClaudeTagWritesNotEnabledErrorDetails, Anthropic::Models::Beta::Organization::BetaComplianceConfigurationRestrictedErrorDetails, Anthropic::Models::Beta::Organization::BetaOrganizationLevelScopedAPIKeyRequiredErrorDetails, Anthropic::Models::Beta::BetaEnvironmentNotFoundErrorDetails, Anthropic::Models::Beta::Organization::BetaSlackChannelSetUpEnvironmentNotFoundErrorDetails, Anthropic::Models::Beta::Organization::BetaSlackChannelSetUpSettingsConflictErrorDetails, Anthropic::Models::Beta::Organization::BetaBundleAttachmentNotSupportedErrorDetails, Anthropic::Models::Beta::Organization::BetaBundleOnCallErrorDetails)]
|
|
448
452
|
|
|
449
453
|
# Creates a new instance of the variant class whose `error_code` matches the given
|
|
450
454
|
# value, passing the remaining arguments to its constructor.
|
|
@@ -456,6 +460,10 @@ module Anthropic
|
|
|
456
460
|
#
|
|
457
461
|
# @param args [Hash{Symbol=>Object}] Attributes for the chosen variant.
|
|
458
462
|
#
|
|
463
|
+
# @option args [Integer] :max_side_length_pixels The limit the images exceeded: the largest width or height, in pixels, that an i
|
|
464
|
+
#
|
|
465
|
+
# @option args [Array<String>] :paths The position of every image over the limit, in the order you sent them, nested b
|
|
466
|
+
#
|
|
459
467
|
# @option args [String, nil] :appeal_url
|
|
460
468
|
#
|
|
461
469
|
# @option args [Array<Symbol, Anthropic::Models::ThreadUnsupportedFeatureName>, nil] :unsupported Each entry names a request field or an organization setting that Threads do not
|
|
@@ -473,7 +481,7 @@ module Anthropic
|
|
|
473
481
|
# @option args [String] :slack_channel_id The identifier of the channel the request set up, starting with `slch_`.
|
|
474
482
|
#
|
|
475
483
|
# @raise [ArgumentError]
|
|
476
|
-
# @return [Anthropic::Models::AvailableToolsLimitExceededErrorDetails, Anthropic::Models::ClaudeCodeKeyCreatorNotMemberErrorDetails, Anthropic::Models::ClaudeCodeVersionTooOldErrorDetails, Anthropic::Models::CMEKKeyDisabledErrorDetails, Anthropic::Models::CMEKKeyNetworkBlockedErrorDetails, Anthropic::Models::CompactionBlockAmbiguousErrorDetails, Anthropic::Models::CompactionBlockMisplacedErrorDetails, Anthropic::Models::CompactionContentMismatchErrorDetails, Anthropic::Models::CompactionIncompleteTurnErrorDetails, Anthropic::Models::CompactionNothingToSummarizeErrorDetails, Anthropic::Models::CompactionSignatureInvalidErrorDetails, Anthropic::Models::CompactionTooManyToolReferencesErrorDetails, Anthropic::Models::CompactionToolChangesMismatchErrorDetails, Anthropic::Models::OrganizationOnHoldErrorDetails, Anthropic::Models::RequestBodyEncodingInvalidErrorDetails, Anthropic::Models::RequestBodyEncodingUnsupportedErrorDetails, Anthropic::Models::ThreadAlreadyContinuedErrorDetails, Anthropic::Models::ThreadContinueInFlightErrorDetails, Anthropic::Models::ThreadFingerprintMismatchErrorDetails, Anthropic::Models::ThreadUnsupportedRequestErrorDetails, Anthropic::Models::ToolNameConflictErrorDetails, Anthropic::Models::ToolReferenceUnresolvedErrorDetails, Anthropic::Models::UserProfileRequiredErrorDetails, Anthropic::Models::LinkedOrganizationBillingUnavailableErrorDetails, Anthropic::Models::LinkedOrganizationSpendLimitReachedErrorDetails, Anthropic::Models::UserProfileBillingNotAuthorizedErrorDetails, Anthropic::Models::UserProfileNotBillableErrorDetails, Anthropic::Models::ThreadNotFoundErrorDetails, Anthropic::Models::SkillReadBlockedUndecryptableErrorDetails, Anthropic::Models::RequestBodyTooLargeAfterDecodingErrorDetails, Anthropic::Models::ContractSpendLimitReachedErrorDetails, Anthropic::Models::EnforcedSpendLimitReachedErrorDetails, Anthropic::Models::RampLimitExceededErrorDetails, Anthropic::Models::CMEKKeyUnreachableErrorDetails, Anthropic::Models::CompactionUnavailableErrorDetails, Anthropic::Models::StorageQuotaExceededErrorDetails, Anthropic::Models::FileNotDownloadableErrorDetails, Anthropic::Models::FileExpiredErrorDetails, Anthropic::Models::CMEKContextUnavailableErrorDetails, Anthropic::Models::Organization::OrgAPIKeyLimitExceededErrorDetails, Anthropic::Models::Organization::WorkspaceAPIKeyLimitExceededErrorDetails, Anthropic::Models::SandboxEgressRestrictedErrorDetails, Anthropic::Models::UserProfileNotFoundErrorDetails, Anthropic::Models::Organization::ExternalKeyInWorkspacePolicyErrorDetails, Anthropic::Models::Organization::AlreadyMemberErrorDetails, Anthropic::Models::Organization::CannotInviteEmailsWithUnverifiedDomainsErrorDetails, Anthropic::Models::Organization::EmailDomainNotAllowedErrorDetails, Anthropic::Models::Organization::InviteAlreadyExistsErrorDetails, Anthropic::Models::OrgMemberLimitExceededErrorDetails, Anthropic::Models::Organization::RBACGroupGrantsOwnerAccessErrorDetails, Anthropic::Models::Organization::RBACGroupOwnerAccessUnconfirmedErrorDetails, Anthropic::Models::Organization::CannotRemoveLastMemberErrorDetails, Anthropic::Models::ConcurrentMembershipChangeErrorDetails, Anthropic::Models::Organization::ExternalKeyValidationFailedErrorDetails, Anthropic::Models::Organization::ExternalKeyValidationTimedOutErrorDetails, Anthropic::Models::Organization::KeyProfileMismatchErrorDetails, Anthropic::Models::Organization::WorkspacePolicyViolationErrorDetails, Anthropic::Models::Organization::ExternalKeyChangedErrorDetails, Anthropic::Models::Organization::WorkspaceMemberLimitExceededErrorDetails, Anthropic::Models::OrganizationTypeNotSupportedErrorDetails, Anthropic::Models::ParentOrganizationRequiredErrorDetails, Anthropic::Models::RBACRoleNotFoundErrorDetails, Anthropic::Models::Beta::BetaEnvironmentCreateDisabledErrorDetails, Anthropic::Models::Beta::BetaEnvironmentArchivedErrorDetails, Anthropic::Models::Beta::BetaInvalidConfigTypeChangeErrorDetails, Anthropic::Models::Beta::BetaEnvironmentUpdateDisabledErrorDetails, Anthropic::Models::Beta::Environments::BetaHeartbeatPreconditionFailedErrorDetails, Anthropic::Models::Beta::BetaInvalidMetadataErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutPrimaryOwnerErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutSelfErrorDetails, Anthropic::Models::BetaOrganizationNotEnrolledInBetaErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutManagedMemberErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutMembershipAdminErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutOwnerErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutPrivilegedMemberErrorDetails, Anthropic::Models::Beta::Organization::BetaSpendLimitsAdminAPIWritesNotEnabledErrorDetails, Anthropic::Models::BetaUnsupportedCharsetErrorDetails, Anthropic::Models::Beta::Organization::BetaPluginNameTakenErrorDetails, Anthropic::Models::Beta::Organization::BetaSkillNameTakenErrorDetails, Anthropic::Models::Beta::Organization::BetaRegistrationPendingErrorDetails, Anthropic::Models::Beta::Organization::BetaScanFailedErrorDetails, Anthropic::Models::Beta::Organization::BetaScanPendingErrorDetails, Anthropic::Models::BetaRequestBodyTimeoutErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaSettingsDocumentLimitExceededErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaSettingsHistoryLimitExceededErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaCMEKFeatureUnsupportedErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaRBACGroupManagedSettingsNotFoundErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaRBACGroupOrderLimitExceededErrorDetails, Anthropic::Models::Beta::Organization::BetaRBACGroupNotFoundErrorDetails, Anthropic::Models::Beta::Organization::BetaSlackChannelSetUpSettingsRefusedErrorDetails, Anthropic::Models::Beta::Organization::BetaAPIKeyScopeMissingErrorDetails, Anthropic::Models::Beta::Organization::BetaClaudeTagWritesNotEnabledErrorDetails, Anthropic::Models::Beta::Organization::BetaComplianceConfigurationRestrictedErrorDetails, Anthropic::Models::Beta::Organization::BetaOrganizationLevelScopedAPIKeyRequiredErrorDetails, Anthropic::Models::Beta::BetaEnvironmentNotFoundErrorDetails, Anthropic::Models::Beta::Organization::BetaSlackChannelSetUpEnvironmentNotFoundErrorDetails, Anthropic::Models::Beta::Organization::BetaSlackChannelSetUpSettingsConflictErrorDetails, Anthropic::Models::Beta::Organization::BetaBundleAttachmentNotSupportedErrorDetails, Anthropic::Models::Beta::Organization::BetaBundleOnCallErrorDetails]
|
|
484
|
+
# @return [Anthropic::Models::AvailableToolsLimitExceededErrorDetails, Anthropic::Models::ClaudeCodeKeyCreatorNotMemberErrorDetails, Anthropic::Models::ClaudeCodeVersionTooOldErrorDetails, Anthropic::Models::CMEKKeyDisabledErrorDetails, Anthropic::Models::CMEKKeyNetworkBlockedErrorDetails, Anthropic::Models::CompactionBlockAmbiguousErrorDetails, Anthropic::Models::CompactionBlockMisplacedErrorDetails, Anthropic::Models::CompactionContentMismatchErrorDetails, Anthropic::Models::CompactionIncompleteTurnErrorDetails, Anthropic::Models::CompactionNothingToSummarizeErrorDetails, Anthropic::Models::CompactionSignatureInvalidErrorDetails, Anthropic::Models::CompactionTooManyToolReferencesErrorDetails, Anthropic::Models::CompactionToolChangesMismatchErrorDetails, Anthropic::Models::ImageDimensionsTooLargeErrorDetails, Anthropic::Models::OrganizationOnHoldErrorDetails, Anthropic::Models::RequestBodyEncodingInvalidErrorDetails, Anthropic::Models::RequestBodyEncodingUnsupportedErrorDetails, Anthropic::Models::ThreadAlreadyContinuedErrorDetails, Anthropic::Models::ThreadContinueInFlightErrorDetails, Anthropic::Models::ThreadFingerprintMismatchErrorDetails, Anthropic::Models::ThreadUnsupportedRequestErrorDetails, Anthropic::Models::ToolNameConflictErrorDetails, Anthropic::Models::ToolReferenceUnresolvedErrorDetails, Anthropic::Models::UserProfileRequiredErrorDetails, Anthropic::Models::LinkedOrganizationBillingUnavailableErrorDetails, Anthropic::Models::LinkedOrganizationSpendLimitReachedErrorDetails, Anthropic::Models::UserProfileBillingNotAuthorizedErrorDetails, Anthropic::Models::UserProfileNotBillableErrorDetails, Anthropic::Models::ThreadNotFoundErrorDetails, Anthropic::Models::SkillReadBlockedUndecryptableErrorDetails, Anthropic::Models::RequestBodyTooLargeAfterDecodingErrorDetails, Anthropic::Models::ContractSpendLimitReachedErrorDetails, Anthropic::Models::EnforcedSpendLimitReachedErrorDetails, Anthropic::Models::RampLimitExceededErrorDetails, Anthropic::Models::CMEKKeyUnreachableErrorDetails, Anthropic::Models::CompactionUnavailableErrorDetails, Anthropic::Models::StorageQuotaExceededErrorDetails, Anthropic::Models::FileNotDownloadableErrorDetails, Anthropic::Models::FileExpiredErrorDetails, Anthropic::Models::CMEKContextUnavailableErrorDetails, Anthropic::Models::Organization::OrgAPIKeyLimitExceededErrorDetails, Anthropic::Models::Organization::WorkspaceAPIKeyLimitExceededErrorDetails, Anthropic::Models::SandboxEgressRestrictedErrorDetails, Anthropic::Models::UserProfileNotFoundErrorDetails, Anthropic::Models::Organization::ExternalKeyInWorkspacePolicyErrorDetails, Anthropic::Models::Organization::AlreadyMemberErrorDetails, Anthropic::Models::Organization::CannotInviteEmailsWithUnverifiedDomainsErrorDetails, Anthropic::Models::Organization::EmailDomainNotAllowedErrorDetails, Anthropic::Models::Organization::InviteAlreadyExistsErrorDetails, Anthropic::Models::OrgMemberLimitExceededErrorDetails, Anthropic::Models::Organization::RBACGroupGrantsOwnerAccessErrorDetails, Anthropic::Models::Organization::RBACGroupOwnerAccessUnconfirmedErrorDetails, Anthropic::Models::Organization::CannotRemoveLastMemberErrorDetails, Anthropic::Models::ConcurrentMembershipChangeErrorDetails, Anthropic::Models::Organization::ExternalKeyValidationFailedErrorDetails, Anthropic::Models::Organization::ExternalKeyValidationTimedOutErrorDetails, Anthropic::Models::Organization::KeyProfileMismatchErrorDetails, Anthropic::Models::Organization::WorkspacePolicyViolationErrorDetails, Anthropic::Models::Organization::ExternalKeyChangedErrorDetails, Anthropic::Models::Organization::WorkspaceMemberLimitExceededErrorDetails, Anthropic::Models::OrganizationTypeNotSupportedErrorDetails, Anthropic::Models::ParentOrganizationRequiredErrorDetails, Anthropic::Models::RBACRoleNotFoundErrorDetails, Anthropic::Models::Beta::BetaEnvironmentCreateDisabledErrorDetails, Anthropic::Models::Beta::BetaEnvironmentArchivedErrorDetails, Anthropic::Models::Beta::BetaInvalidConfigTypeChangeErrorDetails, Anthropic::Models::Beta::BetaEnvironmentUpdateDisabledErrorDetails, Anthropic::Models::Beta::Environments::BetaHeartbeatPreconditionFailedErrorDetails, Anthropic::Models::Beta::BetaInvalidMetadataErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutPrimaryOwnerErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutSelfErrorDetails, Anthropic::Models::BetaOrganizationNotEnrolledInBetaErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutManagedMemberErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutMembershipAdminErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutOwnerErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutPrivilegedMemberErrorDetails, Anthropic::Models::Beta::Organization::BetaSpendLimitsAdminAPIWritesNotEnabledErrorDetails, Anthropic::Models::BetaUnsupportedCharsetErrorDetails, Anthropic::Models::Beta::Organization::BetaPluginNameTakenErrorDetails, Anthropic::Models::Beta::Organization::BetaSkillNameTakenErrorDetails, Anthropic::Models::Beta::Organization::BetaRegistrationPendingErrorDetails, Anthropic::Models::Beta::Organization::BetaScanFailedErrorDetails, Anthropic::Models::Beta::Organization::BetaScanPendingErrorDetails, Anthropic::Models::BetaRequestBodyTimeoutErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaSettingsDocumentLimitExceededErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaSettingsHistoryLimitExceededErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaCMEKFeatureUnsupportedErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaRBACGroupManagedSettingsNotFoundErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaRBACGroupOrderLimitExceededErrorDetails, Anthropic::Models::Beta::Organization::BetaRBACGroupNotFoundErrorDetails, Anthropic::Models::Beta::Organization::BetaSlackChannelSetUpSettingsRefusedErrorDetails, Anthropic::Models::Beta::Organization::BetaAPIKeyScopeMissingErrorDetails, Anthropic::Models::Beta::Organization::BetaClaudeTagWritesNotEnabledErrorDetails, Anthropic::Models::Beta::Organization::BetaComplianceConfigurationRestrictedErrorDetails, Anthropic::Models::Beta::Organization::BetaOrganizationLevelScopedAPIKeyRequiredErrorDetails, Anthropic::Models::Beta::BetaEnvironmentNotFoundErrorDetails, Anthropic::Models::Beta::Organization::BetaSlackChannelSetUpEnvironmentNotFoundErrorDetails, Anthropic::Models::Beta::Organization::BetaSlackChannelSetUpSettingsConflictErrorDetails, Anthropic::Models::Beta::Organization::BetaBundleAttachmentNotSupportedErrorDetails, Anthropic::Models::Beta::Organization::BetaBundleOnCallErrorDetails]
|
|
477
485
|
def self.new(error_code:, **args)
|
|
478
486
|
case error_code.to_sym
|
|
479
487
|
when :available_tools_limit_exceeded
|
|
@@ -502,6 +510,8 @@ module Anthropic
|
|
|
502
510
|
Anthropic::CompactionTooManyToolReferencesErrorDetails.new(**args)
|
|
503
511
|
when :compaction_tool_changes_mismatch
|
|
504
512
|
Anthropic::CompactionToolChangesMismatchErrorDetails.new(**args)
|
|
513
|
+
when :image_dimensions_too_large
|
|
514
|
+
Anthropic::ImageDimensionsTooLargeErrorDetails.new(**args)
|
|
505
515
|
when :organization_on_hold
|
|
506
516
|
Anthropic::OrganizationOnHoldErrorDetails.new(**args)
|
|
507
517
|
when :request_body_encoding_invalid
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
# The longest side of one or more images in the request exceeds the image size
|
|
6
|
+
# limit. Scale each image in `paths` so that neither side exceeds
|
|
7
|
+
# `max_side_length_pixels`, or remove it, then retry.
|
|
8
|
+
class ImageDimensionsTooLargeError < Anthropic::Errors::BadRequestError
|
|
9
|
+
# @!method error_code
|
|
10
|
+
# @return [Symbol, :image_dimensions_too_large]
|
|
11
|
+
|
|
12
|
+
# @return [Anthropic::Models::ImageDimensionsTooLargeErrorDetails]
|
|
13
|
+
def details
|
|
14
|
+
Anthropic::Internal::Type::Converter.coerce(
|
|
15
|
+
Anthropic::ImageDimensionsTooLargeErrorDetails,
|
|
16
|
+
Anthropic::Internal::Util.dig(body, [:error, :details])
|
|
17
|
+
)
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
class ImageDimensionsTooLargeErrorDetails < Anthropic::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute error_code
|
|
7
|
+
#
|
|
8
|
+
# @return [Symbol, :image_dimensions_too_large]
|
|
9
|
+
required :error_code, const: :image_dimensions_too_large
|
|
10
|
+
|
|
11
|
+
# @!attribute max_side_length_pixels
|
|
12
|
+
# The limit the images exceeded: the largest width or height, in pixels, that an
|
|
13
|
+
# image on this request may have.
|
|
14
|
+
#
|
|
15
|
+
# @return [Integer]
|
|
16
|
+
required :max_side_length_pixels, Integer
|
|
17
|
+
|
|
18
|
+
# @!attribute paths
|
|
19
|
+
# The position of every image over the limit, in the order you sent them, nested
|
|
20
|
+
# blocks included, such as `messages.0.content.1`, or
|
|
21
|
+
# `messages.0.content.1.content.0` for an image in a `tool_result` block.
|
|
22
|
+
#
|
|
23
|
+
# @return [Array<String>]
|
|
24
|
+
required :paths, Anthropic::Internal::Type::ArrayOf[String]
|
|
25
|
+
|
|
26
|
+
# @!method initialize(max_side_length_pixels:, paths:, error_code: :image_dimensions_too_large)
|
|
27
|
+
# The longest side of one or more images in the request exceeds the image size
|
|
28
|
+
# limit. Scale each image in `paths` so that neither side exceeds
|
|
29
|
+
# `max_side_length_pixels`, or remove it, then retry.
|
|
30
|
+
#
|
|
31
|
+
# Some parameter documentations has been truncated, see
|
|
32
|
+
# {Anthropic::Models::ImageDimensionsTooLargeErrorDetails} for more details.
|
|
33
|
+
#
|
|
34
|
+
# @param max_side_length_pixels [Integer] The limit the images exceeded: the largest width or height, in pixels, that an i
|
|
35
|
+
#
|
|
36
|
+
# @param paths [Array<String>] The position of every image over the limit, in the order you sent them, nested b
|
|
37
|
+
#
|
|
38
|
+
# @param error_code [Symbol, :image_dimensions_too_large]
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module Anthropic
|
|
4
4
|
module Models
|
|
5
|
-
# The customer that the
|
|
5
|
+
# The customer that the request's user profile represents has not authorized the
|
|
6
6
|
# caller to bill them, or the authorization that the request's credential uses has
|
|
7
7
|
# ended. The response does not say which applies.
|
|
8
8
|
class UserProfileBillingNotAuthorizedError < Anthropic::Errors::PermissionDeniedError
|
|
@@ -9,7 +9,7 @@ module Anthropic
|
|
|
9
9
|
required :error_code, const: :user_profile_billing_not_authorized
|
|
10
10
|
|
|
11
11
|
# @!method initialize(error_code: :user_profile_billing_not_authorized)
|
|
12
|
-
# The customer that the
|
|
12
|
+
# The customer that the request's user profile represents has not authorized the
|
|
13
13
|
# caller to bill them, or the authorization that the request's credential uses has
|
|
14
14
|
# ended. The response does not say which applies.
|
|
15
15
|
#
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Anthropic
|
|
4
4
|
module Models
|
|
5
|
-
# The
|
|
6
|
-
#
|
|
5
|
+
# The request's user profile cannot be billed. The response gives no more specific
|
|
6
|
+
# error code and does not say what the reason is.
|
|
7
7
|
class UserProfileNotBillableError < Anthropic::Errors::PermissionDeniedError
|
|
8
8
|
# @!method error_code
|
|
9
9
|
# @return [Symbol, :user_profile_not_billable]
|
|
@@ -9,8 +9,8 @@ module Anthropic
|
|
|
9
9
|
required :error_code, const: :user_profile_not_billable
|
|
10
10
|
|
|
11
11
|
# @!method initialize(error_code: :user_profile_not_billable)
|
|
12
|
-
# The
|
|
13
|
-
#
|
|
12
|
+
# The request's user profile cannot be billed. The response gives no more specific
|
|
13
|
+
# error code and does not say what the reason is.
|
|
14
14
|
#
|
|
15
15
|
# @param error_code [Symbol, :user_profile_not_billable]
|
|
16
16
|
end
|
data/lib/anthropic/models.rb
CHANGED
|
@@ -701,6 +701,10 @@ module Anthropic
|
|
|
701
701
|
|
|
702
702
|
ImageBlockParam = Anthropic::Models::ImageBlockParam
|
|
703
703
|
|
|
704
|
+
ImageDimensionsTooLargeError = Anthropic::Models::ImageDimensionsTooLargeError
|
|
705
|
+
|
|
706
|
+
ImageDimensionsTooLargeErrorDetails = Anthropic::Models::ImageDimensionsTooLargeErrorDetails
|
|
707
|
+
|
|
704
708
|
ImageTransformationsParam = Anthropic::Models::ImageTransformationsParam
|
|
705
709
|
|
|
706
710
|
InputJSONDelta = Anthropic::Models::InputJSONDelta
|
|
@@ -147,6 +147,7 @@ module Anthropic
|
|
|
147
147
|
# @raise [Anthropic::Models::CompactionSignatureInvalidError]
|
|
148
148
|
# @raise [Anthropic::Models::CompactionTooManyToolReferencesError]
|
|
149
149
|
# @raise [Anthropic::Models::CompactionToolChangesMismatchError]
|
|
150
|
+
# @raise [Anthropic::Models::ImageDimensionsTooLargeError]
|
|
150
151
|
# @raise [Anthropic::Models::OrganizationOnHoldError]
|
|
151
152
|
# @raise [Anthropic::Models::RequestBodyEncodingInvalidError]
|
|
152
153
|
# @raise [Anthropic::Models::RequestBodyEncodingUnsupportedError]
|
|
@@ -305,6 +306,7 @@ module Anthropic
|
|
|
305
306
|
# @raise [Anthropic::Models::CompactionSignatureInvalidError]
|
|
306
307
|
# @raise [Anthropic::Models::CompactionTooManyToolReferencesError]
|
|
307
308
|
# @raise [Anthropic::Models::CompactionToolChangesMismatchError]
|
|
309
|
+
# @raise [Anthropic::Models::ImageDimensionsTooLargeError]
|
|
308
310
|
# @raise [Anthropic::Models::OrganizationOnHoldError]
|
|
309
311
|
# @raise [Anthropic::Models::RequestBodyEncodingInvalidError]
|
|
310
312
|
# @raise [Anthropic::Models::RequestBodyEncodingUnsupportedError]
|
|
@@ -536,6 +538,7 @@ module Anthropic
|
|
|
536
538
|
# @raise [Anthropic::Models::CompactionSignatureInvalidError]
|
|
537
539
|
# @raise [Anthropic::Models::CompactionTooManyToolReferencesError]
|
|
538
540
|
# @raise [Anthropic::Models::CompactionToolChangesMismatchError]
|
|
541
|
+
# @raise [Anthropic::Models::ImageDimensionsTooLargeError]
|
|
539
542
|
# @raise [Anthropic::Models::OrganizationOnHoldError]
|
|
540
543
|
# @raise [Anthropic::Models::RequestBodyEncodingInvalidError]
|
|
541
544
|
# @raise [Anthropic::Models::RequestBodyEncodingUnsupportedError]
|
|
@@ -75,6 +75,7 @@ module Anthropic
|
|
|
75
75
|
# @raise [Anthropic::Models::CompactionSignatureInvalidError]
|
|
76
76
|
# @raise [Anthropic::Models::CompactionTooManyToolReferencesError]
|
|
77
77
|
# @raise [Anthropic::Models::CompactionToolChangesMismatchError]
|
|
78
|
+
# @raise [Anthropic::Models::ImageDimensionsTooLargeError]
|
|
78
79
|
# @raise [Anthropic::Models::OrganizationOnHoldError]
|
|
79
80
|
# @raise [Anthropic::Models::RequestBodyEncodingInvalidError]
|
|
80
81
|
# @raise [Anthropic::Models::RequestBodyEncodingUnsupportedError]
|
|
@@ -207,6 +208,7 @@ module Anthropic
|
|
|
207
208
|
# @raise [Anthropic::Models::CompactionSignatureInvalidError]
|
|
208
209
|
# @raise [Anthropic::Models::CompactionTooManyToolReferencesError]
|
|
209
210
|
# @raise [Anthropic::Models::CompactionToolChangesMismatchError]
|
|
211
|
+
# @raise [Anthropic::Models::ImageDimensionsTooLargeError]
|
|
210
212
|
# @raise [Anthropic::Models::OrganizationOnHoldError]
|
|
211
213
|
# @raise [Anthropic::Models::RequestBodyEncodingInvalidError]
|
|
212
214
|
# @raise [Anthropic::Models::RequestBodyEncodingUnsupportedError]
|
|
@@ -392,6 +394,7 @@ module Anthropic
|
|
|
392
394
|
# @raise [Anthropic::Models::CompactionSignatureInvalidError]
|
|
393
395
|
# @raise [Anthropic::Models::CompactionTooManyToolReferencesError]
|
|
394
396
|
# @raise [Anthropic::Models::CompactionToolChangesMismatchError]
|
|
397
|
+
# @raise [Anthropic::Models::ImageDimensionsTooLargeError]
|
|
395
398
|
# @raise [Anthropic::Models::OrganizationOnHoldError]
|
|
396
399
|
# @raise [Anthropic::Models::RequestBodyEncodingInvalidError]
|
|
397
400
|
# @raise [Anthropic::Models::RequestBodyEncodingUnsupportedError]
|
data/lib/anthropic/version.rb
CHANGED
data/lib/anthropic.rb
CHANGED
|
@@ -168,6 +168,7 @@ require_relative "anthropic/models/contract_spend_limit_reached_error"
|
|
|
168
168
|
require_relative "anthropic/models/enforced_spend_limit_reached_error"
|
|
169
169
|
require_relative "anthropic/models/file_expired_error"
|
|
170
170
|
require_relative "anthropic/models/file_not_downloadable_error"
|
|
171
|
+
require_relative "anthropic/models/image_dimensions_too_large_error"
|
|
171
172
|
require_relative "anthropic/models/linked_organization_billing_unavailable_error"
|
|
172
173
|
require_relative "anthropic/models/linked_organization_spend_limit_reached_error"
|
|
173
174
|
require_relative "anthropic/models/organization/already_member_error"
|
|
@@ -2146,6 +2147,7 @@ require_relative "anthropic/models/file_retrieve_metadata_params"
|
|
|
2146
2147
|
require_relative "anthropic/models/file_upload_params"
|
|
2147
2148
|
require_relative "anthropic/models/gateway_timeout_error"
|
|
2148
2149
|
require_relative "anthropic/models/image_block_param"
|
|
2150
|
+
require_relative "anthropic/models/image_dimensions_too_large_error_details"
|
|
2149
2151
|
require_relative "anthropic/models/image_transformations_param"
|
|
2150
2152
|
require_relative "anthropic/models/input_json_delta"
|
|
2151
2153
|
require_relative "anthropic/models/invalid_request_error"
|
|
@@ -126,6 +126,12 @@ module Anthropic
|
|
|
126
126
|
# to the profile, or has not allowed your organization to bill it, the request is
|
|
127
127
|
# rejected rather than billed to you. Omit the field, or send `"bill_to": "self"`
|
|
128
128
|
# (the default), to be billed as usual.
|
|
129
|
+
#
|
|
130
|
+
# Message Batches does not currently support billing the customer behind a user
|
|
131
|
+
# profile. In a batch, omit the field or send `"bill_to": "self"`. A request in a
|
|
132
|
+
# batch that sets `"bill_to": "user_profile"` gets an `errored` result with an
|
|
133
|
+
# `invalid_request_error`, nobody is billed for it, and the batch's other requests
|
|
134
|
+
# run as usual.
|
|
129
135
|
sig { returns(T.nilable(Anthropic::Beta::BetaBillingPolicy)) }
|
|
130
136
|
attr_reader :billing_policy
|
|
131
137
|
|
|
@@ -866,6 +872,12 @@ module Anthropic
|
|
|
866
872
|
# to the profile, or has not allowed your organization to bill it, the request is
|
|
867
873
|
# rejected rather than billed to you. Omit the field, or send `"bill_to": "self"`
|
|
868
874
|
# (the default), to be billed as usual.
|
|
875
|
+
#
|
|
876
|
+
# Message Batches does not currently support billing the customer behind a user
|
|
877
|
+
# profile. In a batch, omit the field or send `"bill_to": "self"`. A request in a
|
|
878
|
+
# batch that sets `"bill_to": "user_profile"` gets an `errored` result with an
|
|
879
|
+
# `invalid_request_error`, nobody is billed for it, and the batch's other requests
|
|
880
|
+
# run as usual.
|
|
869
881
|
billing_policy: nil,
|
|
870
882
|
# Top-level cache control automatically applies a cache_control marker to the last
|
|
871
883
|
# cacheable block in the request.
|
|
@@ -307,6 +307,12 @@ module Anthropic
|
|
|
307
307
|
# to the profile, or has not allowed your organization to bill it, the request is
|
|
308
308
|
# rejected rather than billed to you. Omit the field, or send `"bill_to": "self"`
|
|
309
309
|
# (the default), to be billed as usual.
|
|
310
|
+
#
|
|
311
|
+
# Message Batches does not currently support billing the customer behind a user
|
|
312
|
+
# profile. In a batch, omit the field or send `"bill_to": "self"`. A request in a
|
|
313
|
+
# batch that sets `"bill_to": "user_profile"` gets an `errored` result with an
|
|
314
|
+
# `invalid_request_error`, nobody is billed for it, and the batch's other requests
|
|
315
|
+
# run as usual.
|
|
310
316
|
sig { returns(T.nilable(Anthropic::Beta::BetaBillingPolicy)) }
|
|
311
317
|
attr_reader :billing_policy
|
|
312
318
|
|
|
@@ -1054,6 +1060,12 @@ module Anthropic
|
|
|
1054
1060
|
# to the profile, or has not allowed your organization to bill it, the request is
|
|
1055
1061
|
# rejected rather than billed to you. Omit the field, or send `"bill_to": "self"`
|
|
1056
1062
|
# (the default), to be billed as usual.
|
|
1063
|
+
#
|
|
1064
|
+
# Message Batches does not currently support billing the customer behind a user
|
|
1065
|
+
# profile. In a batch, omit the field or send `"bill_to": "self"`. A request in a
|
|
1066
|
+
# batch that sets `"bill_to": "user_profile"` gets an `errored` result with an
|
|
1067
|
+
# `invalid_request_error`, nobody is billed for it, and the batch's other requests
|
|
1068
|
+
# run as usual.
|
|
1057
1069
|
billing_policy: nil,
|
|
1058
1070
|
# Top-level cache control automatically applies a cache_control marker to the last
|
|
1059
1071
|
# cacheable block in the request.
|
|
@@ -21,6 +21,7 @@ module Anthropic
|
|
|
21
21
|
Anthropic::CompactionSignatureInvalidErrorDetails,
|
|
22
22
|
Anthropic::CompactionTooManyToolReferencesErrorDetails,
|
|
23
23
|
Anthropic::CompactionToolChangesMismatchErrorDetails,
|
|
24
|
+
Anthropic::ImageDimensionsTooLargeErrorDetails,
|
|
24
25
|
Anthropic::OrganizationOnHoldErrorDetails,
|
|
25
26
|
Anthropic::RequestBodyEncodingInvalidErrorDetails,
|
|
26
27
|
Anthropic::RequestBodyEncodingUnsupportedErrorDetails,
|
|
@@ -182,6 +183,11 @@ module Anthropic
|
|
|
182
183
|
:compaction_tool_changes_mismatch,
|
|
183
184
|
Anthropic::ErrorDetails::ErrorCode::TaggedSymbol
|
|
184
185
|
)
|
|
186
|
+
IMAGE_DIMENSIONS_TOO_LARGE =
|
|
187
|
+
T.let(
|
|
188
|
+
:image_dimensions_too_large,
|
|
189
|
+
Anthropic::ErrorDetails::ErrorCode::TaggedSymbol
|
|
190
|
+
)
|
|
185
191
|
ORGANIZATION_ON_HOLD =
|
|
186
192
|
T.let(
|
|
187
193
|
:organization_on_hold,
|
|
@@ -622,6 +628,8 @@ module Anthropic
|
|
|
622
628
|
sig do
|
|
623
629
|
params(
|
|
624
630
|
error_code: Anthropic::ErrorDetails::ErrorCode::OrSymbol,
|
|
631
|
+
max_side_length_pixels: Integer,
|
|
632
|
+
paths: T::Array[String],
|
|
625
633
|
appeal_url: T.nilable(String),
|
|
626
634
|
unsupported:
|
|
627
635
|
T.nilable(
|
|
@@ -638,6 +646,13 @@ module Anthropic
|
|
|
638
646
|
end
|
|
639
647
|
def self.new(
|
|
640
648
|
error_code:,
|
|
649
|
+
# The limit the images exceeded: the largest width or height, in pixels, that an
|
|
650
|
+
# image on this request may have.
|
|
651
|
+
max_side_length_pixels: nil,
|
|
652
|
+
# The position of every image over the limit, in the order you sent them, nested
|
|
653
|
+
# blocks included, such as `messages.0.content.1`, or
|
|
654
|
+
# `messages.0.content.1.content.0` for an image in a `tool_result` block.
|
|
655
|
+
paths: nil,
|
|
641
656
|
appeal_url: nil,
|
|
642
657
|
# Each entry names a request field or an organization setting that Threads do not
|
|
643
658
|
# support. On a value you do not recognize, send the full conversation without
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
# The longest side of one or more images in the request exceeds the image size
|
|
6
|
+
# limit. Scale each image in `paths` so that neither side exceeds
|
|
7
|
+
# `max_side_length_pixels`, or remove it, then retry.
|
|
8
|
+
class ImageDimensionsTooLargeError < Anthropic::Errors::BadRequestError
|
|
9
|
+
sig { returns(Symbol) }
|
|
10
|
+
def error_code
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
sig { returns(Anthropic::ImageDimensionsTooLargeErrorDetails) }
|
|
14
|
+
def details
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
class ImageDimensionsTooLargeErrorDetails < Anthropic::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Anthropic::ImageDimensionsTooLargeErrorDetails,
|
|
10
|
+
Anthropic::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(Symbol) }
|
|
15
|
+
attr_accessor :error_code
|
|
16
|
+
|
|
17
|
+
# The limit the images exceeded: the largest width or height, in pixels, that an
|
|
18
|
+
# image on this request may have.
|
|
19
|
+
sig { returns(Integer) }
|
|
20
|
+
attr_accessor :max_side_length_pixels
|
|
21
|
+
|
|
22
|
+
# The position of every image over the limit, in the order you sent them, nested
|
|
23
|
+
# blocks included, such as `messages.0.content.1`, or
|
|
24
|
+
# `messages.0.content.1.content.0` for an image in a `tool_result` block.
|
|
25
|
+
sig { returns(T::Array[String]) }
|
|
26
|
+
attr_accessor :paths
|
|
27
|
+
|
|
28
|
+
# The longest side of one or more images in the request exceeds the image size
|
|
29
|
+
# limit. Scale each image in `paths` so that neither side exceeds
|
|
30
|
+
# `max_side_length_pixels`, or remove it, then retry.
|
|
31
|
+
sig do
|
|
32
|
+
params(
|
|
33
|
+
max_side_length_pixels: Integer,
|
|
34
|
+
paths: T::Array[String],
|
|
35
|
+
error_code: Symbol
|
|
36
|
+
).returns(T.attached_class)
|
|
37
|
+
end
|
|
38
|
+
def self.new(
|
|
39
|
+
# The limit the images exceeded: the largest width or height, in pixels, that an
|
|
40
|
+
# image on this request may have.
|
|
41
|
+
max_side_length_pixels:,
|
|
42
|
+
# The position of every image over the limit, in the order you sent them, nested
|
|
43
|
+
# blocks included, such as `messages.0.content.1`, or
|
|
44
|
+
# `messages.0.content.1.content.0` for an image in a `tool_result` block.
|
|
45
|
+
paths:,
|
|
46
|
+
error_code: :image_dimensions_too_large
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
sig do
|
|
51
|
+
override.returns(
|
|
52
|
+
{
|
|
53
|
+
error_code: Symbol,
|
|
54
|
+
max_side_length_pixels: Integer,
|
|
55
|
+
paths: T::Array[String]
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
def to_hash
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module Anthropic
|
|
4
4
|
module Models
|
|
5
|
-
# The customer that the
|
|
5
|
+
# The customer that the request's user profile represents has not authorized the
|
|
6
6
|
# caller to bill them, or the authorization that the request's credential uses has
|
|
7
7
|
# ended. The response does not say which applies.
|
|
8
8
|
class UserProfileBillingNotAuthorizedError < Anthropic::Errors::PermissionDeniedError
|
|
@@ -14,7 +14,7 @@ module Anthropic
|
|
|
14
14
|
sig { returns(Symbol) }
|
|
15
15
|
attr_accessor :error_code
|
|
16
16
|
|
|
17
|
-
# The customer that the
|
|
17
|
+
# The customer that the request's user profile represents has not authorized the
|
|
18
18
|
# caller to bill them, or the authorization that the request's credential uses has
|
|
19
19
|
# ended. The response does not say which applies.
|
|
20
20
|
sig { params(error_code: Symbol).returns(T.attached_class) }
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Anthropic
|
|
4
4
|
module Models
|
|
5
|
-
# The
|
|
6
|
-
#
|
|
5
|
+
# The request's user profile cannot be billed. The response gives no more specific
|
|
6
|
+
# error code and does not say what the reason is.
|
|
7
7
|
class UserProfileNotBillableError < Anthropic::Errors::PermissionDeniedError
|
|
8
8
|
sig { returns(Symbol) }
|
|
9
9
|
def error_code
|
|
@@ -14,8 +14,8 @@ module Anthropic
|
|
|
14
14
|
sig { returns(Symbol) }
|
|
15
15
|
attr_accessor :error_code
|
|
16
16
|
|
|
17
|
-
# The
|
|
18
|
-
#
|
|
17
|
+
# The request's user profile cannot be billed. The response gives no more specific
|
|
18
|
+
# error code and does not say what the reason is.
|
|
19
19
|
sig { params(error_code: Symbol).returns(T.attached_class) }
|
|
20
20
|
def self.new(error_code: :user_profile_not_billable)
|
|
21
21
|
end
|
data/rbi/anthropic/models.rbi
CHANGED
|
@@ -751,6 +751,11 @@ module Anthropic
|
|
|
751
751
|
|
|
752
752
|
ImageBlockParam = Anthropic::Models::ImageBlockParam
|
|
753
753
|
|
|
754
|
+
ImageDimensionsTooLargeError = Anthropic::Models::ImageDimensionsTooLargeError
|
|
755
|
+
|
|
756
|
+
ImageDimensionsTooLargeErrorDetails =
|
|
757
|
+
Anthropic::Models::ImageDimensionsTooLargeErrorDetails
|
|
758
|
+
|
|
754
759
|
ImageTransformationsParam = Anthropic::Models::ImageTransformationsParam
|
|
755
760
|
|
|
756
761
|
InputJSONDelta = Anthropic::Models::InputJSONDelta
|
|
@@ -668,6 +668,12 @@ module Anthropic
|
|
|
668
668
|
# to the profile, or has not allowed your organization to bill it, the request is
|
|
669
669
|
# rejected rather than billed to you. Omit the field, or send `"bill_to": "self"`
|
|
670
670
|
# (the default), to be billed as usual.
|
|
671
|
+
#
|
|
672
|
+
# Message Batches does not currently support billing the customer behind a user
|
|
673
|
+
# profile. In a batch, omit the field or send `"bill_to": "self"`. A request in a
|
|
674
|
+
# batch that sets `"bill_to": "user_profile"` gets an `errored` result with an
|
|
675
|
+
# `invalid_request_error`, nobody is billed for it, and the batch's other requests
|
|
676
|
+
# run as usual.
|
|
671
677
|
billing_policy: nil,
|
|
672
678
|
# Body param: Top-level cache control automatically applies a cache_control marker
|
|
673
679
|
# to the last cacheable block in the request.
|
|
@@ -1113,6 +1119,12 @@ module Anthropic
|
|
|
1113
1119
|
# to the profile, or has not allowed your organization to bill it, the request is
|
|
1114
1120
|
# rejected rather than billed to you. Omit the field, or send `"bill_to": "self"`
|
|
1115
1121
|
# (the default), to be billed as usual.
|
|
1122
|
+
#
|
|
1123
|
+
# Message Batches does not currently support billing the customer behind a user
|
|
1124
|
+
# profile. In a batch, omit the field or send `"bill_to": "self"`. A request in a
|
|
1125
|
+
# batch that sets `"bill_to": "user_profile"` gets an `errored` result with an
|
|
1126
|
+
# `invalid_request_error`, nobody is billed for it, and the batch's other requests
|
|
1127
|
+
# run as usual.
|
|
1116
1128
|
billing_policy: nil,
|
|
1117
1129
|
# Body param: Top-level cache control automatically applies a cache_control marker
|
|
1118
1130
|
# to the last cacheable block in the request.
|
|
@@ -1868,6 +1880,12 @@ module Anthropic
|
|
|
1868
1880
|
# to the profile, or has not allowed your organization to bill it, the request is
|
|
1869
1881
|
# rejected rather than billed to you. Omit the field, or send `"bill_to": "self"`
|
|
1870
1882
|
# (the default), to be billed as usual.
|
|
1883
|
+
#
|
|
1884
|
+
# Message Batches does not currently support billing the customer behind a user
|
|
1885
|
+
# profile. In a batch, omit the field or send `"bill_to": "self"`. A request in a
|
|
1886
|
+
# batch that sets `"bill_to": "user_profile"` gets an `errored` result with an
|
|
1887
|
+
# `invalid_request_error`, nobody is billed for it, and the batch's other requests
|
|
1888
|
+
# run as usual.
|
|
1871
1889
|
billing_policy: nil,
|
|
1872
1890
|
# Body param: Top-level cache control automatically applies a cache_control marker
|
|
1873
1891
|
# to the last cacheable block in the request.
|
|
@@ -14,6 +14,7 @@ module Anthropic
|
|
|
14
14
|
| Anthropic::CompactionSignatureInvalidErrorDetails
|
|
15
15
|
| Anthropic::CompactionTooManyToolReferencesErrorDetails
|
|
16
16
|
| Anthropic::CompactionToolChangesMismatchErrorDetails
|
|
17
|
+
| Anthropic::ImageDimensionsTooLargeErrorDetails
|
|
17
18
|
| Anthropic::OrganizationOnHoldErrorDetails
|
|
18
19
|
| Anthropic::RequestBodyEncodingInvalidErrorDetails
|
|
19
20
|
| Anthropic::RequestBodyEncodingUnsupportedErrorDetails
|
|
@@ -118,6 +119,7 @@ module Anthropic
|
|
|
118
119
|
| :compaction_signature_invalid
|
|
119
120
|
| :compaction_too_many_tool_references
|
|
120
121
|
| :compaction_tool_changes_mismatch
|
|
122
|
+
| :image_dimensions_too_large
|
|
121
123
|
| :organization_on_hold
|
|
122
124
|
| :request_body_encoding_invalid
|
|
123
125
|
| :request_body_encoding_unsupported
|
|
@@ -221,6 +223,7 @@ module Anthropic
|
|
|
221
223
|
COMPACTION_SIGNATURE_INVALID: :compaction_signature_invalid
|
|
222
224
|
COMPACTION_TOO_MANY_TOOL_REFERENCES: :compaction_too_many_tool_references
|
|
223
225
|
COMPACTION_TOOL_CHANGES_MISMATCH: :compaction_tool_changes_mismatch
|
|
226
|
+
IMAGE_DIMENSIONS_TOO_LARGE: :image_dimensions_too_large
|
|
224
227
|
ORGANIZATION_ON_HOLD: :organization_on_hold
|
|
225
228
|
REQUEST_BODY_ENCODING_INVALID: :request_body_encoding_invalid
|
|
226
229
|
REQUEST_BODY_ENCODING_UNSUPPORTED: :request_body_encoding_unsupported
|
|
@@ -361,6 +364,12 @@ module Anthropic
|
|
|
361
364
|
error_code: :compaction_tool_changes_mismatch
|
|
362
365
|
| "compaction_tool_changes_mismatch"
|
|
363
366
|
) -> Anthropic::CompactionToolChangesMismatchErrorDetails
|
|
367
|
+
| (
|
|
368
|
+
error_code: :image_dimensions_too_large
|
|
369
|
+
| "image_dimensions_too_large",
|
|
370
|
+
max_side_length_pixels: Integer,
|
|
371
|
+
paths: ::Array[String]
|
|
372
|
+
) -> Anthropic::ImageDimensionsTooLargeErrorDetails
|
|
364
373
|
| (
|
|
365
374
|
error_code: :organization_on_hold | "organization_on_hold",
|
|
366
375
|
?appeal_url: String?
|
|
@@ -677,6 +686,8 @@ module Anthropic
|
|
|
677
686
|
) -> Anthropic::Beta::Organization::BetaBundleOnCallErrorDetails
|
|
678
687
|
| (
|
|
679
688
|
error_code: Anthropic::Models::ErrorDetails::error_code | String,
|
|
689
|
+
?max_side_length_pixels: Integer,
|
|
690
|
+
?paths: ::Array[String],
|
|
680
691
|
?appeal_url: String?,
|
|
681
692
|
?unsupported: ::Array[Anthropic::Models::thread_unsupported_feature_name]?,
|
|
682
693
|
?field: Anthropic::Models::Organization::workspace_policy_field,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module Anthropic
|
|
2
|
+
module Models
|
|
3
|
+
type image_dimensions_too_large_error_details =
|
|
4
|
+
{
|
|
5
|
+
error_code: :image_dimensions_too_large,
|
|
6
|
+
max_side_length_pixels: Integer,
|
|
7
|
+
paths: ::Array[String]
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
class ImageDimensionsTooLargeErrorDetails < Anthropic::Internal::Type::BaseModel
|
|
11
|
+
attr_accessor error_code: :image_dimensions_too_large
|
|
12
|
+
|
|
13
|
+
attr_accessor max_side_length_pixels: Integer
|
|
14
|
+
|
|
15
|
+
attr_accessor paths: ::Array[String]
|
|
16
|
+
|
|
17
|
+
def initialize: (
|
|
18
|
+
max_side_length_pixels: Integer,
|
|
19
|
+
paths: ::Array[String],
|
|
20
|
+
?error_code: :image_dimensions_too_large
|
|
21
|
+
) -> void
|
|
22
|
+
|
|
23
|
+
def to_hash: -> {
|
|
24
|
+
error_code: :image_dimensions_too_large,
|
|
25
|
+
max_side_length_pixels: Integer,
|
|
26
|
+
paths: ::Array[String]
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
data/sig/anthropic/models.rbs
CHANGED
|
@@ -659,6 +659,10 @@ module Anthropic
|
|
|
659
659
|
|
|
660
660
|
class ImageBlockParam = Anthropic::Models::ImageBlockParam
|
|
661
661
|
|
|
662
|
+
class ImageDimensionsTooLargeError = Anthropic::Models::ImageDimensionsTooLargeError
|
|
663
|
+
|
|
664
|
+
class ImageDimensionsTooLargeErrorDetails = Anthropic::Models::ImageDimensionsTooLargeErrorDetails
|
|
665
|
+
|
|
662
666
|
class ImageTransformationsParam = Anthropic::Models::ImageTransformationsParam
|
|
663
667
|
|
|
664
668
|
class InputJSONDelta = Anthropic::Models::InputJSONDelta
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: anthropic
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.12.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Anthropic
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: base64
|
|
@@ -2163,6 +2163,8 @@ files:
|
|
|
2163
2163
|
- lib/anthropic/models/gateway_timeout_error.rb
|
|
2164
2164
|
- lib/anthropic/models/gateway_timeout_error_object.rb
|
|
2165
2165
|
- lib/anthropic/models/image_block_param.rb
|
|
2166
|
+
- lib/anthropic/models/image_dimensions_too_large_error.rb
|
|
2167
|
+
- lib/anthropic/models/image_dimensions_too_large_error_details.rb
|
|
2166
2168
|
- lib/anthropic/models/image_transformations_param.rb
|
|
2167
2169
|
- lib/anthropic/models/input_json_delta.rb
|
|
2168
2170
|
- lib/anthropic/models/invalid_request_error.rb
|
|
@@ -4855,6 +4857,8 @@ files:
|
|
|
4855
4857
|
- rbi/anthropic/models/gateway_timeout_error.rbi
|
|
4856
4858
|
- rbi/anthropic/models/gateway_timeout_error_object.rbi
|
|
4857
4859
|
- rbi/anthropic/models/image_block_param.rbi
|
|
4860
|
+
- rbi/anthropic/models/image_dimensions_too_large_error.rbi
|
|
4861
|
+
- rbi/anthropic/models/image_dimensions_too_large_error_details.rbi
|
|
4858
4862
|
- rbi/anthropic/models/image_transformations_param.rbi
|
|
4859
4863
|
- rbi/anthropic/models/input_json_delta.rbi
|
|
4860
4864
|
- rbi/anthropic/models/invalid_request_error.rbi
|
|
@@ -7532,6 +7536,8 @@ files:
|
|
|
7532
7536
|
- sig/anthropic/models/gateway_timeout_error.rbs
|
|
7533
7537
|
- sig/anthropic/models/gateway_timeout_error_object.rbs
|
|
7534
7538
|
- sig/anthropic/models/image_block_param.rbs
|
|
7539
|
+
- sig/anthropic/models/image_dimensions_too_large_error.rbs
|
|
7540
|
+
- sig/anthropic/models/image_dimensions_too_large_error_details.rbs
|
|
7535
7541
|
- sig/anthropic/models/image_transformations_param.rbs
|
|
7536
7542
|
- sig/anthropic/models/input_json_delta.rbs
|
|
7537
7543
|
- sig/anthropic/models/invalid_request_error.rbs
|