anthropic 1.45.0 → 1.46.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.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/anthropic/models/beta/agent_create_params.rb +8 -8
  5. data/lib/anthropic/models/beta/agent_update_params.rb +7 -10
  6. data/lib/anthropic/models/beta/beta_advisor_tool_20260301.rb +15 -1
  7. data/lib/anthropic/models/beta/beta_advisor_tool_result_error.rb +1 -0
  8. data/lib/anthropic/models/beta/beta_advisor_tool_result_error_param.rb +1 -0
  9. data/lib/anthropic/models/beta/beta_managed_agents_custom_tool_input_schema.rb +10 -27
  10. data/lib/anthropic/models/beta/beta_tool_search_tool_result_error_param.rb +7 -1
  11. data/lib/anthropic/models/beta/beta_webhook_session_archived_event_data.rb +2 -2
  12. data/lib/anthropic/models/beta/beta_webhook_session_created_event_data.rb +2 -2
  13. data/lib/anthropic/models/beta/beta_webhook_session_deleted_event_data.rb +2 -2
  14. data/lib/anthropic/models/beta/beta_webhook_session_idled_event_data.rb +2 -2
  15. data/lib/anthropic/models/beta/beta_webhook_session_outcome_evaluation_ended_event_data.rb +2 -2
  16. data/lib/anthropic/models/beta/beta_webhook_session_pending_event_data.rb +2 -2
  17. data/lib/anthropic/models/beta/beta_webhook_session_requires_action_event_data.rb +2 -2
  18. data/lib/anthropic/models/beta/beta_webhook_session_running_event_data.rb +2 -2
  19. data/lib/anthropic/models/beta/beta_webhook_session_status_idled_event_data.rb +2 -2
  20. data/lib/anthropic/models/beta/beta_webhook_session_status_rescheduled_event_data.rb +2 -2
  21. data/lib/anthropic/models/beta/beta_webhook_session_status_run_started_event_data.rb +2 -2
  22. data/lib/anthropic/models/beta/beta_webhook_session_status_terminated_event_data.rb +2 -2
  23. data/lib/anthropic/models/beta/beta_webhook_session_thread_created_event_data.rb +2 -2
  24. data/lib/anthropic/models/beta/beta_webhook_session_thread_idled_event_data.rb +2 -2
  25. data/lib/anthropic/models/beta/beta_webhook_session_thread_terminated_event_data.rb +2 -2
  26. data/lib/anthropic/models/beta/beta_webhook_vault_archived_event_data.rb +2 -2
  27. data/lib/anthropic/models/beta/beta_webhook_vault_created_event_data.rb +2 -2
  28. data/lib/anthropic/models/beta/beta_webhook_vault_credential_archived_event_data.rb +2 -2
  29. data/lib/anthropic/models/beta/beta_webhook_vault_credential_created_event_data.rb +2 -2
  30. data/lib/anthropic/models/beta/beta_webhook_vault_credential_deleted_event_data.rb +2 -2
  31. data/lib/anthropic/models/beta/beta_webhook_vault_credential_refresh_failed_event_data.rb +2 -2
  32. data/lib/anthropic/models/beta/beta_webhook_vault_deleted_event_data.rb +2 -2
  33. data/lib/anthropic/models/beta/session_list_params.rb +2 -2
  34. data/lib/anthropic/models/tool_search_tool_result_error_param.rb +7 -1
  35. data/lib/anthropic/resources/beta/agents.rb +7 -7
  36. data/lib/anthropic/resources/beta/sessions.rb +1 -1
  37. data/lib/anthropic/version.rb +1 -1
  38. data/rbi/anthropic/models/beta/agent_create_params.rbi +8 -8
  39. data/rbi/anthropic/models/beta/agent_update_params.rbi +6 -12
  40. data/rbi/anthropic/models/beta/beta_advisor_tool_20260301.rbi +20 -0
  41. data/rbi/anthropic/models/beta/beta_advisor_tool_result_error.rbi +5 -0
  42. data/rbi/anthropic/models/beta/beta_advisor_tool_result_error_param.rbi +5 -0
  43. data/rbi/anthropic/models/beta/beta_managed_agents_custom_tool_input_schema.rbi +9 -68
  44. data/rbi/anthropic/models/beta/beta_tool_search_tool_result_error_param.rbi +11 -2
  45. data/rbi/anthropic/models/beta/beta_webhook_session_archived_event_data.rbi +2 -2
  46. data/rbi/anthropic/models/beta/beta_webhook_session_created_event_data.rbi +2 -2
  47. data/rbi/anthropic/models/beta/beta_webhook_session_deleted_event_data.rbi +2 -2
  48. data/rbi/anthropic/models/beta/beta_webhook_session_idled_event_data.rbi +2 -2
  49. data/rbi/anthropic/models/beta/beta_webhook_session_outcome_evaluation_ended_event_data.rbi +2 -2
  50. data/rbi/anthropic/models/beta/beta_webhook_session_pending_event_data.rbi +2 -2
  51. data/rbi/anthropic/models/beta/beta_webhook_session_requires_action_event_data.rbi +2 -2
  52. data/rbi/anthropic/models/beta/beta_webhook_session_running_event_data.rbi +2 -2
  53. data/rbi/anthropic/models/beta/beta_webhook_session_status_idled_event_data.rbi +2 -2
  54. data/rbi/anthropic/models/beta/beta_webhook_session_status_rescheduled_event_data.rbi +2 -2
  55. data/rbi/anthropic/models/beta/beta_webhook_session_status_run_started_event_data.rbi +2 -2
  56. data/rbi/anthropic/models/beta/beta_webhook_session_status_terminated_event_data.rbi +2 -2
  57. data/rbi/anthropic/models/beta/beta_webhook_session_thread_created_event_data.rbi +2 -2
  58. data/rbi/anthropic/models/beta/beta_webhook_session_thread_idled_event_data.rbi +2 -2
  59. data/rbi/anthropic/models/beta/beta_webhook_session_thread_terminated_event_data.rbi +2 -2
  60. data/rbi/anthropic/models/beta/beta_webhook_vault_archived_event_data.rbi +2 -2
  61. data/rbi/anthropic/models/beta/beta_webhook_vault_created_event_data.rbi +2 -2
  62. data/rbi/anthropic/models/beta/beta_webhook_vault_credential_archived_event_data.rbi +2 -2
  63. data/rbi/anthropic/models/beta/beta_webhook_vault_credential_created_event_data.rbi +2 -2
  64. data/rbi/anthropic/models/beta/beta_webhook_vault_credential_deleted_event_data.rbi +2 -2
  65. data/rbi/anthropic/models/beta/beta_webhook_vault_credential_refresh_failed_event_data.rbi +2 -2
  66. data/rbi/anthropic/models/beta/beta_webhook_vault_deleted_event_data.rbi +2 -2
  67. data/rbi/anthropic/models/beta/session_list_params.rbi +2 -2
  68. data/rbi/anthropic/models/tool_search_tool_result_error_param.rbi +11 -2
  69. data/rbi/anthropic/resources/beta/agents.rbi +8 -10
  70. data/rbi/anthropic/resources/beta/sessions.rbi +1 -1
  71. data/sig/anthropic/models/beta/beta_advisor_tool_20260301.rbs +5 -0
  72. data/sig/anthropic/models/beta/beta_advisor_tool_result_error.rbs +2 -0
  73. data/sig/anthropic/models/beta/beta_advisor_tool_result_error_param.rbs +2 -0
  74. data/sig/anthropic/models/beta/beta_managed_agents_custom_tool_input_schema.rbs +9 -25
  75. data/sig/anthropic/models/beta/beta_tool_search_tool_result_error_param.rbs +7 -2
  76. data/sig/anthropic/models/tool_search_tool_result_error_param.rbs +7 -2
  77. metadata +2 -2
