anthropic 1.44.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 (80) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -0
  3. data/README.md +1 -1
  4. data/SECURITY.md +7 -19
  5. data/lib/anthropic/helpers/streaming/message_stream.rb +18 -0
  6. data/lib/anthropic/models/beta/agent_create_params.rb +8 -8
  7. data/lib/anthropic/models/beta/agent_update_params.rb +7 -10
  8. data/lib/anthropic/models/beta/beta_advisor_tool_20260301.rb +15 -1
  9. data/lib/anthropic/models/beta/beta_advisor_tool_result_error.rb +1 -0
  10. data/lib/anthropic/models/beta/beta_advisor_tool_result_error_param.rb +1 -0
  11. data/lib/anthropic/models/beta/beta_managed_agents_custom_tool_input_schema.rb +10 -27
  12. data/lib/anthropic/models/beta/beta_tool_search_tool_result_error_param.rb +7 -1
  13. data/lib/anthropic/models/beta/beta_webhook_session_archived_event_data.rb +2 -2
  14. data/lib/anthropic/models/beta/beta_webhook_session_created_event_data.rb +2 -2
  15. data/lib/anthropic/models/beta/beta_webhook_session_deleted_event_data.rb +2 -2
  16. data/lib/anthropic/models/beta/beta_webhook_session_idled_event_data.rb +2 -2
  17. data/lib/anthropic/models/beta/beta_webhook_session_outcome_evaluation_ended_event_data.rb +2 -2
  18. data/lib/anthropic/models/beta/beta_webhook_session_pending_event_data.rb +2 -2
  19. data/lib/anthropic/models/beta/beta_webhook_session_requires_action_event_data.rb +2 -2
  20. data/lib/anthropic/models/beta/beta_webhook_session_running_event_data.rb +2 -2
  21. data/lib/anthropic/models/beta/beta_webhook_session_status_idled_event_data.rb +2 -2
  22. data/lib/anthropic/models/beta/beta_webhook_session_status_rescheduled_event_data.rb +2 -2
  23. data/lib/anthropic/models/beta/beta_webhook_session_status_run_started_event_data.rb +2 -2
  24. data/lib/anthropic/models/beta/beta_webhook_session_status_terminated_event_data.rb +2 -2
  25. data/lib/anthropic/models/beta/beta_webhook_session_thread_created_event_data.rb +2 -2
  26. data/lib/anthropic/models/beta/beta_webhook_session_thread_idled_event_data.rb +2 -2
  27. data/lib/anthropic/models/beta/beta_webhook_session_thread_terminated_event_data.rb +2 -2
  28. data/lib/anthropic/models/beta/beta_webhook_vault_archived_event_data.rb +2 -2
  29. data/lib/anthropic/models/beta/beta_webhook_vault_created_event_data.rb +2 -2
  30. data/lib/anthropic/models/beta/beta_webhook_vault_credential_archived_event_data.rb +2 -2
  31. data/lib/anthropic/models/beta/beta_webhook_vault_credential_created_event_data.rb +2 -2
  32. data/lib/anthropic/models/beta/beta_webhook_vault_credential_deleted_event_data.rb +2 -2
  33. data/lib/anthropic/models/beta/beta_webhook_vault_credential_refresh_failed_event_data.rb +2 -2
  34. data/lib/anthropic/models/beta/beta_webhook_vault_deleted_event_data.rb +2 -2
  35. data/lib/anthropic/models/beta/session_list_params.rb +2 -2
  36. data/lib/anthropic/models/model.rb +6 -0
  37. data/lib/anthropic/models/tool_search_tool_result_error_param.rb +7 -1
  38. data/lib/anthropic/resources/beta/agents.rb +7 -7
  39. data/lib/anthropic/resources/beta/sessions.rb +1 -1
  40. data/lib/anthropic/version.rb +1 -1
  41. data/rbi/anthropic/models/beta/agent_create_params.rbi +8 -8
  42. data/rbi/anthropic/models/beta/agent_update_params.rbi +6 -12
  43. data/rbi/anthropic/models/beta/beta_advisor_tool_20260301.rbi +20 -0
  44. data/rbi/anthropic/models/beta/beta_advisor_tool_result_error.rbi +5 -0
  45. data/rbi/anthropic/models/beta/beta_advisor_tool_result_error_param.rbi +5 -0
  46. data/rbi/anthropic/models/beta/beta_managed_agents_custom_tool_input_schema.rbi +9 -68
  47. data/rbi/anthropic/models/beta/beta_tool_search_tool_result_error_param.rbi +11 -2
  48. data/rbi/anthropic/models/beta/beta_webhook_session_archived_event_data.rbi +2 -2
  49. data/rbi/anthropic/models/beta/beta_webhook_session_created_event_data.rbi +2 -2
  50. data/rbi/anthropic/models/beta/beta_webhook_session_deleted_event_data.rbi +2 -2
  51. data/rbi/anthropic/models/beta/beta_webhook_session_idled_event_data.rbi +2 -2
  52. data/rbi/anthropic/models/beta/beta_webhook_session_outcome_evaluation_ended_event_data.rbi +2 -2
  53. data/rbi/anthropic/models/beta/beta_webhook_session_pending_event_data.rbi +2 -2
  54. data/rbi/anthropic/models/beta/beta_webhook_session_requires_action_event_data.rbi +2 -2
  55. data/rbi/anthropic/models/beta/beta_webhook_session_running_event_data.rbi +2 -2
  56. data/rbi/anthropic/models/beta/beta_webhook_session_status_idled_event_data.rbi +2 -2
  57. data/rbi/anthropic/models/beta/beta_webhook_session_status_rescheduled_event_data.rbi +2 -2
  58. data/rbi/anthropic/models/beta/beta_webhook_session_status_run_started_event_data.rbi +2 -2
  59. data/rbi/anthropic/models/beta/beta_webhook_session_status_terminated_event_data.rbi +2 -2
  60. data/rbi/anthropic/models/beta/beta_webhook_session_thread_created_event_data.rbi +2 -2
  61. data/rbi/anthropic/models/beta/beta_webhook_session_thread_idled_event_data.rbi +2 -2
  62. data/rbi/anthropic/models/beta/beta_webhook_session_thread_terminated_event_data.rbi +2 -2
  63. data/rbi/anthropic/models/beta/beta_webhook_vault_archived_event_data.rbi +2 -2
  64. data/rbi/anthropic/models/beta/beta_webhook_vault_created_event_data.rbi +2 -2
  65. data/rbi/anthropic/models/beta/beta_webhook_vault_credential_archived_event_data.rbi +2 -2
  66. data/rbi/anthropic/models/beta/beta_webhook_vault_credential_created_event_data.rbi +2 -2
  67. data/rbi/anthropic/models/beta/beta_webhook_vault_credential_deleted_event_data.rbi +2 -2
  68. data/rbi/anthropic/models/beta/beta_webhook_vault_credential_refresh_failed_event_data.rbi +2 -2
  69. data/rbi/anthropic/models/beta/beta_webhook_vault_deleted_event_data.rbi +2 -2
  70. data/rbi/anthropic/models/beta/session_list_params.rbi +2 -2
  71. data/rbi/anthropic/models/tool_search_tool_result_error_param.rbi +11 -2
  72. data/rbi/anthropic/resources/beta/agents.rbi +8 -10
  73. data/rbi/anthropic/resources/beta/sessions.rbi +1 -1
  74. data/sig/anthropic/models/beta/beta_advisor_tool_20260301.rbs +5 -0
  75. data/sig/anthropic/models/beta/beta_advisor_tool_result_error.rbs +2 -0
  76. data/sig/anthropic/models/beta/beta_advisor_tool_result_error_param.rbs +2 -0
  77. data/sig/anthropic/models/beta/beta_managed_agents_custom_tool_input_schema.rbs +9 -25
  78. data/sig/anthropic/models/beta/beta_tool_search_tool_result_error_param.rbs +7 -2
  79. data/sig/anthropic/models/tool_search_tool_result_error_param.rbs +7 -2
  80. metadata +2 -2
