anthropic 2.1.0 → 2.2.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 +23 -0
- data/README.md +1 -1
- data/lib/anthropic/client.rb +8 -0
- data/lib/anthropic/helpers/bedrock/client.rb +5 -0
- data/lib/anthropic/helpers/bedrock/mantle_client.rb +5 -0
- data/lib/anthropic/helpers/stainless_helper_header.rb +1 -0
- data/lib/anthropic/helpers/threads/beta_message_thread.rb +635 -0
- data/lib/anthropic/helpers/tools/runner.rb +79 -11
- data/lib/anthropic/helpers/vertex/client.rb +5 -0
- data/lib/anthropic/internal/report_page_cursor.rb +2 -2
- data/lib/anthropic/internal/tracing.rb +2 -0
- data/lib/anthropic/models/anthropic_beta.rb +6 -0
- data/lib/anthropic/models/beta/beta_message_thread_param.rb +61 -0
- data/lib/anthropic/models/beta/beta_thread_continue_params.rb +29 -0
- data/lib/anthropic/models/beta/beta_thread_create_params.rb +21 -0
- data/lib/anthropic/models/beta/message_create_params.rb +13 -1
- data/lib/anthropic/models/beta/messages/batch_create_params.rb +13 -1
- data/lib/anthropic/models/beta/organization/analytics/beta_analytics_cost_group.rb +271 -0
- data/lib/anthropic/models/beta/organization/analytics/beta_analytics_cost_group_by.rb +40 -0
- data/lib/anthropic/models/beta/organization/analytics/beta_analytics_cost_item.rb +57 -0
- data/lib/anthropic/models/beta/organization/analytics/beta_analytics_cost_metrics.rb +57 -0
- data/lib/anthropic/models/beta/organization/analytics/beta_analytics_cost_order_by.rb +22 -0
- data/lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rb +247 -0
- data/lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group_by.rb +38 -0
- data/lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_item.rb +57 -0
- data/lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_metrics.rb +79 -0
- data/lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_order_by.rb +24 -0
- data/lib/anthropic/models/beta/organization/analytics/cost_list_params.rb +360 -0
- data/lib/anthropic/models/beta/organization/analytics/usage_list_params.rb +353 -0
- data/lib/anthropic/models/beta/organization/beta_analytics_actor.rb +81 -0
- data/lib/anthropic/models/beta/organization/beta_analytics_actor_type.rb +22 -0
- data/lib/anthropic/models/beta/organization/beta_analytics_api_actor.rb +27 -0
- data/lib/anthropic/models/beta/organization/beta_analytics_federated_actor.rb +42 -0
- data/lib/anthropic/models/beta/organization/beta_analytics_federated_actor_aws_provider.rb +35 -0
- data/lib/anthropic/models/beta/organization/beta_analytics_federated_actor_azure_provider.rb +27 -0
- data/lib/anthropic/models/beta/organization/beta_analytics_federated_actor_gcp_provider.rb +27 -0
- data/lib/anthropic/models/beta/organization/beta_analytics_federated_actor_oidc_provider.rb +27 -0
- data/lib/anthropic/models/beta/organization/beta_analytics_federated_actor_provider.rb +72 -0
- data/lib/anthropic/models/beta/organization/beta_analytics_grouped_cost_type.rb +21 -0
- data/lib/anthropic/models/beta/organization/beta_analytics_report_user_actor.rb +65 -0
- data/lib/anthropic/models/beta/organization/beta_analytics_service_account_actor.rb +27 -0
- data/lib/anthropic/models/beta/organization/beta_analytics_service_tier.rb +23 -0
- data/lib/anthropic/models/beta/organization/beta_analytics_speed.rb +19 -0
- data/lib/anthropic/models/beta/organization/beta_analytics_time_bucket_width.rb +20 -0
- data/lib/anthropic/models/beta/organization/beta_analytics_usage_cost_inference_geo.rb +19 -0
- data/lib/anthropic/models/beta/organization/beta_analytics_usage_cost_product_filter.rb +34 -0
- data/lib/anthropic/models/beta/organization/beta_analytics_usage_cost_sort_order.rb +19 -0
- data/lib/anthropic/models/beta/organization/beta_organization_rate_limit.rb +2 -1
- data/lib/anthropic/models/beta/organization/beta_plugin.rb +12 -6
- data/lib/anthropic/models/beta/organization/beta_plugin_content_scan.rb +11 -5
- data/lib/anthropic/models/beta/organization/workspaces/beta_workspace_rate_limit.rb +2 -1
- data/lib/anthropic/models/organization/organization_rate_limit.rb +2 -1
- data/lib/anthropic/models/organization/workspaces/workspace_rate_limit.rb +2 -1
- data/lib/anthropic/resources/beta/messages.rb +78 -4
- data/lib/anthropic/resources/beta/organization/analytics/cost.rb +175 -0
- data/lib/anthropic/resources/beta/organization/analytics/cost_report.rb +13 -6
- data/lib/anthropic/resources/beta/organization/analytics/usage.rb +176 -0
- data/lib/anthropic/resources/beta/organization/analytics/usage_report.rb +9 -2
- data/lib/anthropic/resources/beta/organization/analytics/user_cost_report.rb +12 -5
- data/lib/anthropic/resources/beta/organization/analytics/user_usage_report.rb +15 -8
- data/lib/anthropic/resources/beta/organization/analytics.rb +8 -0
- data/lib/anthropic/resources/beta/organization/plugin_marketplaces.rb +6 -6
- data/lib/anthropic/resources/beta/organization/plugins.rb +12 -9
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +36 -0
- data/rbi/anthropic/client.rbi +5 -0
- data/rbi/anthropic/helpers/bedrock/client.rbi +5 -0
- data/rbi/anthropic/helpers/bedrock/mantle_client.rbi +5 -0
- data/rbi/anthropic/helpers/threads/beta_message_thread.rbi +100 -0
- data/rbi/anthropic/helpers/vertex/client.rbi +5 -0
- data/rbi/anthropic/internal/tracing.rbi +4 -0
- data/rbi/anthropic/models/anthropic_beta.rbi +10 -0
- data/rbi/anthropic/models/beta/beta_message_thread_param.rbi +80 -0
- data/rbi/anthropic/models/beta/beta_thread_continue_params.rbi +43 -0
- data/rbi/anthropic/models/beta/beta_thread_create_params.rbi +31 -0
- data/rbi/anthropic/models/beta/message_create_params.rbi +37 -0
- data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +37 -0
- data/rbi/anthropic/models/beta/organization/analytics/beta_analytics_cost_group.rbi +439 -0
- data/rbi/anthropic/models/beta/organization/analytics/beta_analytics_cost_group_by.rbi +140 -0
- data/rbi/anthropic/models/beta/organization/analytics/beta_analytics_cost_item.rbi +110 -0
- data/rbi/anthropic/models/beta/organization/analytics/beta_analytics_cost_metrics.rbi +79 -0
- data/rbi/anthropic/models/beta/organization/analytics/beta_analytics_cost_order_by.rbi +50 -0
- data/rbi/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rbi +399 -0
- data/rbi/anthropic/models/beta/organization/analytics/beta_analytics_usage_group_by.rbi +130 -0
- data/rbi/anthropic/models/beta/organization/analytics/beta_analytics_usage_item.rbi +110 -0
- data/rbi/anthropic/models/beta/organization/analytics/beta_analytics_usage_metrics.rbi +120 -0
- data/rbi/anthropic/models/beta/organization/analytics/beta_analytics_usage_order_by.rbi +60 -0
- data/rbi/anthropic/models/beta/organization/analytics/cost_list_params.rbi +624 -0
- data/rbi/anthropic/models/beta/organization/analytics/usage_list_params.rbi +612 -0
- data/rbi/anthropic/models/beta/organization/beta_analytics_actor.rbi +134 -0
- data/rbi/anthropic/models/beta/organization/beta_analytics_actor_type.rbi +54 -0
- data/rbi/anthropic/models/beta/organization/beta_analytics_api_actor.rbi +40 -0
- data/rbi/anthropic/models/beta/organization/beta_analytics_federated_actor.rbi +75 -0
- data/rbi/anthropic/models/beta/organization/beta_analytics_federated_actor_aws_provider.rbi +54 -0
- data/rbi/anthropic/models/beta/organization/beta_analytics_federated_actor_azure_provider.rbi +42 -0
- data/rbi/anthropic/models/beta/organization/beta_analytics_federated_actor_gcp_provider.rbi +42 -0
- data/rbi/anthropic/models/beta/organization/beta_analytics_federated_actor_oidc_provider.rbi +42 -0
- data/rbi/anthropic/models/beta/organization/beta_analytics_federated_actor_provider.rbi +107 -0
- data/rbi/anthropic/models/beta/organization/beta_analytics_grouped_cost_type.rbi +53 -0
- data/rbi/anthropic/models/beta/organization/beta_analytics_report_user_actor.rbi +94 -0
- data/rbi/anthropic/models/beta/organization/beta_analytics_service_account_actor.rbi +42 -0
- data/rbi/anthropic/models/beta/organization/beta_analytics_service_tier.rbi +63 -0
- data/rbi/anthropic/models/beta/organization/beta_analytics_speed.rbi +40 -0
- data/rbi/anthropic/models/beta/organization/beta_analytics_time_bucket_width.rbi +48 -0
- data/rbi/anthropic/models/beta/organization/beta_analytics_usage_cost_inference_geo.rbi +43 -0
- data/rbi/anthropic/models/beta/organization/beta_analytics_usage_cost_product_filter.rbi +98 -0
- data/rbi/anthropic/models/beta/organization/beta_analytics_usage_cost_sort_order.rbi +43 -0
- data/rbi/anthropic/models/beta/organization/beta_organization_rate_limit.rbi +4 -2
- data/rbi/anthropic/models/beta/organization/beta_plugin.rbi +20 -8
- data/rbi/anthropic/models/beta/organization/beta_plugin_content_scan.rbi +15 -6
- data/rbi/anthropic/models/beta/organization/workspaces/beta_workspace_rate_limit.rbi +4 -2
- data/rbi/anthropic/models/organization/organization_rate_limit.rbi +4 -2
- data/rbi/anthropic/models/organization/workspaces/workspace_rate_limit.rbi +4 -2
- data/rbi/anthropic/resources/beta/messages.rbi +191 -0
- data/rbi/anthropic/resources/beta/organization/analytics/cost.rbi +245 -0
- data/rbi/anthropic/resources/beta/organization/analytics/cost_report.rbi +12 -5
- data/rbi/anthropic/resources/beta/organization/analytics/usage.rbi +240 -0
- data/rbi/anthropic/resources/beta/organization/analytics/usage_report.rbi +9 -2
- data/rbi/anthropic/resources/beta/organization/analytics/user_cost_report.rbi +12 -5
- data/rbi/anthropic/resources/beta/organization/analytics/user_usage_report.rbi +14 -7
- data/rbi/anthropic/resources/beta/organization/analytics.rbi +10 -0
- data/rbi/anthropic/resources/beta/organization/plugin_marketplaces.rbi +6 -6
- data/rbi/anthropic/resources/beta/organization/plugins.rbi +12 -9
- data/rbi/lib/anthropic/helpers/stainless_helper_header.rbi +2 -0
- data/sig/anthropic/client.rbs +2 -0
- data/sig/anthropic/helpers/bedrock/client.rbs +2 -0
- data/sig/anthropic/helpers/threads/beta_message_thread.rbs +40 -0
- data/sig/anthropic/helpers/tools/runner.rbs +40 -0
- data/sig/anthropic/helpers/vertex/client.rbs +2 -0
- data/sig/anthropic/internal/tracing.rbs +2 -0
- data/sig/anthropic/models/anthropic_beta.rbs +4 -0
- data/sig/anthropic/models/beta/beta_message_thread_param.rbs +40 -0
- data/sig/anthropic/models/beta/beta_thread_continue_params.rbs +20 -0
- data/sig/anthropic/models/beta/beta_thread_create_params.rbs +17 -0
- data/sig/anthropic/models/beta/message_create_params.rbs +5 -0
- data/sig/anthropic/models/beta/messages/batch_create_params.rbs +5 -0
- data/sig/anthropic/models/beta/organization/analytics/beta_analytics_cost_group.rbs +126 -0
- data/sig/anthropic/models/beta/organization/analytics/beta_analytics_cost_group_by.rbs +60 -0
- data/sig/anthropic/models/beta/organization/analytics/beta_analytics_cost_item.rbs +41 -0
- data/sig/anthropic/models/beta/organization/analytics/beta_analytics_cost_metrics.rbs +41 -0
- data/sig/anthropic/models/beta/organization/analytics/beta_analytics_cost_order_by.rbs +21 -0
- data/sig/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rbs +116 -0
- data/sig/anthropic/models/beta/organization/analytics/beta_analytics_usage_group_by.rbs +56 -0
- data/sig/anthropic/models/beta/organization/analytics/beta_analytics_usage_item.rbs +41 -0
- data/sig/anthropic/models/beta/organization/analytics/beta_analytics_usage_metrics.rbs +56 -0
- data/sig/anthropic/models/beta/organization/analytics/beta_analytics_usage_order_by.rbs +28 -0
- data/sig/anthropic/models/beta/organization/analytics/cost_list_params.rbs +188 -0
- data/sig/anthropic/models/beta/organization/analytics/usage_list_params.rbs +188 -0
- data/sig/anthropic/models/beta/organization/beta_analytics_actor.rbs +67 -0
- data/sig/anthropic/models/beta/organization/beta_analytics_actor_type.rbs +21 -0
- data/sig/anthropic/models/beta/organization/beta_analytics_api_actor.rbs +19 -0
- data/sig/anthropic/models/beta/organization/beta_analytics_federated_actor.rbs +34 -0
- data/sig/anthropic/models/beta/organization/beta_analytics_federated_actor_aws_provider.rbs +30 -0
- data/sig/anthropic/models/beta/organization/beta_analytics_federated_actor_azure_provider.rbs +20 -0
- data/sig/anthropic/models/beta/organization/beta_analytics_federated_actor_gcp_provider.rbs +20 -0
- data/sig/anthropic/models/beta/organization/beta_analytics_federated_actor_oidc_provider.rbs +20 -0
- data/sig/anthropic/models/beta/organization/beta_analytics_federated_actor_provider.rbs +60 -0
- data/sig/anthropic/models/beta/organization/beta_analytics_grouped_cost_type.rbs +21 -0
- data/sig/anthropic/models/beta/organization/beta_analytics_report_user_actor.rbs +44 -0
- data/sig/anthropic/models/beta/organization/beta_analytics_service_account_actor.rbs +26 -0
- data/sig/anthropic/models/beta/organization/beta_analytics_service_tier.rbs +28 -0
- data/sig/anthropic/models/beta/organization/beta_analytics_speed.rbs +18 -0
- data/sig/anthropic/models/beta/organization/beta_analytics_time_bucket_width.rbs +19 -0
- data/sig/anthropic/models/beta/organization/beta_analytics_usage_cost_inference_geo.rbs +18 -0
- data/sig/anthropic/models/beta/organization/beta_analytics_usage_cost_product_filter.rbs +40 -0
- data/sig/anthropic/models/beta/organization/beta_analytics_usage_cost_sort_order.rbs +18 -0
- data/sig/anthropic/resources/beta/messages.rbs +33 -0
- data/sig/anthropic/resources/beta/organization/analytics/cost.rbs +46 -0
- data/sig/anthropic/resources/beta/organization/analytics/usage.rbs +46 -0
- data/sig/anthropic/resources/beta/organization/analytics.rbs +4 -0
- metadata +111 -2
|
@@ -33,12 +33,13 @@ module Anthropic
|
|
|
33
33
|
|
|
34
34
|
# @param params [Anthropic::Models::Beta::MessageCreateParams]
|
|
35
35
|
#
|
|
36
|
-
# @raise [ArgumentError] if `compaction` is set, if the messages are replaced while the
|
|
36
|
+
# @raise [ArgumentError] if `compaction` or `thread` is set, if the messages are replaced while the
|
|
37
37
|
# conversation is being compacted, or if a compaction edit is added while a compaction is due
|
|
38
38
|
def params=(params)
|
|
39
39
|
# The runner reads and writes its params as a symbol-keyed hash.
|
|
40
40
|
params = params.to_h.transform_keys(&:to_sym)
|
|
41
41
|
reject_compaction_param!(params)
|
|
42
|
+
reject_thread_param!(params)
|
|
42
43
|
if @compaction_phase == :in_flight && !params[:messages].equal?(current_messages)
|
|
43
44
|
raise ArgumentError.new(
|
|
44
45
|
"Message params can't be changed while the conversation is being compacted, because the " \
|
|
@@ -125,8 +126,7 @@ module Anthropic
|
|
|
125
126
|
def next_message
|
|
126
127
|
message = nil
|
|
127
128
|
fold do |params|
|
|
128
|
-
message =
|
|
129
|
-
@client.beta.messages.create(with_helper_header(params, StainlessHelperHeader::BETA_TOOL_RUNNER))
|
|
129
|
+
message = create_message(params)
|
|
130
130
|
[true, message]
|
|
131
131
|
end
|
|
132
132
|
message
|
|
@@ -137,15 +137,14 @@ module Anthropic
|
|
|
137
137
|
messages = []
|
|
138
138
|
# Not `each_streaming`: an error from this block is the runner's, not the application's.
|
|
139
139
|
fold do |params|
|
|
140
|
-
stream =
|
|
141
|
-
@client.beta.messages.stream(with_helper_header(params, StainlessHelperHeader::BETA_TOOL_RUNNER))
|
|
140
|
+
stream = stream_message(params)
|
|
142
141
|
message = stream.accumulated_message
|
|
143
142
|
messages << message
|
|
144
143
|
[false, message]
|
|
145
144
|
ensure
|
|
146
145
|
stream&.close
|
|
147
146
|
end
|
|
148
|
-
messages
|
|
147
|
+
messages.compact
|
|
149
148
|
end
|
|
150
149
|
|
|
151
150
|
# @yieldparam [Anthropic::Models::BetaMessage]
|
|
@@ -155,8 +154,7 @@ module Anthropic
|
|
|
155
154
|
end
|
|
156
155
|
|
|
157
156
|
fold do |params|
|
|
158
|
-
message =
|
|
159
|
-
@client.beta.messages.create(with_helper_header(params, StainlessHelperHeader::BETA_TOOL_RUNNER))
|
|
157
|
+
message = create_message(params)
|
|
160
158
|
in_app { blk.call(message) }
|
|
161
159
|
[false, message]
|
|
162
160
|
end
|
|
@@ -169,8 +167,7 @@ module Anthropic
|
|
|
169
167
|
end
|
|
170
168
|
|
|
171
169
|
fold do |params|
|
|
172
|
-
stream =
|
|
173
|
-
@client.beta.messages.stream(with_helper_header(params, StainlessHelperHeader::BETA_TOOL_RUNNER))
|
|
170
|
+
stream = stream_message(params)
|
|
174
171
|
in_app { blk.call(stream) }
|
|
175
172
|
[false, stream.accumulated_message]
|
|
176
173
|
ensure
|
|
@@ -178,6 +175,43 @@ module Anthropic
|
|
|
178
175
|
end
|
|
179
176
|
end
|
|
180
177
|
|
|
178
|
+
# @api private
|
|
179
|
+
#
|
|
180
|
+
# @param params [Anthropic::Models::Beta::MessageCreateParams]
|
|
181
|
+
#
|
|
182
|
+
# @return [Anthropic::Models::BetaMessage]
|
|
183
|
+
private def create_message(params)
|
|
184
|
+
request = with_helper_header(params, StainlessHelperHeader::BETA_TOOL_RUNNER)
|
|
185
|
+
return @client.beta.messages.create(request) if @thread.nil?
|
|
186
|
+
|
|
187
|
+
@thread.send_message(**request.slice(:request_options))
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# @api private
|
|
191
|
+
#
|
|
192
|
+
# @param params [Anthropic::Models::Beta::MessageCreateParams]
|
|
193
|
+
#
|
|
194
|
+
# @return [Anthropic::Streaming::MessageStream]
|
|
195
|
+
private def stream_message(params)
|
|
196
|
+
request = with_helper_header(params, StainlessHelperHeader::BETA_TOOL_RUNNER)
|
|
197
|
+
return @client.beta.messages.stream(request) if @thread.nil?
|
|
198
|
+
|
|
199
|
+
@thread.stream(**request.slice(:request_options))
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# @api private
|
|
203
|
+
#
|
|
204
|
+
# The thread sends what `params` adds to the messages that the API holds. What was appended
|
|
205
|
+
# to the thread itself since it was last given the messages joins them first.
|
|
206
|
+
#
|
|
207
|
+
# @param params [Anthropic::Models::Beta::MessageCreateParams]
|
|
208
|
+
private def give_thread(params)
|
|
209
|
+
appended = @thread.appended_after(@given_count)
|
|
210
|
+
current_messages.concat(appended) unless appended.empty?
|
|
211
|
+
@thread.replace_params(params.to_h.except(:stream, :thread))
|
|
212
|
+
@given_count = current_messages.length
|
|
213
|
+
end
|
|
214
|
+
|
|
181
215
|
# @api private
|
|
182
216
|
#
|
|
183
217
|
# Runs the runner's own code with the tool runner span current.
|
|
@@ -255,6 +289,7 @@ module Anthropic
|
|
|
255
289
|
break if finished?
|
|
256
290
|
return if @max_iterations && @iteration_count >= @max_iterations
|
|
257
291
|
|
|
292
|
+
reject_thread_param!(params)
|
|
258
293
|
send_pending_tool_changes
|
|
259
294
|
|
|
260
295
|
if @pending_compaction && !turn_paused?
|
|
@@ -265,8 +300,13 @@ module Anthropic
|
|
|
265
300
|
|
|
266
301
|
reject_compaction_param!(params)
|
|
267
302
|
tools = params[:tools].to_a.grep(Anthropic::Helpers::Tools::BaseTool)
|
|
303
|
+
# Checked first: messages that drop the last reply start a new thread, which takes any change.
|
|
304
|
+
@thread&.check_create_only_fields!(params.to_h)
|
|
305
|
+
give_thread(params) unless @thread.nil?
|
|
268
306
|
messages = current_messages
|
|
269
307
|
brk, response = blk.call(params)
|
|
308
|
+
# A stream that ended before `message_start` has no message.
|
|
309
|
+
return if @thread && response.nil?
|
|
270
310
|
|
|
271
311
|
@last_response = response
|
|
272
312
|
|
|
@@ -281,6 +321,8 @@ module Anthropic
|
|
|
281
321
|
end
|
|
282
322
|
|
|
283
323
|
tool_uses = next_step == :run_tools ? client_tool_uses(response) : []
|
|
324
|
+
# No tool runs for a turn that the thread would refuse to send.
|
|
325
|
+
@thread&.check_create_only_fields!(params.to_h)
|
|
284
326
|
|
|
285
327
|
# A `tool_removal` block only hints the model, so a call to a withdrawn tool can still
|
|
286
328
|
# arrive; a name missing from this set routes down the same "not found" path as an
|
|
@@ -337,6 +379,8 @@ module Anthropic
|
|
|
337
379
|
messages << assistant_turn(response)
|
|
338
380
|
messages << {role: :user, content: mapped} unless mapped.empty?
|
|
339
381
|
adopt_container(response)
|
|
382
|
+
# The run can end here, and the thread goes on from the results.
|
|
383
|
+
give_thread(params) unless @thread.nil?
|
|
340
384
|
|
|
341
385
|
@iteration_count += 1
|
|
342
386
|
|
|
@@ -404,6 +448,19 @@ module Anthropic
|
|
|
404
448
|
)
|
|
405
449
|
end
|
|
406
450
|
|
|
451
|
+
# @api private
|
|
452
|
+
#
|
|
453
|
+
# @param params [Anthropic::Models::Beta::MessageCreateParams]
|
|
454
|
+
private def reject_thread_param!(params)
|
|
455
|
+
return if params[:thread].nil?
|
|
456
|
+
|
|
457
|
+
raise ArgumentError.new(
|
|
458
|
+
"`thread` cannot be set in the params of a tool runner, got #{params[:thread].inspect}. " \
|
|
459
|
+
"The runner sets `thread` for each request itself. To run without a message thread, " \
|
|
460
|
+
"create the runner with `thread: false`."
|
|
461
|
+
)
|
|
462
|
+
end
|
|
463
|
+
|
|
407
464
|
# @api private
|
|
408
465
|
#
|
|
409
466
|
# @param params [Anthropic::Models::Beta::MessageCreateParams]
|
|
@@ -439,6 +496,10 @@ module Anthropic
|
|
|
439
496
|
request = {**without_compaction_incompatible_params(params), compaction:}
|
|
440
497
|
@pending_compaction = nil
|
|
441
498
|
@compaction_phase = :in_flight
|
|
499
|
+
unless @thread.nil?
|
|
500
|
+
@thread.start_new_thread
|
|
501
|
+
give_thread(request)
|
|
502
|
+
end
|
|
442
503
|
|
|
443
504
|
brk, response = blk.call(request)
|
|
444
505
|
|
|
@@ -455,6 +516,8 @@ module Anthropic
|
|
|
455
516
|
brk
|
|
456
517
|
ensure
|
|
457
518
|
@compaction_phase = nil if @compaction_phase == :in_flight
|
|
519
|
+
# The thread goes on with the runner's params, not with those of the compaction request.
|
|
520
|
+
give_thread(params) unless @thread.nil?
|
|
458
521
|
end
|
|
459
522
|
|
|
460
523
|
# @api private
|
|
@@ -665,8 +728,13 @@ module Anthropic
|
|
|
665
728
|
# @param params [Anthropic::Models::Beta::MessageCreateParams]
|
|
666
729
|
#
|
|
667
730
|
# @param max_iterations [Integer, nil]
|
|
668
|
-
|
|
731
|
+
#
|
|
732
|
+
# @param thread [Anthropic::Helpers::Threads::BetaMessageThread, nil] sends the requests, each
|
|
733
|
+
# with the whole history when `nil`
|
|
734
|
+
def initialize(client, params:, max_iterations: nil, thread: nil)
|
|
669
735
|
@client = client
|
|
736
|
+
@thread = thread
|
|
737
|
+
@given_count = thread&.messages.to_a.length
|
|
670
738
|
@params = params.to_h
|
|
671
739
|
reject_compaction_param!(@params)
|
|
672
740
|
@finished = false
|
|
@@ -131,6 +131,11 @@ module Anthropic
|
|
|
131
131
|
# @return [Boolean]
|
|
132
132
|
private def resolve_default_credentials? = false
|
|
133
133
|
|
|
134
|
+
# @api private
|
|
135
|
+
#
|
|
136
|
+
# @return [Boolean]
|
|
137
|
+
def message_threads? = false
|
|
138
|
+
|
|
134
139
|
def files
|
|
135
140
|
raise NotImplementedError, "Files are not supported on Vertex."
|
|
136
141
|
end
|
|
@@ -10,8 +10,8 @@ module Anthropic
|
|
|
10
10
|
# end
|
|
11
11
|
#
|
|
12
12
|
# @example
|
|
13
|
-
# report_page_cursor.auto_paging_each do |
|
|
14
|
-
# puts(
|
|
13
|
+
# report_page_cursor.auto_paging_each do |usage|
|
|
14
|
+
# puts(usage)
|
|
15
15
|
# end
|
|
16
16
|
class ReportPageCursor
|
|
17
17
|
include Anthropic::Internal::Type::BasePage
|
|
@@ -281,6 +281,8 @@ module Anthropic
|
|
|
281
281
|
ORGANIZATION_ANALYTICS_PLUGINS_LIST = "anthropic.organization.analytics.plugins.list"
|
|
282
282
|
ORGANIZATION_ANALYTICS_SKILLS_LIST = "anthropic.organization.analytics.skills.list"
|
|
283
283
|
ORGANIZATION_ANALYTICS_ARTIFACTS_LIST = "anthropic.organization.analytics.artifacts.list"
|
|
284
|
+
ORGANIZATION_ANALYTICS_USAGE_LIST = "anthropic.organization.analytics.usage.list"
|
|
285
|
+
ORGANIZATION_ANALYTICS_COST_LIST = "anthropic.organization.analytics.cost.list"
|
|
284
286
|
ORGANIZATION_ANALYTICS_USAGE_REPORT_LIST = "anthropic.organization.analytics.usage_report.list"
|
|
285
287
|
ORGANIZATION_ANALYTICS_USER_USAGE_REPORT_LIST = "anthropic.organization.analytics.user_usage_report.list"
|
|
286
288
|
ORGANIZATION_ANALYTICS_COST_REPORT_LIST = "anthropic.organization.analytics.cost_report.list"
|
|
@@ -109,6 +109,10 @@ module Anthropic
|
|
|
109
109
|
|
|
110
110
|
variant const: -> { Anthropic::Models::AnthropicBeta::WEBHOOKS_2026_10_07 }
|
|
111
111
|
|
|
112
|
+
variant const: -> { Anthropic::Models::AnthropicBeta::MESSAGE_THREADS_2026_08_12 }
|
|
113
|
+
|
|
114
|
+
variant const: -> { Anthropic::Models::AnthropicBeta::ANALYTICS_USAGE_COST_2026_08_24 }
|
|
115
|
+
|
|
112
116
|
variant String
|
|
113
117
|
|
|
114
118
|
# @!method self.variants
|
|
@@ -172,6 +176,8 @@ module Anthropic
|
|
|
172
176
|
SPEND_LIMIT_READS_2026_09_26 = :"spend-limit-reads-2026-09-26"
|
|
173
177
|
TELEMETRY_DESTINATIONS_2026_08_11 = :"telemetry-destinations-2026-08-11"
|
|
174
178
|
WEBHOOKS_2026_10_07 = :"webhooks-2026-10-07"
|
|
179
|
+
MESSAGE_THREADS_2026_08_12 = :"message-threads-2026-08-12"
|
|
180
|
+
ANALYTICS_USAGE_COST_2026_08_24 = :"analytics-usage-cost-2026-08-24"
|
|
175
181
|
|
|
176
182
|
# @!endgroup
|
|
177
183
|
end
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
# Server-held conversation state (a Thread). `{"type": "create"}` asks the server
|
|
7
|
+
# to hold this conversation's state under the response's `id`;
|
|
8
|
+
# `{"type": "continue", "previous_message_id": ...}` resumes from a previous
|
|
9
|
+
# response so only the new turn's messages are sent. The response shape is
|
|
10
|
+
# unchanged.
|
|
11
|
+
module BetaMessageThreadParam
|
|
12
|
+
extend Anthropic::Internal::Type::Union
|
|
13
|
+
|
|
14
|
+
discriminator :type
|
|
15
|
+
|
|
16
|
+
# Start holding conversation state under this response's ``id``.
|
|
17
|
+
variant :create, -> { Anthropic::Beta::BetaThreadCreateParams }
|
|
18
|
+
|
|
19
|
+
# Resume from the response named by ``previous_message_id``.
|
|
20
|
+
variant :continue, -> { Anthropic::Beta::BetaThreadContinueParams }
|
|
21
|
+
|
|
22
|
+
module Type
|
|
23
|
+
extend Anthropic::Internal::Type::Enum
|
|
24
|
+
|
|
25
|
+
CREATE = :create
|
|
26
|
+
CONTINUE = :continue
|
|
27
|
+
|
|
28
|
+
# @!method self.values
|
|
29
|
+
# @return [Array<Symbol>]
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# @!method self.variants
|
|
33
|
+
# @return [Array(Anthropic::Models::Beta::BetaThreadCreateParams, Anthropic::Models::Beta::BetaThreadContinueParams)]
|
|
34
|
+
|
|
35
|
+
# Creates a new instance of the variant class whose `type` matches the given
|
|
36
|
+
# value, passing the remaining arguments to its constructor.
|
|
37
|
+
#
|
|
38
|
+
# @param type [Symbol, Anthropic::Models::Beta::BetaMessageThreadParam::Type, String]
|
|
39
|
+
#
|
|
40
|
+
# @param args [Hash{Symbol=>Object}] Attributes for the chosen variant.
|
|
41
|
+
#
|
|
42
|
+
# @option args [String] :previous_message_id The `id` of the previous response in this Thread.
|
|
43
|
+
#
|
|
44
|
+
# @raise [ArgumentError]
|
|
45
|
+
# @return [Anthropic::Models::Beta::BetaThreadCreateParams, Anthropic::Models::Beta::BetaThreadContinueParams]
|
|
46
|
+
def self.new(type:, **args)
|
|
47
|
+
case type.to_sym
|
|
48
|
+
when :create
|
|
49
|
+
Anthropic::Beta::BetaThreadCreateParams.new(**args)
|
|
50
|
+
when :continue
|
|
51
|
+
Anthropic::Beta::BetaThreadContinueParams.new(**args)
|
|
52
|
+
else
|
|
53
|
+
raise ArgumentError, "unknown type: #{type}"
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
BetaMessageThreadParam = Beta::BetaMessageThreadParam
|
|
60
|
+
end
|
|
61
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaThreadContinueParams < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute previous_message_id
|
|
8
|
+
# The `id` of the previous response in this Thread.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :previous_message_id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute type
|
|
14
|
+
#
|
|
15
|
+
# @return [Symbol, :continue]
|
|
16
|
+
required :type, const: :continue
|
|
17
|
+
|
|
18
|
+
# @!method initialize(previous_message_id:, type: :continue)
|
|
19
|
+
# Resume from the response named by `previous_message_id`.
|
|
20
|
+
#
|
|
21
|
+
# @param previous_message_id [String] The `id` of the previous response in this Thread.
|
|
22
|
+
#
|
|
23
|
+
# @param type [Symbol, :continue]
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
BetaThreadContinueParams = Beta::BetaThreadContinueParams
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaThreadCreateParams < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute type
|
|
8
|
+
#
|
|
9
|
+
# @return [Symbol, :create]
|
|
10
|
+
required :type, const: :create
|
|
11
|
+
|
|
12
|
+
# @!method initialize(type: :create)
|
|
13
|
+
# Start holding conversation state under this response's `id`.
|
|
14
|
+
#
|
|
15
|
+
# @param type [Symbol, :create]
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
BetaThreadCreateParams = Beta::BetaThreadCreateParams
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -293,6 +293,16 @@ module Anthropic
|
|
|
293
293
|
# @return [Anthropic::Models::Beta::BetaThinkingConfigEnabled, Anthropic::Models::Beta::BetaThinkingConfigDisabled, Anthropic::Models::Beta::BetaThinkingConfigBetweenTools, Anthropic::Models::Beta::BetaThinkingConfigAdaptive, nil]
|
|
294
294
|
optional :thinking, union: -> { Anthropic::Beta::BetaThinkingConfigParam }
|
|
295
295
|
|
|
296
|
+
# @!attribute thread
|
|
297
|
+
# Server-held conversation state (a Thread). `{"type": "create"}` asks the server
|
|
298
|
+
# to hold this conversation's state under the response's `id`;
|
|
299
|
+
# `{"type": "continue", "previous_message_id": ...}` resumes from a previous
|
|
300
|
+
# response so only the new turn's messages are sent. The response shape is
|
|
301
|
+
# unchanged.
|
|
302
|
+
#
|
|
303
|
+
# @return [Anthropic::Models::Beta::BetaThreadCreateParams, Anthropic::Models::Beta::BetaThreadContinueParams, nil]
|
|
304
|
+
optional :thread, union: -> { Anthropic::Beta::BetaMessageThreadParam }, nil?: true
|
|
305
|
+
|
|
296
306
|
# @!attribute tool_choice
|
|
297
307
|
# How the model should use the provided tools. The model can use a specific tool,
|
|
298
308
|
# any available tool, decide by itself, or not use tools at all.
|
|
@@ -406,7 +416,7 @@ module Anthropic
|
|
|
406
416
|
# @return [String, nil]
|
|
407
417
|
optional :workspace_id, String
|
|
408
418
|
|
|
409
|
-
# @!method initialize(max_tokens:, messages:, model:, cache_control: nil, compaction: nil, container: nil, context_management: nil, diagnostics: nil, fallback_credit_token: nil, fallbacks: nil, inference_geo: nil, mcp_servers: nil, metadata: nil, output_config: nil, output_format: nil, service_tier: nil, speed: nil, stop_sequences: nil, system_: nil, thinking: nil, tool_choice: nil, tools: nil, betas: nil, user_profile_id: nil, workspace_id: nil, request_options: {})
|
|
419
|
+
# @!method initialize(max_tokens:, messages:, model:, cache_control: nil, compaction: nil, container: nil, context_management: nil, diagnostics: nil, fallback_credit_token: nil, fallbacks: nil, inference_geo: nil, mcp_servers: nil, metadata: nil, output_config: nil, output_format: nil, service_tier: nil, speed: nil, stop_sequences: nil, system_: nil, thinking: nil, thread: nil, tool_choice: nil, tools: nil, betas: nil, user_profile_id: nil, workspace_id: nil, request_options: {})
|
|
410
420
|
# Some parameter documentations has been truncated, see
|
|
411
421
|
# {Anthropic::Models::Beta::MessageCreateParams} for more details.
|
|
412
422
|
#
|
|
@@ -450,6 +460,8 @@ module Anthropic
|
|
|
450
460
|
#
|
|
451
461
|
# @param thinking [Anthropic::Models::Beta::BetaThinkingConfigEnabled, Anthropic::Models::Beta::BetaThinkingConfigDisabled, Anthropic::Models::Beta::BetaThinkingConfigBetweenTools, Anthropic::Models::Beta::BetaThinkingConfigAdaptive] Configuration for Claude's thinking.
|
|
452
462
|
#
|
|
463
|
+
# @param thread [Anthropic::Models::Beta::BetaThreadCreateParams, Anthropic::Models::Beta::BetaThreadContinueParams, nil] Server-held conversation state (a Thread). `{"type": "create"}` asks the server
|
|
464
|
+
#
|
|
453
465
|
# @param tool_choice [Anthropic::Models::Beta::BetaToolChoiceAuto, Anthropic::Models::Beta::BetaToolChoiceAny, Anthropic::Models::Beta::BetaToolChoiceTool, Anthropic::Models::Beta::BetaToolChoiceNone] How the model should use the provided tools. The model can use a specific tool,
|
|
454
466
|
#
|
|
455
467
|
# @param tools [Array<Anthropic::Models::Beta::BetaTool, Anthropic::Models::Beta::BetaToolBash20241022, Anthropic::Models::Beta::BetaToolBash20250124, Anthropic::Models::Beta::BetaCodeExecutionTool20250522, Anthropic::Models::Beta::BetaCodeExecutionTool20250825, Anthropic::Models::Beta::BetaCodeExecutionTool20260120, Anthropic::Models::Beta::BetaCodeExecutionTool20260521, Anthropic::Models::Beta::BetaBrowserToolset20260801, Anthropic::Models::Beta::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaMemoryTool20250818, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolComputerUse20251124, Anthropic::Models::Beta::BetaComputerToolset20260801, Anthropic::Models::Beta::BetaToolTextEditor20250124, Anthropic::Models::Beta::BetaToolTextEditor20250429, Anthropic::Models::Beta::BetaToolTextEditor20250728, Anthropic::Models::Beta::BetaWebSearchTool20250305, Anthropic::Models::Beta::BetaWebFetchTool20250910, Anthropic::Models::Beta::BetaWebSearchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260309, Anthropic::Models::Beta::BetaWebSearchTool20260318, Anthropic::Models::Beta::BetaWebFetchTool20260318, Anthropic::Models::Beta::BetaAdvisorTool20260301, Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119, Anthropic::Models::Beta::BetaToolSearchToolRegex20251119, Anthropic::Models::Beta::BetaMCPToolset>] Definitions of tools that the model may use.
|
|
@@ -393,6 +393,16 @@ module Anthropic
|
|
|
393
393
|
# @return [Anthropic::Models::Beta::BetaThinkingConfigEnabled, Anthropic::Models::Beta::BetaThinkingConfigDisabled, Anthropic::Models::Beta::BetaThinkingConfigBetweenTools, Anthropic::Models::Beta::BetaThinkingConfigAdaptive, nil]
|
|
394
394
|
optional :thinking, union: -> { Anthropic::Beta::BetaThinkingConfigParam }
|
|
395
395
|
|
|
396
|
+
# @!attribute thread
|
|
397
|
+
# Server-held conversation state (a Thread). `{"type": "create"}` asks the server
|
|
398
|
+
# to hold this conversation's state under the response's `id`;
|
|
399
|
+
# `{"type": "continue", "previous_message_id": ...}` resumes from a previous
|
|
400
|
+
# response so only the new turn's messages are sent. The response shape is
|
|
401
|
+
# unchanged.
|
|
402
|
+
#
|
|
403
|
+
# @return [Anthropic::Models::Beta::BetaThreadCreateParams, Anthropic::Models::Beta::BetaThreadContinueParams, nil]
|
|
404
|
+
optional :thread, union: -> { Anthropic::Beta::BetaMessageThreadParam }, nil?: true
|
|
405
|
+
|
|
396
406
|
# @!attribute tool_choice
|
|
397
407
|
# How the model should use the provided tools. The model can use a specific tool,
|
|
398
408
|
# any available tool, decide by itself, or not use tools at all.
|
|
@@ -482,7 +492,7 @@ module Anthropic
|
|
|
482
492
|
# @return [Array<Anthropic::Models::Beta::BetaTool, Anthropic::Models::Beta::BetaToolBash20241022, Anthropic::Models::Beta::BetaToolBash20250124, Anthropic::Models::Beta::BetaCodeExecutionTool20250522, Anthropic::Models::Beta::BetaCodeExecutionTool20250825, Anthropic::Models::Beta::BetaCodeExecutionTool20260120, Anthropic::Models::Beta::BetaCodeExecutionTool20260521, Anthropic::Models::Beta::BetaBrowserToolset20260801, Anthropic::Models::Beta::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaMemoryTool20250818, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolComputerUse20251124, Anthropic::Models::Beta::BetaComputerToolset20260801, Anthropic::Models::Beta::BetaToolTextEditor20250124, Anthropic::Models::Beta::BetaToolTextEditor20250429, Anthropic::Models::Beta::BetaToolTextEditor20250728, Anthropic::Models::Beta::BetaWebSearchTool20250305, Anthropic::Models::Beta::BetaWebFetchTool20250910, Anthropic::Models::Beta::BetaWebSearchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260309, Anthropic::Models::Beta::BetaWebSearchTool20260318, Anthropic::Models::Beta::BetaWebFetchTool20260318, Anthropic::Models::Beta::BetaAdvisorTool20260301, Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119, Anthropic::Models::Beta::BetaToolSearchToolRegex20251119, Anthropic::Models::Beta::BetaMCPToolset>, nil]
|
|
483
493
|
optional :tools, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::BetaToolUnion] }
|
|
484
494
|
|
|
485
|
-
# @!method initialize(max_tokens:, messages:, model:, cache_control: nil, compaction: nil, container: nil, context_management: nil, diagnostics: nil, fallback_credit_token: nil, fallbacks: nil, inference_geo: nil, mcp_servers: nil, metadata: nil, output_config: nil, output_format: nil, service_tier: nil, speed: nil, stop_sequences: nil, stream: nil, system_: nil, thinking: nil, tool_choice: nil, tools: nil)
|
|
495
|
+
# @!method initialize(max_tokens:, messages:, model:, cache_control: nil, compaction: nil, container: nil, context_management: nil, diagnostics: nil, fallback_credit_token: nil, fallbacks: nil, inference_geo: nil, mcp_servers: nil, metadata: nil, output_config: nil, output_format: nil, service_tier: nil, speed: nil, stop_sequences: nil, stream: nil, system_: nil, thinking: nil, thread: nil, tool_choice: nil, tools: nil)
|
|
486
496
|
# Messages API creation parameters for the individual request.
|
|
487
497
|
#
|
|
488
498
|
# See the
|
|
@@ -535,6 +545,8 @@ module Anthropic
|
|
|
535
545
|
#
|
|
536
546
|
# @param thinking [Anthropic::Models::Beta::BetaThinkingConfigEnabled, Anthropic::Models::Beta::BetaThinkingConfigDisabled, Anthropic::Models::Beta::BetaThinkingConfigBetweenTools, Anthropic::Models::Beta::BetaThinkingConfigAdaptive] Configuration for Claude's thinking.
|
|
537
547
|
#
|
|
548
|
+
# @param thread [Anthropic::Models::Beta::BetaThreadCreateParams, Anthropic::Models::Beta::BetaThreadContinueParams, nil] Server-held conversation state (a Thread). `{"type": "create"}` asks the server
|
|
549
|
+
#
|
|
538
550
|
# @param tool_choice [Anthropic::Models::Beta::BetaToolChoiceAuto, Anthropic::Models::Beta::BetaToolChoiceAny, Anthropic::Models::Beta::BetaToolChoiceTool, Anthropic::Models::Beta::BetaToolChoiceNone] How the model should use the provided tools. The model can use a specific tool,
|
|
539
551
|
#
|
|
540
552
|
# @param tools [Array<Anthropic::Models::Beta::BetaTool, Anthropic::Models::Beta::BetaToolBash20241022, Anthropic::Models::Beta::BetaToolBash20250124, Anthropic::Models::Beta::BetaCodeExecutionTool20250522, Anthropic::Models::Beta::BetaCodeExecutionTool20250825, Anthropic::Models::Beta::BetaCodeExecutionTool20260120, Anthropic::Models::Beta::BetaCodeExecutionTool20260521, Anthropic::Models::Beta::BetaBrowserToolset20260801, Anthropic::Models::Beta::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaMemoryTool20250818, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolComputerUse20251124, Anthropic::Models::Beta::BetaComputerToolset20260801, Anthropic::Models::Beta::BetaToolTextEditor20250124, Anthropic::Models::Beta::BetaToolTextEditor20250429, Anthropic::Models::Beta::BetaToolTextEditor20250728, Anthropic::Models::Beta::BetaWebSearchTool20250305, Anthropic::Models::Beta::BetaWebFetchTool20250910, Anthropic::Models::Beta::BetaWebSearchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260209, Anthropic::Models::Beta::BetaWebFetchTool20260309, Anthropic::Models::Beta::BetaWebSearchTool20260318, Anthropic::Models::Beta::BetaWebFetchTool20260318, Anthropic::Models::Beta::BetaAdvisorTool20260301, Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119, Anthropic::Models::Beta::BetaToolSearchToolRegex20251119, Anthropic::Models::Beta::BetaMCPToolset>] Definitions of tools that the model may use.
|