@@ -5,7 +5,7 @@ module Anthropic
5
5
  module Beta
6
6
  class BetaWebhookVaultCredentialDeletedEventData < Anthropic::Internal::Type::BaseModel
7
7
  # @!attribute id
8
- # ID of the resource that triggered the event.
8
+ # ID of the vault credential that triggered the event.
9
9
  #
10
10
  # @return [String]
11
11
  required :id, String
@@ -32,7 +32,7 @@ module Anthropic
32
32
  required :workspace_id, String
33
33
 
34
34
  # @!method initialize(id:, organization_id:, vault_id:, workspace_id:, type: :"vault_credential.deleted")
35
- # @param id [String] ID of the resource that triggered the event.
35
+ # @param id [String] ID of the vault credential that triggered the event.
36
36
  #
37
37
  # @param organization_id [String]
38
38
  #
@@ -5,7 +5,7 @@ module Anthropic
5
5
  module Beta
6
6
  class BetaWebhookVaultCredentialRefreshFailedEventData < Anthropic::Internal::Type::BaseModel
7
7
  # @!attribute id
8
- # ID of the resource that triggered the event.
8
+ # ID of the vault credential that triggered the event.
9
9
  #
10
10
  # @return [String]
11
11
  required :id, String
@@ -32,7 +32,7 @@ module Anthropic
32
32
  required :workspace_id, String