@@ -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:,
@@ -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:,
@@ -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 vault 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 vault that triggered the event.
40
40
  id:,
41
41
  organization_id:,
42
42
  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 vault 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 vault 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 vault credential that triggered the event.
19
19
  sig { returns(String) }
20
20
  attr_accessor :id
21
21
 
@@ -42,7 +42,7 @@ module Anthropic
42
42
  ).returns(T.attached_class)
43
43
  end
44
44
  def self.new(
45
- # ID of the resource that triggered the event.
45
+ # ID of the vault credential that triggered the event.
46
46
  id:,
47
47
  organization_id:,
48
48
  # ID of the vault that owns this credential.
@@ -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 vault credential that triggered the event.
19
19
  sig { returns(String) }
20
20
  attr_accessor :id
21
21
 
@@ -42,7 +42,7 @@ module Anthropic
42
42
  ).returns(T.attached_class)
43
43
  end
44
44
  def self.new(
45
- # ID of the resource that triggered the event.
45
+ # ID of the vault credential that triggered the event.
46
46
  id:,
47
47
  organization_id:,
48
48
  # ID of the vault that owns this credential.
@@ -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 vault credential that triggered the event.
19
19
  sig { returns(String) }
20
20
  attr_accessor :id
21
21
 
@@ -42,7 +42,7 @@ module Anthropic
42
42
  ).returns(T.attached_class)
