Class: Anthropic::Models::Beta::Sessions::BetaManagedAgentsToolUseLimitReachedErrorObject

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/sessions/beta_managed_agents_tool_use_limit_reached_error_object.rb,
sig/anthropic/models/beta/sessions/beta_managed_agents_tool_use_limit_reached_error_object.rbs

Defined Under Namespace

Modules: RetryStatus

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(message:, retry_status:, type: :tool_use_limit_reached_error) ⇒ BetaManagedAgentsToolUseLimitReachedErrorObject

The turn stopped at one of two limits on tool use, not because a request failed. One limit is on tool-use rounds (one model response that calls tools, plus running those tools, is one round). The other is on model responses in a row that each request a single tool call and are cut off by the model's output or context limit before the call is complete. None of those calls runs. message states the limit that applied. The thread goes idle with stop_reason: retries_exhausted (a child thread then terminates); the next user.message starts a new turn.

Parameters:



# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_tool_use_limit_reached_error_object.rb', line 26


Instance Attribute Details

#message ⇒ String

Human-readable error description.

Parameters:

  • value (String)

Returns:

  • (String)


12
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_tool_use_limit_reached_error_object.rb', line 12

required :message, String

#retry_status ⇒ Anthropic::Models::Beta::Sessions::BetaManagedAgentsRetryStatusRetrying, ...

What the client should do next.



18
19
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_tool_use_limit_reached_error_object.rb', line 18

required :retry_status,
union: -> { Anthropic::Beta::Sessions::BetaManagedAgentsToolUseLimitReachedErrorObject::RetryStatus }

#type ⇒ Symbol, :tool_use_limit_reached_error

Parameters:

  • value (:tool_use_limit_reached_error)

Returns:

  • (Symbol, :tool_use_limit_reached_error)


24
# File 'lib/anthropic/models/beta/sessions/beta_managed_agents_tool_use_limit_reached_error_object.rb', line 24

required :type, const: :tool_use_limit_reached_error

Instance Method Details

#to_hash ⇒ { message: String, retry_status: Anthropic::Models::Beta::Sessions::BetaManagedAgentsToolUseLimitReachedErrorObject::retry_status, type: :tool_use_limit_reached_error }

Returns:

  • ({ message: String, retry_status: Anthropic::Models::Beta::Sessions::BetaManagedAgentsToolUseLimitReachedErrorObject::retry_status, type: :tool_use_limit_reached_error })


25
26
27
28
29
# File 'sig/anthropic/models/beta/sessions/beta_managed_agents_tool_use_limit_reached_error_object.rbs', line 25

def to_hash: -> {
  message: String,
  retry_status: Anthropic::Models::Beta::Sessions::BetaManagedAgentsToolUseLimitReachedErrorObject::retry_status,
  type: :tool_use_limit_reached_error
}