33
33
 
34
34
  # @!method initialize(id:, organization_id:, vault_id:, workspace_id:, type: :"vault_credential.refresh_failed")
35
- # @param id [String] ID of the resource that triggered the event.
35
+ # @param id [String] ID of the vault credential that triggered the event.
36
36
  #
37
37
  # @param organization_id [String]
38
38
  #
@@ -5,7 +5,7 @@ module Anthropic
5
5
  module Beta
6
6
  class BetaWebhookVaultDeletedEventData < Anthropic::Internal::Type::BaseModel
7
7
  # @!attribute id
8
- # ID of the resource that triggered the event.
8
+ # ID of the vault that triggered the event.
9
9
  #
10
10
  # @return [String]
11
11
  required :id, String
@@ -26,7 +26,7 @@ module Anthropic
26
26
  required :workspace_id, String
27
27
 
28
28
  # @!method initialize(id:, organization_id:, workspace_id:, type: :"vault.deleted")
29
- # @param id [String] ID of the resource that triggered the event.
29
+ # @param id [String] ID of the vault that triggered the event.
30
30
  #
31
31
  # @param organization_id [String]
32
32
  #
@@ -71,7 +71,7 @@ module Anthropic
71
71
  optional :order, enum: -> { Anthropic::Beta::SessionListParams::Order }
72
72
 
73
73
  # @!attribute page
74
- # Opaque pagination cursor from a previous response's next_page.
74
+ # Opaque pagination cursor from a previous response.
75
75
  #
76
76
  # @return [String, nil]
77
77
  optional :page, String
@@ -114,7 +114,7 @@ module Anthropic
114
114
  #
115
115
  # @param order [Symbol, Anthropic::Models::Beta::SessionListParams::Order] Sort direction for results, ordered by created_at. Defaults to desc (newest firs
116
116
  #
117
- # @param page [String] Opaque pagination cursor from a previous response's next_page.
117
+ # @param page [String] Opaque pagination cursor from a previous response.
118
118
  #
119
119
  # @param statuses [Array<Symbol, Anthropic::Models::Beta::SessionListParams::Status>] Filter by session status. Repeat the parameter to match any of multiple statuses
120
120
  #
@@ -13,8 +13,14 @@ module Anthropic
13
13
  # @return [Symbol, :tool_search_tool_result_error]
14
14
  required :type, const: :tool_search_tool_result_error
15
15
 
16
- # @!method initialize(error_code:, type: :tool_search_tool_result_error)
16
+ # @!attribute error_message
17
+ #
18
+ # @return [String, nil]
19
+ optional :error_message, String, nil?: true
20
+
21
+ # @!method initialize(error_code:, error_message: nil, type: :tool_search_tool_result_error)
17
22
  # @param error_code [Symbol, Anthropic::Models::ToolSearchToolResultErrorCode]
23
+ # @param error_message [String, nil]
18
24
  # @param type [Symbol, :tool_search_tool_result_error]
19
25
  end
20
26
  end
@@ -16,9 +16,9 @@ module Anthropic
16
16
  #
17
17
  # @param model [Symbol, String, Anthropic::Models::Beta::BetaManagedAgentsModel, Anthropic::Models::Beta::BetaManagedAgentsModelConfigParams] Body param: Model identifier. Accepts the [model string](https://platform.claude
18
18
  #
19
- # @param name [String] Body param: Human-readable name for the agent. 1-256 characters.
19
+ # @param name [String] Body param: Human-readable name for the agent.
20
20
  #
21
- # @param description [String, nil] Body param: Description of what the agent does. Up to 2048 characters.
21
+ # @param description [String, nil] Body param: Description of what the agent does.
22
22
  #
23
23
  # @param mcp_servers [Array<Anthropic::Models::Beta::BetaManagedAgentsURLMCPServerParams>] Body param: MCP servers this agent connects to. Maximum 20. Names must be unique
24
24
  #
@@ -26,9 +26,9 @@ module Anthropic
26
26
  #
27
27
  # @param multiagent [Anthropic::Models::Beta::BetaManagedAgentsMultiagentParams, nil] Body param: A coordinator topology: the session's primary thread orchestrates wo
28
28
  #
29
- # @param skills [Array<Anthropic::Models::Beta::BetaManagedAgentsAnthropicSkillParams, Anthropic::Models::Beta::BetaManagedAgentsCustomSkillParams>] Body param: Skills available to the agent. Maximum 20.
29
+ # @param skills [Array<Anthropic::Models::Beta::BetaManagedAgentsAnthropicSkillParams, Anthropic::Models::Beta::BetaManagedAgentsCustomSkillParams>] Body param: Skills available to the agent.
30
30
  #