43
43
  end
44
44
  def self.new(
45
- # ID of the resource that triggered the event.
45
+ # ID of the vault credential that triggered the event.
46
46
  id:,
47
47
  organization_id:,
48
48
  # ID of the vault that owns this credential.
@@ -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 vault credential that triggered the event.
19
19
  sig { returns(String) }
20
20
  attr_accessor :id
21
21
 
@@ -42,7 +42,7 @@ module Anthropic
42
42
  ).returns(T.attached_class)
43
43
  end
44
44
  def self.new(
45
- # ID of the resource that triggered the event.
45
+ # ID of the vault credential that triggered the event.
46
46
  id:,
47
47
  organization_id:,
48
48
  # ID of the vault that owns this credential.
@@ -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 vault 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 vault that triggered the event.
40
40
  id:,
41
41
  organization_id:,
42
42
  workspace_id:,
@@ -95,7 +95,7 @@ module Anthropic
95
95
  end
96
96
  attr_writer :order
97
97
 
98
- # Opaque pagination cursor from a previous response's next_page.
98
+ # Opaque pagination cursor from a previous response.
99
99
  sig { returns(T.nilable(String)) }
100
100
  attr_reader :page
101
101
 
@@ -180,7 +180,7 @@ module Anthropic
180
180
  # Sort direction for results, ordered by created_at. Defaults to desc (newest
181
181
  # first).
182
182
  order: nil,
183
- # Opaque pagination cursor from a previous response's next_page.
183
+ # Opaque pagination cursor from a previous response.
184
184
  page: nil,
185
185
  # Filter by session status. Repeat the parameter to match any of multiple
186
186
  # statuses.
@@ -17,20 +17,29 @@ module Anthropic
17
17
  sig { returns(Symbol) }
18
18
  attr_accessor :type
19
19
 
20
+ sig { returns(T.nilable(String)) }
21
+ attr_accessor :error_message
22
+
20
23
  sig do
21
24
  params(
22
25
  error_code: Anthropic::ToolSearchToolResultErrorCode::OrSymbol,
26
+ error_message: T.nilable(String),
23
27
  type: Symbol
24
28
  ).returns(T.attached_class)
25
29
  end
26
- def self.new(error_code:, type: :tool_search_tool_result_error)
30
+ def self.new(
31
+ error_code:,
32
+ error_message: nil,
33
+ type: :tool_search_tool_result_error
34
+ )
27
35
  end
28
36
 
29
37
  sig do
30
38
  override.returns(
31
39
  {
32
40
  error_code: Anthropic::ToolSearchToolResultErrorCode::OrSymbol,
33
- type: Symbol
41
+ type: Symbol,
42
+ error_message: T.nilable(String)
34
43
  }
35
44
  )
36
45
  end
@@ -53,9 +53,9 @@ module Anthropic
53
53
  # e.g. `claude-opus-4-6`, or a `model_config` object for additional configuration
54
54
  # control
55
55
  model:,
56
- # Body param: Human-readable name for the agent. 1-256 characters.
56
+ # Body param: Human-readable name for the agent.
57
57
  name:,
58
- # Body param: Description of what the agent does. Up to 2048 characters.
58
+ # Body param: Description of what the agent does.
59
59
  description: nil,
60
60
  # Body param: MCP servers this agent connects to. Maximum 20. Names must be unique
61
61
  # within the array.
@@ -67,9 +67,9 @@ module Anthropic
67
67
  # work by spawning session threads, each running an agent drawn from the `agents`
68
68
  # roster.
69
69
  multiagent: nil,
70
- # Body param: Skills available to the agent. Maximum 20.
70
+ # Body param: Skills available to the agent.
71
71
  skills: nil,
72
- # Body param: System prompt for the agent. Up to 100,000 characters.
72
+ # Body param: System prompt for the agent.
73
73
  system_: nil,
74
74
  # Body param: Tool configurations available to the agent. Maximum of 128 tools
75
75
  # across all toolsets allowed.
@@ -156,8 +156,7 @@ module Anthropic
156
156
  # Obtain this value from a create or retrieve response. The request fails if this
157
157
  # does not match the server's current version.
158
158
  version:,
159
- # Body param: Description. Up to 2048 characters. Omit to preserve; send empty
160
- # string or null to clear.
159
+ # Body param: Description. Omit to preserve; send empty string or null to clear.
161
160
  description: nil,
162
161
  # Body param: MCP servers. Full replacement. Omit to preserve; send empty array or
163
162
  # null to clear. Names must be unique. Maximum 20.
@@ -175,14 +174,13 @@ module Anthropic
175
174
  # work by spawning session threads, each running an agent drawn from the `agents`
176
175
  # roster.
177
176
  multiagent: nil,
178
- # Body param: Human-readable name. 1-256 characters. Omit to preserve. Cannot be
177
+ # Body param: Human-readable name. Must be non-empty. Omit to preserve. Cannot be
179
178
  # cleared.
180
179
  name: nil,
181
180
  # Body param: Skills. Full replacement. Omit to preserve; send empty array or null
182
- # to clear. Maximum 20.
181
+ # to clear.
183
182
  skills: nil,
184
- # Body param: System prompt. Up to 100,000 characters. Omit to preserve; send
185
- # empty string or null to clear.
183
+ # Body param: System prompt. Omit to preserve; send empty string or null to clear.
186
184
  system_: nil,
187
185
  # Body param: Tool configurations available to the agent. Full replacement. Omit
188
186
  # to preserve; send empty array or null to clear. Maximum of 128 tools across all
@@ -161,7 +161,7 @@ module Anthropic
161
161
  # Query param: Sort direction for results, ordered by created_at. Defaults to desc
162
162
  # (newest first).
163
163
  order: nil,
164
- # Query param: Opaque pagination cursor from a previous response's next_page.
164
+ # Query param: Opaque pagination cursor from a previous response.
165
165
  page: nil,
166
166
  # Query param: Filter by session status. Repeat the parameter to match any of
167
167
  # multiple statuses.
@@ -12,6 +12,7 @@ module Anthropic
12
12
  cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
13
13
  caching: Anthropic::Beta::BetaCacheControlEphemeral?,
14
14
  defer_loading: bool,
15
+ max_tokens: Integer?,
15
16
  max_uses: Integer?,
16
17
  strict: bool
17
18
  }