31
- # @param system_ [String, nil] Body param: System prompt for the agent. Up to 100,000 characters.
31
+ # @param system_ [String, nil] Body param: System prompt for the agent.
32
32
  #
33
33
  # @param tools [Array<Anthropic::Models::Beta::BetaManagedAgentsAgentToolset20260401Params, Anthropic::Models::Beta::BetaManagedAgentsMCPToolsetParams, Anthropic::Models::Beta::BetaManagedAgentsCustomToolParams>] Body param: Tool configurations available to the agent. Maximum of 128 tools acr
34
34
  #
@@ -95,7 +95,7 @@ module Anthropic
95
95
  #
96
96
  # @param version [Integer] Body param: The agent's current version, used to prevent concurrent overwrites.
97
97
  #
98
- # @param description [String, nil] Body param: Description. Up to 2048 characters. Omit to preserve; send empty str
98
+ # @param description [String, nil] Body param: Description. Omit to preserve; send empty string or null to clear.
99
99
  #
100
100
  # @param mcp_servers [Array<Anthropic::Models::Beta::BetaManagedAgentsURLMCPServerParams>, nil] Body param: MCP servers. Full replacement. Omit to preserve; send empty array or
101
101
  #
@@ -105,11 +105,11 @@ module Anthropic
105
105
  #
106
106
  # @param multiagent [Anthropic::Models::Beta::BetaManagedAgentsMultiagentParams, nil] Body param: A coordinator topology: the session's primary thread orchestrates wo
107
107
  #
108
- # @param name [String] Body param: Human-readable name. 1-256 characters. Omit to preserve. Cannot be c
108
+ # @param name [String] Body param: Human-readable name. Must be non-empty. Omit to preserve. Cannot be
109
109
  #
110
110
  # @param skills [Array<Anthropic::Models::Beta::BetaManagedAgentsAnthropicSkillParams, Anthropic::Models::Beta::BetaManagedAgentsCustomSkillParams>, nil] Body param: Skills. Full replacement. Omit to preserve; send empty array or null
111
111
  #
112
- # @param system_ [String, nil] Body param: System prompt. Up to 100,000 characters. Omit to preserve; send empt
112
+ # @param system_ [String, nil] Body param: System prompt. Omit to preserve; send empty string or null to clear.
113
113
  #
114
114
  # @param tools [Array<Anthropic::Models::Beta::BetaManagedAgentsAgentToolset20260401Params, Anthropic::Models::Beta::BetaManagedAgentsMCPToolsetParams, Anthropic::Models::Beta::BetaManagedAgentsCustomToolParams>, nil] Body param: Tool configurations available to the agent. Full replacement. Omit t
115
115
  #
@@ -140,7 +140,7 @@ module Anthropic
140
140
  #
141
141
  # @param order [Symbol, Anthropic::Models::Beta::SessionListParams::Order] Query param: Sort direction for results, ordered by created_at. Defaults to desc
142
142
  #
143
- # @param page [String] Query param: Opaque pagination cursor from a previous response's next_page.
143
+ # @param page [String] Query param: Opaque pagination cursor from a previous response.
144
144
  #
145
145
  # @param statuses [Array<Symbol, Anthropic::Models::Beta::SessionListParams::Status>] Query param: Filter by session status. Repeat the parameter to match any of mult
146
146
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Anthropic
4
- VERSION = "1.45.0"
4
+ VERSION = "1.46.0"
5
5
  end
@@ -30,11 +30,11 @@ module Anthropic
30
30
  end
31
31
  attr_accessor :model
32
32
 
33
- # Human-readable name for the agent. 1-256 characters.
33
+ # Human-readable name for the agent.
34
34
  sig { returns(String) }
35
35
  attr_accessor :name
36
36
 
37
- # Description of what the agent does. Up to 2048 characters.
37
+ # Description of what the agent does.
38
38
  sig { returns(T.nilable(String)) }
39
39
  attr_accessor :description
40
40
 
@@ -84,7 +84,7 @@ module Anthropic
84
84
  end
85
85
  attr_writer :multiagent
86
86
 
87
- # Skills available to the agent. Maximum 20.
87
+ # Skills available to the agent.
88
88
  sig do
89
89
  returns(
90
90
  T.nilable(
@@ -112,7 +112,7 @@ module Anthropic
112
112
  end
113
113
  attr_writer :skills
114
114
 
115
- # System prompt for the agent. Up to 100,000 characters.
115
+ # System prompt for the agent.
116
116
  sig { returns(T.nilable(String)) }
117
117
  attr_accessor :system_
118
118
 
@@ -209,9 +209,9 @@ module Anthropic
209
209
  # e.g. `claude-opus-4-6`, or a `model_config` object for additional configuration
210
210
  # control
211
211
  model:,
212
- # Human-readable name for the agent. 1-256 characters.
212
+ # Human-readable name for the agent.
213
213
  name:,
214
- # Description of what the agent does. Up to 2048 characters.
214
+ # Description of what the agent does.
215
215
  description: nil,
216
216
  # MCP servers this agent connects to. Maximum 20. Names must be unique within the
217
217
  # array.
@@ -222,9 +222,9 @@ module Anthropic
222
222
  # A coordinator topology: the session's primary thread orchestrates work by
223
223
  # spawning session threads, each running an agent drawn from the `agents` roster.
224
224
  multiagent: nil,
225
- # Skills available to the agent. Maximum 20.
225
+ # Skills available to the agent.
226
226
  skills: nil,
227
- # System prompt for the agent. Up to 100,000 characters.
227
+ # System prompt for the agent.
228
228
  system_: nil,
229
229
  # Tool configurations available to the agent. Maximum of 128 tools across all
230
230
  # toolsets allowed.
@@ -24,8 +24,7 @@ module Anthropic
24
24
  sig { returns(Integer) }
25
25
  attr_accessor :version
26
26
 
27
- # Description. Up to 2048 characters. Omit to preserve; send empty string or null
28
- # to clear.
27
+ # Description. Omit to preserve; send empty string or null to clear.
29
28
  sig { returns(T.nilable(String)) }
30
29
  attr_accessor :description
31
30
 
@@ -92,7 +91,7 @@ module Anthropic
92
91
  end
93
92
  attr_writer :multiagent
94
93
 
95
- # Human-readable name. 1-256 characters. Omit to preserve. Cannot be cleared.
94
+ # Human-readable name. Must be non-empty. Omit to preserve. Cannot be cleared.
96
95
  sig { returns(T.nilable(String)) }
97
96
  attr_reader :name
98
97
 
@@ -100,7 +99,6 @@ module Anthropic
100
99
  attr_writer :name
101
100
 
102
101
  # Skills. Full replacement. Omit to preserve; send empty array or null to clear.
103
- # Maximum 20.
104
102
  sig do
105
103
  returns(
106
104
  T.nilable(
@@ -115,8 +113,7 @@ module Anthropic
115
113
  end
116
114
  attr_accessor :skills
117
115
 
118
- # System prompt. Up to 100,000 characters. Omit to preserve; send empty string or
119
- # null to clear.
116
+ # System prompt. Omit to preserve; send empty string or null to clear.
120
117
  sig { returns(T.nilable(String)) }
121
118
  attr_accessor :system_
122
119
 
@@ -208,8 +205,7 @@ module Anthropic
208
205
  # value from a create or retrieve response. The request fails if this does not
209
206
  # match the server's current version.
210
207
  version:,
211
- # Description. Up to 2048 characters. Omit to preserve; send empty string or null
212
- # to clear.
208
+ # Description. Omit to preserve; send empty string or null to clear.
213
209
  description: nil,
214
210
  # MCP servers. Full replacement. Omit to preserve; send empty array or null to
215
211
  # clear. Names must be unique. Maximum 20.
@@ -226,13 +222,11 @@ module Anthropic
226
222
  # A coordinator topology: the session's primary thread orchestrates work by
227
223
  # spawning session threads, each running an agent drawn from the `agents` roster.
228
224
  multiagent: nil,
229
- # Human-readable name. 1-256 characters. Omit to preserve. Cannot be cleared.
225
+ # Human-readable name. Must be non-empty. Omit to preserve. Cannot be cleared.
230
226
  name: nil,
231
227
  # Skills. Full replacement. Omit to preserve; send empty array or null to clear.
232
- # Maximum 20.
233
228
  skills: nil,
234
- # System prompt. Up to 100,000 characters. Omit to preserve; send empty string or
235
- # null to clear.
229
+ # System prompt. Omit to preserve; send empty string or null to clear.
236
230
  system_: nil,
237
231
  # Tool configurations available to the agent. Full replacement. Omit to preserve;
238
232
  # send empty array or null to clear. Maximum of 128 tools across all toolsets
@@ -85,6 +85,16 @@ module Anthropic
85
85
  sig { params(defer_loading: T::Boolean).void }
86
86
  attr_writer :defer_loading
87
87
 
88
+ # Bounds the advisor's total output (thinking + text) per call. When the advisor
89
+ # hits this cap, the returned advisor_result or advisor_redacted_result block
90
+ # carries stop_reason='max_tokens', and a truncation note is appended to the
91
+ # advice text the worker model sees (inside the encrypted blob in redacted mode).
92
+ # When set, the server also emits a remaining-tokens budget block in the advisor's
93
+ # prompt so the advisor self-shapes toward the cap. When omitted, the advisor
94
+ # model's default output cap applies and no budget block is emitted.
95
+ sig { returns(T.nilable(Integer)) }
96
+ attr_accessor :max_tokens
97
+
88
98
  # Maximum number of times the tool can be used in the API request.
89
99
  sig { returns(T.nilable(Integer)) }
90
100
  attr_accessor :max_uses
@@ -108,6 +118,7 @@ module Anthropic
108
118
  caching:
109
119
  T.nilable(Anthropic::Beta::BetaCacheControlEphemeral::OrHash),
110
120
  defer_loading: T::Boolean,
121
+ max_tokens: T.nilable(Integer),
111
122
  max_uses: T.nilable(Integer),
112
123
  strict: T::Boolean,
113
124
  name: Symbol,
@@ -130,6 +141,14 @@ module Anthropic
130
141
  # If true, tool will not be included in initial system prompt. Only loaded when
131
142
  # returned via tool_reference from tool search.
132
143
  defer_loading: nil,
144
+ # Bounds the advisor's total output (thinking + text) per call. When the advisor
145
+ # hits this cap, the returned advisor_result or advisor_redacted_result block
146
+ # carries stop_reason='max_tokens', and a truncation note is appended to the
147
+ # advice text the worker model sees (inside the encrypted blob in redacted mode).
148
+ # When set, the server also emits a remaining-tokens budget block in the advisor's
149
+ # prompt so the advisor self-shapes toward the cap. When omitted, the advisor
150
+ # model's default output cap applies and no budget block is emitted.
151
+ max_tokens: nil,
133
152
  # Maximum number of times the tool can be used in the API request.
134
153
  max_uses: nil,
135
154
  # When true, guarantees schema validation on tool names and inputs
@@ -156,6 +175,7 @@ module Anthropic
156
175
  T.nilable(Anthropic::Beta::BetaCacheControlEphemeral),
157
176
  caching: T.nilable(Anthropic::Beta::BetaCacheControlEphemeral),
158
177
  defer_loading: T::Boolean,
178
+ max_tokens: T.nilable(Integer),
159
179
  max_uses: T.nilable(Integer),
160
180
  strict: T::Boolean
161
181
  }
@@ -88,6 +88,11 @@ module Anthropic
88
88
  :execution_time_exceeded,
89
89
  Anthropic::Beta::BetaAdvisorToolResultError::ErrorCode::TaggedSymbol
90
90
  )
91
+ MODEL_NOT_FOUND =
92
+ T.let(
93
+ :model_not_found,
94
+ Anthropic::Beta::BetaAdvisorToolResultError::ErrorCode::TaggedSymbol
95
+ )
91
96
 
92
97
  sig do
93
98
  override.returns(
@@ -88,6 +88,11 @@ module Anthropic
88
88
  :execution_time_exceeded,
89
89
  Anthropic::Beta::BetaAdvisorToolResultErrorParam::ErrorCode::TaggedSymbol
90
90
  )
91
+ MODEL_NOT_FOUND =
92
+ T.let(
93
+ :model_not_found,
94
+ Anthropic::Beta::BetaAdvisorToolResultErrorParam::ErrorCode::TaggedSymbol
95
+ )
91
96
 
92
97
  sig do
93
98
  override.returns(
@@ -15,96 +15,37 @@ module Anthropic
15
15
  )
16
16
  end
17
17
 
18
- # JSON Schema properties defining the tool's input parameters.
18
+ sig { returns(Symbol) }
19
+ attr_accessor :type
20
+
19
21
  sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
20
22
  attr_accessor :properties
21
23
 
22
- # List of required property names.
23
24
  sig { returns(T.nilable(T::Array[String])) }
24
- attr_reader :required
25
-
26
- sig { params(required: T::Array[String]).void }
27
- attr_writer :required
28
-
29
- # Must be 'object' for tool input schemas.
30
- sig do
31
- returns(
32
- T.nilable(
33
- Anthropic::Beta::BetaManagedAgentsCustomToolInputSchema::Type::OrSymbol
34
- )
35
- )
36
- end
37
- attr_reader :type
38
-
39
- sig do
40
- params(
41
- type:
42
- Anthropic::Beta::BetaManagedAgentsCustomToolInputSchema::Type::OrSymbol
43
- ).void
44
- end
45
- attr_writer :type
25
+ attr_accessor :required
46
26
 
47
27
  # JSON Schema for custom tool input parameters.
48
28
  sig do
49
29
  params(
50
30
  properties: T.nilable(T::Hash[Symbol, T.anything]),
51
- required: T::Array[String],
52
- type:
53
- Anthropic::Beta::BetaManagedAgentsCustomToolInputSchema::Type::OrSymbol
31
+ required: T.nilable(T::Array[String]),
32
+ type: Symbol
54
33
  ).returns(T.attached_class)
55
34
  end
56
- def self.new(
57
- # JSON Schema properties defining the tool's input parameters.
58
- properties: nil,
59
- # List of required property names.
60
- required: nil,
61
- # Must be 'object' for tool input schemas.
62
- type: nil
63
- )
35
+ def self.new(properties: nil, required: nil, type: :object)
64
36
  end
65
37
 
66
38
  sig do
67
39
  override.returns(
68
40
  {
41
+ type: Symbol,
69
42
  properties: T.nilable(T::Hash[Symbol, T.anything]),
70
- required: T::Array[String],
71
- type:
72
- Anthropic::Beta::BetaManagedAgentsCustomToolInputSchema::Type::OrSymbol
43
+ required: T.nilable(T::Array[String])
73
44
  }
74
45
  )
75
46
  end
76
47
  def to_hash
77
48
  end
78
-
79
- # Must be 'object' for tool input schemas.
80
- module Type
81
- extend Anthropic::Internal::Type::Enum
82
-
83
- TaggedSymbol =
84
- T.type_alias do
85
- T.all(
86
- Symbol,
87
- Anthropic::Beta::BetaManagedAgentsCustomToolInputSchema::Type
88
- )
89
- end
90
- OrSymbol = T.type_alias { T.any(Symbol, String) }
91
-
92
- OBJECT =
93
- T.let(
94
- :object,
95
- Anthropic::Beta::BetaManagedAgentsCustomToolInputSchema::Type::TaggedSymbol
96
- )
97
-
98
- sig do
99
- override.returns(
100
- T::Array[
101
- Anthropic::Beta::BetaManagedAgentsCustomToolInputSchema::Type::TaggedSymbol
102
- ]
103
- )
104
- end
105
- def self.values
106
- end
107
- end
108
49
  end
109
50
  end
110
51
  end
@@ -25,14 +25,22 @@ module Anthropic
25
25
  sig { returns(Symbol) }
26
26
  attr_accessor :type
27
27
 
28
+ sig { returns(T.nilable(String)) }
29
+ attr_accessor :error_message
30
+
28
31
  sig do
29
32
  params(
30
33
  error_code:
31
34
  Anthropic::Beta::BetaToolSearchToolResultErrorParam::ErrorCode::OrSymbol,
35
+ error_message: T.nilable(String),
32
36
  type: Symbol
33
37
  ).returns(T.attached_class)
34
38
  end
35
- def self.new(error_code:, type: :tool_search_tool_result_error)
39
+ def self.new(
40
+ error_code:,
41
+ error_message: nil,
42
+ type: :tool_search_tool_result_error
43
+ )
36
44
  end
37
45
 
38
46
  sig do
@@ -40,7 +48,8 @@ module Anthropic
40
48
  {
41
49
  error_code:
42
50
  Anthropic::Beta::BetaToolSearchToolResultErrorParam::ErrorCode::OrSymbol,
43
- type: Symbol
51
+ type: Symbol,
52
+ error_message: T.nilable(String)
44
53
  }
45
54
  )
46
55
  end
@@ -15,7 +15,7 @@ module Anthropic
15
15
  )