@@ -37,6 +38,8 @@ module Anthropic
37
38
 
38
39
  def defer_loading=: (bool) -> bool
39
40
 
41
+ attr_accessor max_tokens: Integer?
42
+
40
43
  attr_accessor max_uses: Integer?
41
44
 
42
45
  attr_reader strict: bool?
@@ -49,6 +52,7 @@ module Anthropic
49
52
  ?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
50
53
  ?caching: Anthropic::Beta::BetaCacheControlEphemeral?,
51
54
  ?defer_loading: bool,
55
+ ?max_tokens: Integer?,
52
56
  ?max_uses: Integer?,
53
57
  ?strict: bool,
54
58
  ?name: :advisor,
@@ -63,6 +67,7 @@ module Anthropic
63
67
  cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
64
68
  caching: Anthropic::Beta::BetaCacheControlEphemeral?,
65
69
  defer_loading: bool,
70
+ max_tokens: Integer?,
66
71
  max_uses: Integer?,
67
72
  strict: bool
68
73
  }
@@ -31,6 +31,7 @@ module Anthropic
31
31
  | :overloaded
32
32
  | :unavailable
33
33
  | :execution_time_exceeded
34
+ | :model_not_found
34
35
 
35
36
  module ErrorCode
36
37
  extend Anthropic::Internal::Type::Enum