16
16
  end
17
17
 
18
- # ID of the resource that triggered the event.
18
+ # ID of the session that triggered the event.
19
19
  sig { returns(String) }
20
20
  attr_accessor :id
21
21
 
@@ -37,7 +37,7 @@ module Anthropic
37
37
  ).returns(T.attached_class)
38
38
  end
39
39
  def self.new(
40
- # ID of the resource that triggered the event.
40
+ # ID of the session that triggered the event.
41
41
  id:,
42
42
  organization_id:,
43
43
  workspace_id:,
@@ -15,7 +15,7 @@ module Anthropic
15
15
  )
16
16
  end
17
17
 
18
- # ID of the resource that triggered the event.
18
+ # ID of the session that triggered the event.
19
19
  sig { returns(String) }
20
20
  attr_accessor :id
21
21
 
@@ -37,7 +37,7 @@ module Anthropic
37
37
  ).returns(T.attached_class)
38
38
  end
39
39
  def self.new(
40
- # ID of the resource that triggered the event.
40
+ # ID of the session that triggered the event.
41
41
  id:,
42
42
  organization_id:,
43
43
  workspace_id:,
@@ -15,7 +15,7 @@ module Anthropic
15
15
  )
16
16
  end
17
17
 
18
- # ID of the resource that triggered the event.
18
+ # ID of the session that triggered the event.
19
19
  sig { returns(String) }
20
20
  attr_accessor :id
21
21
 
@@ -37,7 +37,7 @@ module Anthropic
37
37
  ).returns(T.attached_class)
38
38
  end
39
39
  def self.new(
40
- # ID of the resource that triggered the event.
40
+ # ID of the session that triggered the event.
41
41
  id:,
42
42
  organization_id:,
43
43
  workspace_id:,
@@ -14,7 +14,7 @@ module Anthropic
14
14
  )
15
15
  end
16
16
 
17
- # ID of the resource that triggered the event.
17
+ # ID of the session that triggered the event.
18
18
  sig { returns(String) }
19
19
  attr_accessor :id
20
20
 
@@ -36,7 +36,7 @@ module Anthropic
36
36
  ).returns(T.attached_class)
37
37
  end
38
38
  def self.new(
39
- # ID of the resource that triggered the event.
39
+ # ID of the session that triggered the event.
40
40
  id:,
41
41
  organization_id:,
42
42
  workspace_id:,
@@ -15,7 +15,7 @@ module Anthropic
15
15
  )
16
16
  end
17
17
 
18
- # ID of the resource that triggered the event.
18
+ # ID of the session that triggered the event.
19
19
  sig { returns(String) }
20
20
  attr_accessor :id
21
21
 
@@ -37,7 +37,7 @@ module Anthropic
37
37
  ).returns(T.attached_class)