@@ -41,6 +42,7 @@ module Anthropic
41
42
  OVERLOADED: :overloaded
42
43
  UNAVAILABLE: :unavailable
43
44
  EXECUTION_TIME_EXCEEDED: :execution_time_exceeded
45
+ MODEL_NOT_FOUND: :model_not_found
44
46
 
45
47
  def self?.values: -> ::Array[Anthropic::Models::Beta::BetaAdvisorToolResultError::error_code]
46
48
  end
@@ -31,6 +31,7 @@ module Anthropic
31
31
  | :overloaded
32
32
  | :unavailable
33
33
  | :execution_time_exceeded
34
+ | :model_not_found
34
35
 
35
36
  module ErrorCode
36
37
  extend Anthropic::Internal::Type::Enum
@@ -41,6 +42,7 @@ module Anthropic
41
42
  OVERLOADED: :overloaded
42
43
  UNAVAILABLE: :unavailable
43
44
  EXECUTION_TIME_EXCEEDED: :execution_time_exceeded
45
+ MODEL_NOT_FOUND: :model_not_found
44
46
 
45
47
  def self?.values: -> ::Array[Anthropic::Models::Beta::BetaAdvisorToolResultErrorParam::error_code]
46
48
  end
@@ -5,45 +5,29 @@ module Anthropic
5
5
  module Beta
6
6
  type beta_managed_agents_custom_tool_input_schema =
7
7
  {
8
+ type: :object,
8
9
  properties: ::Hash[Symbol, top]?,
9
- required: ::Array[String],
10
- type: Anthropic::Models::Beta::BetaManagedAgentsCustomToolInputSchema::type_
10
+ required: ::Array[String]?
11
11
  }
12
12
 
13
13
  class BetaManagedAgentsCustomToolInputSchema < Anthropic::Internal::Type::BaseModel
14
- attr_accessor properties: ::Hash[Symbol, top]?
15
-
16
- attr_reader required: ::Array[String]?
14
+ attr_accessor type: :object
17
15
 
18
- def required=: (::Array[String]) -> ::Array[String]
19
-
20
- attr_reader type: Anthropic::Models::Beta::BetaManagedAgentsCustomToolInputSchema::type_?
16
+ attr_accessor properties: ::Hash[Symbol, top]?
21
17
 