38
38
  end
39
39
  def self.new(
40
- # ID of the resource that triggered the event.
40
+ # ID of the session that triggered the event.
41
41
  id:,
42
42
  organization_id:,
43
43
  workspace_id:,
@@ -15,7 +15,7 @@ module Anthropic
15
15
  )
16
16
  end
17
17
 
18
- # ID of the resource that triggered the event.
18
+ # ID of the session that triggered the event.
19
19
  sig { returns(String) }
20
20
  attr_accessor :id
21
21
 
@@ -37,7 +37,7 @@ module Anthropic
37
37
  ).returns(T.attached_class)
38
38
  end
39
39
  def self.new(
40
- # ID of the resource that triggered the event.
40
+ # ID of the session that triggered the event.
41
41
  id:,
42
42
  organization_id:,
43
43
  workspace_id:,
@@ -15,7 +15,7 @@ module Anthropic
15
15
  )
16
16
  end
17
17
 
18
- # ID of the resource that triggered the event.
18
+ # ID of the session that triggered the event.
19
19
  sig { returns(String) }
20
20
  attr_accessor :id
21
21
 
@@ -37,7 +37,7 @@ module Anthropic
37
37
  ).returns(T.attached_class)
38
38
  end
39
39
  def self.new(
40
- # ID of the resource that triggered the event.
40
+ # ID of the session that triggered the event.
41
41
  id:,
42
42
  organization_id:,
43
43
  workspace_id:,
@@ -15,7 +15,7 @@ module Anthropic
15
15
  )
16
16
  end
17
17
 
18
- # ID of the resource that triggered the event.
18
+ # ID of the session that triggered the event.
19
19
  sig { returns(String) }
20
20
  attr_accessor :id
21
21
 
@@ -37,7 +37,7 @@ module Anthropic
37
37
  ).returns(T.attached_class)
38
38
  end
39
39
  def self.new(
40
- # ID of the resource that triggered the event.
40
+ # ID of the session that triggered the event.
41
41
  id:,
42
42
  organization_id:,
43
43
  workspace_id:,
@@ -15,7 +15,7 @@ module Anthropic
15
15
  )
16
16
  end
17
17
 
18
- # ID of the resource that triggered the event.
18
+ # ID of the session that triggered the event.
19
19
  sig { returns(String) }
20
20
  attr_accessor :id
21
21
 
@@ -37,7 +37,7 @@ module Anthropic
37
37
  ).returns(T.attached_class)
38
38
  end
39
39
  def self.new(
40
- # ID of the resource that triggered the event.
40
+ # ID of the session that triggered the event.
41
41
  id:,
42
42
  organization_id:,
43
43
  workspace_id:,