22
- def type=: (
23
- Anthropic::Models::Beta::BetaManagedAgentsCustomToolInputSchema::type_
24
- ) -> Anthropic::Models::Beta::BetaManagedAgentsCustomToolInputSchema::type_
18
+ attr_accessor required: ::Array[String]?
25
19
 
26
20
  def initialize: (
27
21
  ?properties: ::Hash[Symbol, top]?,
28
- ?required: ::Array[String],
29
- ?type: Anthropic::Models::Beta::BetaManagedAgentsCustomToolInputSchema::type_
22
+ ?required: ::Array[String]?,
23
+ ?type: :object
30
24
  ) -> void
31
25
 
32
26
  def to_hash: -> {
27
+ type: :object,
33
28
  properties: ::Hash[Symbol, top]?,
34
- required: ::Array[String],
35
- type: Anthropic::Models::Beta::BetaManagedAgentsCustomToolInputSchema::type_
29
+ required: ::Array[String]?
36
30
  }
37
-
38
- type type_ = :object
39
-
40
- module Type
41
- extend Anthropic::Internal::Type::Enum
42
-
43
- OBJECT: :object
44
-
45
- def self?.values: -> ::Array[Anthropic::Models::Beta::BetaManagedAgentsCustomToolInputSchema::type_]
46
- end
47
31
  end
48
32
  end
49
33
  end
@@ -6,7 +6,8 @@ module Anthropic
6
6
  type beta_tool_search_tool_result_error_param =
7
7
  {
8
8
  error_code: Anthropic::Models::Beta::BetaToolSearchToolResultErrorParam::error_code,
9
- type: :tool_search_tool_result_error
9
+ type: :tool_search_tool_result_error,
10
+ error_message: String?
10
11
  }
11
12
 
12
13
  class BetaToolSearchToolResultErrorParam < Anthropic::Internal::Type::BaseModel
@@ -14,14 +15,18 @@ module Anthropic
14
15
 
15
16
  attr_accessor type: :tool_search_tool_result_error
16
17
 
18
+ attr_accessor error_message: String?
19
+
17
20
  def initialize: (
18
21
  error_code: Anthropic::Models::Beta::BetaToolSearchToolResultErrorParam::error_code,
22
+ ?error_message: String?,
19
23
  ?type: :tool_search_tool_result_error
20
24
  ) -> void
21
25
 
22
26
  def to_hash: -> {
23
27
  error_code: Anthropic::Models::Beta::BetaToolSearchToolResultErrorParam::error_code,
24
- type: :tool_search_tool_result_error
28
+ type: :tool_search_tool_result_error,
29
+ error_message: String?
25
30
  }
26
31
 
27
32
  type error_code =
@@ -3,7 +3,8 @@ module Anthropic
3
3
  type tool_search_tool_result_error_param =
4
4
  {
5
5
  error_code: Anthropic::Models::tool_search_tool_result_error_code,
6
- type: :tool_search_tool_result_error
6
+ type: :tool_search_tool_result_error,
7
+ error_message: String?
7
8
  }
8
9
 
9
10
  class ToolSearchToolResultErrorParam < Anthropic::Internal::Type::BaseModel
@@ -11,14 +12,18 @@ module Anthropic
11
12
 
12
13
  attr_accessor type: :tool_search_tool_result_error
13
14
 
15
+ attr_accessor error_message: String?
16
+
14
17
  def initialize: (
15
18
  error_code: Anthropic::Models::tool_search_tool_result_error_code,
19
+ ?error_message: String?,
16
20
  ?type: :tool_search_tool_result_error
17
21
  ) -> void
18
22
 
19
23
  def to_hash: -> {
20
24
  error_code: Anthropic::Models::tool_search_tool_result_error_code,
21
- type: :tool_search_tool_result_error
25
+ type: :tool_search_tool_result_error,
26
+ error_message: String?
22
27
  }
23
28
  end
24
29
  end
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: 1.44.0
4
+ version: 1.46.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-05-28 00:00:00.000000000 Z
11
+ date: 2026-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi