anthropic 1.15.2 → 1.16.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 +13 -0
- data/README.md +10 -10
- data/lib/anthropic/helpers/tools/compaction_control.rb +105 -0
- data/lib/anthropic/helpers/tools/runner.rb +126 -13
- data/lib/anthropic/models/anthropic_beta.rb +3 -0
- data/lib/anthropic/models/beta/beta_code_execution_tool_20250522.rb +28 -1
- data/lib/anthropic/models/beta/beta_code_execution_tool_20250825.rb +28 -1
- data/lib/anthropic/models/beta/beta_content_block.rb +3 -1
- data/lib/anthropic/models/beta/beta_content_block_param.rb +3 -1
- data/lib/anthropic/models/beta/beta_direct_caller.rb +21 -0
- data/lib/anthropic/models/beta/beta_mcp_tool_config.rb +27 -0
- data/lib/anthropic/models/beta/beta_mcp_tool_default_config.rb +27 -0
- data/lib/anthropic/models/beta/beta_mcp_toolset.rb +58 -0
- data/lib/anthropic/models/beta/beta_memory_tool_20250818.rb +36 -1
- data/lib/anthropic/models/beta/beta_message.rb +2 -2
- data/lib/anthropic/models/beta/beta_message_param.rb +3 -3
- data/lib/anthropic/models/beta/beta_output_config.rb +34 -0
- data/lib/anthropic/models/beta/beta_raw_content_block_start_event.rb +5 -3
- data/lib/anthropic/models/beta/beta_server_tool_caller.rb +27 -0
- data/lib/anthropic/models/beta/beta_server_tool_use_block.rb +32 -1
- data/lib/anthropic/models/beta/beta_server_tool_use_block_param.rb +33 -1
- data/lib/anthropic/models/beta/beta_tool.rb +36 -1
- data/lib/anthropic/models/beta/beta_tool_bash_20241022.rb +36 -1
- data/lib/anthropic/models/beta/beta_tool_bash_20250124.rb +36 -1
- data/lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb +36 -1
- data/lib/anthropic/models/beta/beta_tool_computer_use_20250124.rb +36 -1
- data/lib/anthropic/models/beta/beta_tool_computer_use_20251124.rb +114 -0
- data/lib/anthropic/models/beta/beta_tool_reference_block.rb +25 -0
- data/lib/anthropic/models/beta/beta_tool_reference_block_param.rb +36 -0
- data/lib/anthropic/models/beta/beta_tool_result_block_param.rb +8 -4
- data/lib/anthropic/models/beta/beta_tool_search_tool_bm25_20251119.rb +85 -0
- data/lib/anthropic/models/beta/beta_tool_search_tool_regex_20251119.rb +85 -0
- data/lib/anthropic/models/beta/beta_tool_search_tool_result_block.rb +43 -0
- data/lib/anthropic/models/beta/beta_tool_search_tool_result_block_param.rb +53 -0
- data/lib/anthropic/models/beta/beta_tool_search_tool_result_error.rb +44 -0
- data/lib/anthropic/models/beta/beta_tool_search_tool_result_error_param.rb +38 -0
- data/lib/anthropic/models/beta/beta_tool_search_tool_search_result_block.rb +26 -0
- data/lib/anthropic/models/beta/beta_tool_search_tool_search_result_block_param.rb +26 -0
- data/lib/anthropic/models/beta/beta_tool_text_editor_20241022.rb +36 -1
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250124.rb +36 -1
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250429.rb +36 -1
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250728.rb +36 -1
- data/lib/anthropic/models/beta/beta_tool_union.rb +17 -1
- data/lib/anthropic/models/beta/beta_tool_use_block.rb +30 -1
- data/lib/anthropic/models/beta/beta_tool_use_block_param.rb +27 -1
- data/lib/anthropic/models/beta/beta_web_fetch_tool_20250910.rb +28 -1
- data/lib/anthropic/models/beta/beta_web_search_tool_20250305.rb +28 -1
- data/lib/anthropic/models/beta/message_count_tokens_params.rb +29 -4
- data/lib/anthropic/models/beta/message_create_params.rb +12 -3
- data/lib/anthropic/models/beta/messages/batch_create_params.rb +16 -7
- data/lib/anthropic/models/messages/batch_create_params.rb +4 -4
- data/lib/anthropic/models/model.rb +10 -0
- data/lib/anthropic/resources/beta/messages.rb +26 -11
- data/lib/anthropic/resources/messages.rb +8 -2
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +19 -0
- data/manifest.yaml +1 -0
- data/rbi/anthropic/models/anthropic_beta.rbi +2 -0
- data/rbi/anthropic/models/beta/beta_code_execution_tool_20250522.rbi +77 -0
- data/rbi/anthropic/models/beta/beta_code_execution_tool_20250825.rbi +77 -0
- data/rbi/anthropic/models/beta/beta_content_block.rbi +1 -0
- data/rbi/anthropic/models/beta/beta_content_block_param.rbi +1 -0
- data/rbi/anthropic/models/beta/beta_direct_caller.rbi +31 -0
- data/rbi/anthropic/models/beta/beta_mcp_tool_config.rbi +46 -0
- data/rbi/anthropic/models/beta/beta_mcp_tool_default_config.rbi +46 -0
- data/rbi/anthropic/models/beta/beta_mcp_toolset.rbi +100 -0
- data/rbi/anthropic/models/beta/beta_memory_tool_20250818.rbi +88 -0
- data/rbi/anthropic/models/beta/beta_message.rbi +1 -0
- data/rbi/anthropic/models/beta/beta_output_config.rbi +82 -0
- data/rbi/anthropic/models/beta/beta_raw_content_block_start_event.rbi +2 -0
- data/rbi/anthropic/models/beta/beta_server_tool_caller.rbi +34 -0
- data/rbi/anthropic/models/beta/beta_server_tool_use_block.rbi +54 -1
- data/rbi/anthropic/models/beta/beta_server_tool_use_block_param.rbi +70 -1
- data/rbi/anthropic/models/beta/beta_tool.rbi +75 -0
- data/rbi/anthropic/models/beta/beta_tool_bash_20241022.rbi +88 -0
- data/rbi/anthropic/models/beta/beta_tool_bash_20250124.rbi +88 -0
- data/rbi/anthropic/models/beta/beta_tool_computer_use_20241022.rbi +88 -0
- data/rbi/anthropic/models/beta/beta_tool_computer_use_20250124.rbi +88 -0
- data/rbi/anthropic/models/beta/beta_tool_computer_use_20251124.rbi +204 -0
- data/rbi/anthropic/models/beta/beta_tool_reference_block.rbi +35 -0
- data/rbi/anthropic/models/beta/beta_tool_reference_block_param.rbi +67 -0
- data/rbi/anthropic/models/beta/beta_tool_result_block_param.rbi +3 -1
- data/rbi/anthropic/models/beta/beta_tool_search_tool_bm25_20251119.rbi +198 -0
- data/rbi/anthropic/models/beta/beta_tool_search_tool_regex_20251119.rbi +198 -0
- data/rbi/anthropic/models/beta/beta_tool_search_tool_result_block.rbi +81 -0
- data/rbi/anthropic/models/beta/beta_tool_search_tool_result_block_param.rbi +110 -0
- data/rbi/anthropic/models/beta/beta_tool_search_tool_result_error.rbi +104 -0
- data/rbi/anthropic/models/beta/beta_tool_search_tool_result_error_param.rbi +96 -0
- data/rbi/anthropic/models/beta/beta_tool_search_tool_search_result_block.rbi +48 -0
- data/rbi/anthropic/models/beta/beta_tool_search_tool_search_result_block_param.rbi +48 -0
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20241022.rbi +88 -0
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250124.rbi +88 -0
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250429.rbi +88 -0
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250728.rbi +88 -0
- data/rbi/anthropic/models/beta/beta_tool_union.rbi +9 -1
- data/rbi/anthropic/models/beta/beta_tool_use_block.rbi +55 -2
- data/rbi/anthropic/models/beta/beta_tool_use_block_param.rbi +58 -1
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_20250910.rbi +77 -0
- data/rbi/anthropic/models/beta/beta_web_search_tool_20250305.rbi +77 -0
- data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +44 -5
- data/rbi/anthropic/models/beta/message_create_params.rbi +35 -4
- data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +43 -10
- data/rbi/anthropic/models/messages/batch_create_params.rbi +6 -6
- data/rbi/anthropic/models/model.rbi +8 -0
- data/rbi/anthropic/resources/beta/messages.rbi +29 -3
- data/sig/anthropic/models/anthropic_beta.rbs +2 -0
- data/sig/anthropic/models/beta/beta_code_execution_tool_20250522.rbs +27 -0
- data/sig/anthropic/models/beta/beta_code_execution_tool_20250825.rbs +27 -0
- data/sig/anthropic/models/beta/beta_content_block.rbs +1 -0
- data/sig/anthropic/models/beta/beta_content_block_param.rbs +1 -0
- data/sig/anthropic/models/beta/beta_direct_caller.rbs +17 -0
- data/sig/anthropic/models/beta/beta_mcp_tool_config.rbs +23 -0
- data/sig/anthropic/models/beta/beta_mcp_tool_default_config.rbs +23 -0
- data/sig/anthropic/models/beta/beta_mcp_toolset.rbs +48 -0
- data/sig/anthropic/models/beta/beta_memory_tool_20250818.rbs +36 -0
- data/sig/anthropic/models/beta/beta_output_config.rbs +34 -0
- data/sig/anthropic/models/beta/beta_raw_content_block_start_event.rbs +1 -0
- data/sig/anthropic/models/beta/beta_server_tool_caller.rbs +23 -0
- data/sig/anthropic/models/beta/beta_server_tool_use_block.rbs +19 -0
- data/sig/anthropic/models/beta/beta_server_tool_use_block_param.rbs +25 -2
- data/sig/anthropic/models/beta/beta_tool.rbs +36 -0
- data/sig/anthropic/models/beta/beta_tool_bash_20241022.rbs +36 -0
- data/sig/anthropic/models/beta/beta_tool_bash_20250124.rbs +36 -0
- data/sig/anthropic/models/beta/beta_tool_computer_use_20241022.rbs +36 -0
- data/sig/anthropic/models/beta/beta_tool_computer_use_20250124.rbs +36 -0
- data/sig/anthropic/models/beta/beta_tool_computer_use_20251124.rbs +99 -0
- data/sig/anthropic/models/beta/beta_tool_reference_block.rbs +20 -0
- data/sig/anthropic/models/beta/beta_tool_reference_block_param.rbs +34 -0
- data/sig/anthropic/models/beta/beta_tool_result_block_param.rbs +1 -0
- data/sig/anthropic/models/beta/beta_tool_search_tool_bm25_20251119.rbs +79 -0
- data/sig/anthropic/models/beta/beta_tool_search_tool_regex_20251119.rbs +79 -0
- data/sig/anthropic/models/beta/beta_tool_search_tool_result_block.rbs +44 -0
- data/sig/anthropic/models/beta/beta_tool_search_tool_result_block_param.rbs +49 -0
- data/sig/anthropic/models/beta/beta_tool_search_tool_result_error.rbs +51 -0
- data/sig/anthropic/models/beta/beta_tool_search_tool_result_error_param.rbs +46 -0
- data/sig/anthropic/models/beta/beta_tool_search_tool_search_result_block.rbs +29 -0
- data/sig/anthropic/models/beta/beta_tool_search_tool_search_result_block_param.rbs +29 -0
- data/sig/anthropic/models/beta/beta_tool_text_editor_20241022.rbs +36 -0
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250124.rbs +36 -0
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250429.rbs +36 -0
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250728.rbs +36 -0
- data/sig/anthropic/models/beta/beta_tool_union.rbs +4 -0
- data/sig/anthropic/models/beta/beta_tool_use_block.rbs +21 -2
- data/sig/anthropic/models/beta/beta_tool_use_block_param.rbs +21 -2
- data/sig/anthropic/models/beta/beta_web_fetch_tool_20250910.rbs +27 -0
- data/sig/anthropic/models/beta/beta_web_search_tool_20250305.rbs +27 -0
- data/sig/anthropic/models/beta/message_count_tokens_params.rbs +13 -0
- data/sig/anthropic/models/beta/message_create_params.rbs +9 -0
- data/sig/anthropic/models/beta/messages/batch_create_params.rbs +9 -0
- data/sig/anthropic/models/model.rbs +9 -1
- data/sig/anthropic/resources/beta/messages.rbs +3 -0
- metadata +54 -2
|
@@ -124,6 +124,16 @@ module Anthropic
|
|
|
124
124
|
end
|
|
125
125
|
attr_writer :mcp_servers
|
|
126
126
|
|
|
127
|
+
# Configuration options for the model's output. Controls aspects like how much
|
|
128
|
+
# effort the model puts into its response.
|
|
129
|
+
sig { returns(T.nilable(Anthropic::Beta::BetaOutputConfig)) }
|
|
130
|
+
attr_reader :output_config
|
|
131
|
+
|
|
132
|
+
sig do
|
|
133
|
+
params(output_config: Anthropic::Beta::BetaOutputConfig::OrHash).void
|
|
134
|
+
end
|
|
135
|
+
attr_writer :output_config
|
|
136
|
+
|
|
127
137
|
# A schema to specify Claude's output format in responses.
|
|
128
138
|
sig { returns(T.nilable(Anthropic::Beta::BetaJSONOutputFormat)) }
|
|
129
139
|
attr_reader :output_format
|
|
@@ -307,11 +317,15 @@ module Anthropic
|
|
|
307
317
|
Anthropic::Beta::BetaMemoryTool20250818,
|
|
308
318
|
Anthropic::Beta::BetaToolComputerUse20250124,
|
|
309
319
|
Anthropic::Beta::BetaToolTextEditor20241022,
|
|
320
|
+
Anthropic::Beta::BetaToolComputerUse20251124,
|
|
310
321
|
Anthropic::Beta::BetaToolTextEditor20250124,
|
|
311
322
|
Anthropic::Beta::BetaToolTextEditor20250429,
|
|
312
323
|
Anthropic::Beta::BetaToolTextEditor20250728,
|
|
313
324
|
Anthropic::Beta::BetaWebSearchTool20250305,
|
|
314
|
-
Anthropic::Beta::BetaWebFetchTool20250910
|
|
325
|
+
Anthropic::Beta::BetaWebFetchTool20250910,
|
|
326
|
+
Anthropic::Beta::BetaToolSearchToolBm25_20251119,
|
|
327
|
+
Anthropic::Beta::BetaToolSearchToolRegex20251119,
|
|
328
|
+
Anthropic::Beta::BetaMCPToolset
|
|
315
329
|
)
|
|
316
330
|
]
|
|
317
331
|
)
|
|
@@ -333,11 +347,15 @@ module Anthropic
|
|
|
333
347
|
Anthropic::Beta::BetaMemoryTool20250818::OrHash,
|
|
334
348
|
Anthropic::Beta::BetaToolComputerUse20250124::OrHash,
|
|
335
349
|
Anthropic::Beta::BetaToolTextEditor20241022::OrHash,
|
|
350
|
+
Anthropic::Beta::BetaToolComputerUse20251124::OrHash,
|
|
336
351
|
Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
|
|
337
352
|
Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
|
|
338
353
|
Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
|
|
339
354
|
Anthropic::Beta::BetaWebSearchTool20250305::OrHash,
|
|
340
|
-
Anthropic::Beta::BetaWebFetchTool20250910::OrHash
|
|
355
|
+
Anthropic::Beta::BetaWebFetchTool20250910::OrHash,
|
|
356
|
+
Anthropic::Beta::BetaToolSearchToolBm25_20251119::OrHash,
|
|
357
|
+
Anthropic::Beta::BetaToolSearchToolRegex20251119::OrHash,
|
|
358
|
+
Anthropic::Beta::BetaMCPToolset::OrHash
|
|
341
359
|
)
|
|
342
360
|
]
|
|
343
361
|
).void
|
|
@@ -371,6 +389,7 @@ module Anthropic
|
|
|
371
389
|
T::Array[
|
|
372
390
|
Anthropic::Beta::BetaRequestMCPServerURLDefinition::OrHash
|
|
373
391
|
],
|
|
392
|
+
output_config: Anthropic::Beta::BetaOutputConfig::OrHash,
|
|
374
393
|
output_format:
|
|
375
394
|
T.nilable(Anthropic::Beta::BetaJSONOutputFormat::OrHash),
|
|
376
395
|
system_:
|
|
@@ -399,11 +418,15 @@ module Anthropic
|
|
|
399
418
|
Anthropic::Beta::BetaMemoryTool20250818::OrHash,
|
|
400
419
|
Anthropic::Beta::BetaToolComputerUse20250124::OrHash,
|
|
401
420
|
Anthropic::Beta::BetaToolTextEditor20241022::OrHash,
|
|
421
|
+
Anthropic::Beta::BetaToolComputerUse20251124::OrHash,
|
|
402
422
|
Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
|
|
403
423
|
Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
|
|
404
424
|
Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
|
|
405
425
|
Anthropic::Beta::BetaWebSearchTool20250305::OrHash,
|
|
406
|
-
Anthropic::Beta::BetaWebFetchTool20250910::OrHash
|
|
426
|
+
Anthropic::Beta::BetaWebFetchTool20250910::OrHash,
|
|
427
|
+
Anthropic::Beta::BetaToolSearchToolBm25_20251119::OrHash,
|
|
428
|
+
Anthropic::Beta::BetaToolSearchToolRegex20251119::OrHash,
|
|
429
|
+
Anthropic::Beta::BetaMCPToolset::OrHash
|
|
407
430
|
)
|
|
408
431
|
],
|
|
409
432
|
betas: T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
|
|
@@ -488,6 +511,9 @@ module Anthropic
|
|
|
488
511
|
context_management: nil,
|
|
489
512
|
# MCP servers to be utilized in this request
|
|
490
513
|
mcp_servers: nil,
|
|
514
|
+
# Configuration options for the model's output. Controls aspects like how much
|
|
515
|
+
# effort the model puts into its response.
|
|
516
|
+
output_config: nil,
|
|
491
517
|
# A schema to specify Claude's output format in responses.
|
|
492
518
|
output_format: nil,
|
|
493
519
|
# System prompt.
|
|
@@ -600,6 +626,7 @@ module Anthropic
|
|
|
600
626
|
T.nilable(Anthropic::Beta::BetaContextManagementConfig),
|
|
601
627
|
mcp_servers:
|
|
602
628
|
T::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition],
|
|
629
|
+
output_config: Anthropic::Beta::BetaOutputConfig,
|
|
603
630
|
output_format: T.nilable(Anthropic::Beta::BetaJSONOutputFormat),
|
|
604
631
|
system_:
|
|
605
632
|
Anthropic::Beta::MessageCountTokensParams::System::Variants,
|
|
@@ -627,11 +654,15 @@ module Anthropic
|
|
|
627
654
|
Anthropic::Beta::BetaMemoryTool20250818,
|
|
628
655
|
Anthropic::Beta::BetaToolComputerUse20250124,
|
|
629
656
|
Anthropic::Beta::BetaToolTextEditor20241022,
|
|
657
|
+
Anthropic::Beta::BetaToolComputerUse20251124,
|
|
630
658
|
Anthropic::Beta::BetaToolTextEditor20250124,
|
|
631
659
|
Anthropic::Beta::BetaToolTextEditor20250429,
|
|
632
660
|
Anthropic::Beta::BetaToolTextEditor20250728,
|
|
633
661
|
Anthropic::Beta::BetaWebSearchTool20250305,
|
|
634
|
-
Anthropic::Beta::BetaWebFetchTool20250910
|
|
662
|
+
Anthropic::Beta::BetaWebFetchTool20250910,
|
|
663
|
+
Anthropic::Beta::BetaToolSearchToolBm25_20251119,
|
|
664
|
+
Anthropic::Beta::BetaToolSearchToolRegex20251119,
|
|
665
|
+
Anthropic::Beta::BetaMCPToolset
|
|
635
666
|
)
|
|
636
667
|
],
|
|
637
668
|
betas:
|
|
@@ -675,6 +706,10 @@ module Anthropic
|
|
|
675
706
|
)
|
|
676
707
|
end
|
|
677
708
|
|
|
709
|
+
# Configuration for a group of tools from an MCP server.
|
|
710
|
+
#
|
|
711
|
+
# Allows configuring enabled status and defer_loading for all tools from an MCP
|
|
712
|
+
# server, with optional per-tool overrides.
|
|
678
713
|
module Tool
|
|
679
714
|
extend Anthropic::Internal::Type::Union
|
|
680
715
|
|
|
@@ -690,11 +725,15 @@ module Anthropic
|
|
|
690
725
|
Anthropic::Beta::BetaMemoryTool20250818,
|
|
691
726
|
Anthropic::Beta::BetaToolComputerUse20250124,
|
|
692
727
|
Anthropic::Beta::BetaToolTextEditor20241022,
|
|
728
|
+
Anthropic::Beta::BetaToolComputerUse20251124,
|
|
693
729
|
Anthropic::Beta::BetaToolTextEditor20250124,
|
|
694
730
|
Anthropic::Beta::BetaToolTextEditor20250429,
|
|
695
731
|
Anthropic::Beta::BetaToolTextEditor20250728,
|
|
696
732
|
Anthropic::Beta::BetaWebSearchTool20250305,
|
|
697
|
-
Anthropic::Beta::BetaWebFetchTool20250910
|
|
733
|
+
Anthropic::Beta::BetaWebFetchTool20250910,
|
|
734
|
+
Anthropic::Beta::BetaToolSearchToolBm25_20251119,
|
|
735
|
+
Anthropic::Beta::BetaToolSearchToolRegex20251119,
|
|
736
|
+
Anthropic::Beta::BetaMCPToolset
|
|
698
737
|
)
|
|
699
738
|
end
|
|
700
739
|
|
|
@@ -149,6 +149,16 @@ module Anthropic
|
|
|
149
149
|
sig { params(metadata: Anthropic::Beta::BetaMetadata::OrHash).void }
|
|
150
150
|
attr_writer :metadata
|
|
151
151
|
|
|
152
|
+
# Configuration options for the model's output. Controls aspects like how much
|
|
153
|
+
# effort the model puts into its response.
|
|
154
|
+
sig { returns(T.nilable(Anthropic::Beta::BetaOutputConfig)) }
|
|
155
|
+
attr_reader :output_config
|
|
156
|
+
|
|
157
|
+
sig do
|
|
158
|
+
params(output_config: Anthropic::Beta::BetaOutputConfig::OrHash).void
|
|
159
|
+
end
|
|
160
|
+
attr_writer :output_config
|
|
161
|
+
|
|
152
162
|
# A schema to specify Claude's output format in responses.
|
|
153
163
|
sig { returns(T.nilable(Anthropic::Beta::BetaJSONOutputFormat)) }
|
|
154
164
|
attr_reader :output_format
|
|
@@ -381,11 +391,15 @@ module Anthropic
|
|
|
381
391
|
Anthropic::Beta::BetaMemoryTool20250818,
|
|
382
392
|
Anthropic::Beta::BetaToolComputerUse20250124,
|
|
383
393
|
Anthropic::Beta::BetaToolTextEditor20241022,
|
|
394
|
+
Anthropic::Beta::BetaToolComputerUse20251124,
|
|
384
395
|
Anthropic::Beta::BetaToolTextEditor20250124,
|
|
385
396
|
Anthropic::Beta::BetaToolTextEditor20250429,
|
|
386
397
|
Anthropic::Beta::BetaToolTextEditor20250728,
|
|
387
398
|
Anthropic::Beta::BetaWebSearchTool20250305,
|
|
388
|
-
Anthropic::Beta::BetaWebFetchTool20250910
|
|
399
|
+
Anthropic::Beta::BetaWebFetchTool20250910,
|
|
400
|
+
Anthropic::Beta::BetaToolSearchToolBm25_20251119,
|
|
401
|
+
Anthropic::Beta::BetaToolSearchToolRegex20251119,
|
|
402
|
+
Anthropic::Beta::BetaMCPToolset
|
|
389
403
|
)
|
|
390
404
|
]
|
|
391
405
|
)
|
|
@@ -407,11 +421,15 @@ module Anthropic
|
|
|
407
421
|
Anthropic::Beta::BetaMemoryTool20250818::OrHash,
|
|
408
422
|
Anthropic::Beta::BetaToolComputerUse20250124::OrHash,
|
|
409
423
|
Anthropic::Beta::BetaToolTextEditor20241022::OrHash,
|
|
424
|
+
Anthropic::Beta::BetaToolComputerUse20251124::OrHash,
|
|
410
425
|
Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
|
|
411
426
|
Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
|
|
412
427
|
Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
|
|
413
428
|
Anthropic::Beta::BetaWebSearchTool20250305::OrHash,
|
|
414
|
-
Anthropic::Beta::BetaWebFetchTool20250910::OrHash
|
|
429
|
+
Anthropic::Beta::BetaWebFetchTool20250910::OrHash,
|
|
430
|
+
Anthropic::Beta::BetaToolSearchToolBm25_20251119::OrHash,
|
|
431
|
+
Anthropic::Beta::BetaToolSearchToolRegex20251119::OrHash,
|
|
432
|
+
Anthropic::Beta::BetaMCPToolset::OrHash
|
|
415
433
|
)
|
|
416
434
|
]
|
|
417
435
|
).void
|
|
@@ -479,6 +497,7 @@ module Anthropic
|
|
|
479
497
|
Anthropic::Beta::BetaRequestMCPServerURLDefinition::OrHash
|
|
480
498
|
],
|
|
481
499
|
metadata: Anthropic::Beta::BetaMetadata::OrHash,
|
|
500
|
+
output_config: Anthropic::Beta::BetaOutputConfig::OrHash,
|
|
482
501
|
output_format:
|
|
483
502
|
T.nilable(Anthropic::Beta::BetaJSONOutputFormat::OrHash),
|
|
484
503
|
service_tier:
|
|
@@ -510,11 +529,15 @@ module Anthropic
|
|
|
510
529
|
Anthropic::Beta::BetaMemoryTool20250818::OrHash,
|
|
511
530
|
Anthropic::Beta::BetaToolComputerUse20250124::OrHash,
|
|
512
531
|
Anthropic::Beta::BetaToolTextEditor20241022::OrHash,
|
|
532
|
+
Anthropic::Beta::BetaToolComputerUse20251124::OrHash,
|
|
513
533
|
Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
|
|
514
534
|
Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
|
|
515
535
|
Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
|
|
516
536
|
Anthropic::Beta::BetaWebSearchTool20250305::OrHash,
|
|
517
|
-
Anthropic::Beta::BetaWebFetchTool20250910::OrHash
|
|
537
|
+
Anthropic::Beta::BetaWebFetchTool20250910::OrHash,
|
|
538
|
+
Anthropic::Beta::BetaToolSearchToolBm25_20251119::OrHash,
|
|
539
|
+
Anthropic::Beta::BetaToolSearchToolRegex20251119::OrHash,
|
|
540
|
+
Anthropic::Beta::BetaMCPToolset::OrHash
|
|
518
541
|
)
|
|
519
542
|
],
|
|
520
543
|
top_k: Integer,
|
|
@@ -613,6 +636,9 @@ module Anthropic
|
|
|
613
636
|
mcp_servers: nil,
|
|
614
637
|
# An object describing metadata about the request.
|
|
615
638
|
metadata: nil,
|
|
639
|
+
# Configuration options for the model's output. Controls aspects like how much
|
|
640
|
+
# effort the model puts into its response.
|
|
641
|
+
output_config: nil,
|
|
616
642
|
# A schema to specify Claude's output format in responses.
|
|
617
643
|
output_format: nil,
|
|
618
644
|
# Determines whether to use priority capacity (if available) or standard capacity
|
|
@@ -772,6 +798,7 @@ module Anthropic
|
|
|
772
798
|
mcp_servers:
|
|
773
799
|
T::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition],
|
|
774
800
|
metadata: Anthropic::Beta::BetaMetadata,
|
|
801
|
+
output_config: Anthropic::Beta::BetaOutputConfig,
|
|
775
802
|
output_format: T.nilable(Anthropic::Beta::BetaJSONOutputFormat),
|
|
776
803
|
service_tier:
|
|
777
804
|
Anthropic::Beta::MessageCreateParams::ServiceTier::OrSymbol,
|
|
@@ -802,11 +829,15 @@ module Anthropic
|
|
|
802
829
|
Anthropic::Beta::BetaMemoryTool20250818,
|
|
803
830
|
Anthropic::Beta::BetaToolComputerUse20250124,
|
|
804
831
|
Anthropic::Beta::BetaToolTextEditor20241022,
|
|
832
|
+
Anthropic::Beta::BetaToolComputerUse20251124,
|
|
805
833
|
Anthropic::Beta::BetaToolTextEditor20250124,
|
|
806
834
|
Anthropic::Beta::BetaToolTextEditor20250429,
|
|
807
835
|
Anthropic::Beta::BetaToolTextEditor20250728,
|
|
808
836
|
Anthropic::Beta::BetaWebSearchTool20250305,
|
|
809
|
-
Anthropic::Beta::BetaWebFetchTool20250910
|
|
837
|
+
Anthropic::Beta::BetaWebFetchTool20250910,
|
|
838
|
+
Anthropic::Beta::BetaToolSearchToolBm25_20251119,
|
|
839
|
+
Anthropic::Beta::BetaToolSearchToolRegex20251119,
|
|
840
|
+
Anthropic::Beta::BetaMCPToolset
|
|
810
841
|
)
|
|
811
842
|
],
|
|
812
843
|
top_k: Integer,
|
|
@@ -97,8 +97,8 @@ module Anthropic
|
|
|
97
97
|
|
|
98
98
|
# Messages API creation parameters for the individual request.
|
|
99
99
|
#
|
|
100
|
-
# See the [Messages API reference](/en/api/messages) for
|
|
101
|
-
# available parameters.
|
|
100
|
+
# See the [Messages API reference](https://docs.claude.com/en/api/messages) for
|
|
101
|
+
# full documentation on available parameters.
|
|
102
102
|
sig do
|
|
103
103
|
returns(
|
|
104
104
|
Anthropic::Beta::Messages::BatchCreateParams::Request::Params
|
|
@@ -129,8 +129,8 @@ module Anthropic
|
|
|
129
129
|
custom_id:,
|
|
130
130
|
# Messages API creation parameters for the individual request.
|
|
131
131
|
#
|
|
132
|
-
# See the [Messages API reference](/en/api/messages) for
|
|
133
|
-
# available parameters.
|
|
132
|
+
# See the [Messages API reference](https://docs.claude.com/en/api/messages) for
|
|
133
|
+
# full documentation on available parameters.
|
|
134
134
|
params:
|
|
135
135
|
)
|
|
136
136
|
end
|
|
@@ -296,6 +296,18 @@ module Anthropic
|
|
|
296
296
|
end
|
|
297
297
|
attr_writer :metadata
|
|
298
298
|
|
|
299
|
+
# Configuration options for the model's output. Controls aspects like how much
|
|
300
|
+
# effort the model puts into its response.
|
|
301
|
+
sig { returns(T.nilable(Anthropic::Beta::BetaOutputConfig)) }
|
|
302
|
+
attr_reader :output_config
|
|
303
|
+
|
|
304
|
+
sig do
|
|
305
|
+
params(
|
|
306
|
+
output_config: Anthropic::Beta::BetaOutputConfig::OrHash
|
|
307
|
+
).void
|
|
308
|
+
end
|
|
309
|
+
attr_writer :output_config
|
|
310
|
+
|
|
299
311
|
# A schema to specify Claude's output format in responses.
|
|
300
312
|
sig { returns(T.nilable(Anthropic::Beta::BetaJSONOutputFormat)) }
|
|
301
313
|
attr_reader :output_format
|
|
@@ -540,11 +552,15 @@ module Anthropic
|
|
|
540
552
|
Anthropic::Beta::BetaMemoryTool20250818,
|
|
541
553
|
Anthropic::Beta::BetaToolComputerUse20250124,
|
|
542
554
|
Anthropic::Beta::BetaToolTextEditor20241022,
|
|
555
|
+
Anthropic::Beta::BetaToolComputerUse20251124,
|
|
543
556
|
Anthropic::Beta::BetaToolTextEditor20250124,
|
|
544
557
|
Anthropic::Beta::BetaToolTextEditor20250429,
|
|
545
558
|
Anthropic::Beta::BetaToolTextEditor20250728,
|
|
546
559
|
Anthropic::Beta::BetaWebSearchTool20250305,
|
|
547
|
-
Anthropic::Beta::BetaWebFetchTool20250910
|
|
560
|
+
Anthropic::Beta::BetaWebFetchTool20250910,
|
|
561
|
+
Anthropic::Beta::BetaToolSearchToolBm25_20251119,
|
|
562
|
+
Anthropic::Beta::BetaToolSearchToolRegex20251119,
|
|
563
|
+
Anthropic::Beta::BetaMCPToolset
|
|
548
564
|
)
|
|
549
565
|
]
|
|
550
566
|
)
|
|
@@ -566,11 +582,15 @@ module Anthropic
|
|
|
566
582
|
Anthropic::Beta::BetaMemoryTool20250818::OrHash,
|
|
567
583
|
Anthropic::Beta::BetaToolComputerUse20250124::OrHash,
|
|
568
584
|
Anthropic::Beta::BetaToolTextEditor20241022::OrHash,
|
|
585
|
+
Anthropic::Beta::BetaToolComputerUse20251124::OrHash,
|
|
569
586
|
Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
|
|
570
587
|
Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
|
|
571
588
|
Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
|
|
572
589
|
Anthropic::Beta::BetaWebSearchTool20250305::OrHash,
|
|
573
|
-
Anthropic::Beta::BetaWebFetchTool20250910::OrHash
|
|
590
|
+
Anthropic::Beta::BetaWebFetchTool20250910::OrHash,
|
|
591
|
+
Anthropic::Beta::BetaToolSearchToolBm25_20251119::OrHash,
|
|
592
|
+
Anthropic::Beta::BetaToolSearchToolRegex20251119::OrHash,
|
|
593
|
+
Anthropic::Beta::BetaMCPToolset::OrHash
|
|
574
594
|
)
|
|
575
595
|
]
|
|
576
596
|
).void
|
|
@@ -607,8 +627,8 @@ module Anthropic
|
|
|
607
627
|
|
|
608
628
|
# Messages API creation parameters for the individual request.
|
|
609
629
|
#
|
|
610
|
-
# See the [Messages API reference](/en/api/messages) for
|
|
611
|
-
# available parameters.
|
|
630
|
+
# See the [Messages API reference](https://docs.claude.com/en/api/messages) for
|
|
631
|
+
# full documentation on available parameters.
|
|
612
632
|
sig do
|
|
613
633
|
params(
|
|
614
634
|
max_tokens: Integer,
|
|
@@ -630,6 +650,7 @@ module Anthropic
|
|
|
630
650
|
Anthropic::Beta::BetaRequestMCPServerURLDefinition::OrHash
|
|
631
651
|
],
|
|
632
652
|
metadata: Anthropic::Beta::BetaMetadata::OrHash,
|
|
653
|
+
output_config: Anthropic::Beta::BetaOutputConfig::OrHash,
|
|
633
654
|
output_format:
|
|
634
655
|
T.nilable(Anthropic::Beta::BetaJSONOutputFormat::OrHash),
|
|
635
656
|
service_tier:
|
|
@@ -663,11 +684,15 @@ module Anthropic
|
|
|
663
684
|
Anthropic::Beta::BetaMemoryTool20250818::OrHash,
|
|
664
685
|
Anthropic::Beta::BetaToolComputerUse20250124::OrHash,
|
|
665
686
|
Anthropic::Beta::BetaToolTextEditor20241022::OrHash,
|
|
687
|
+
Anthropic::Beta::BetaToolComputerUse20251124::OrHash,
|
|
666
688
|
Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
|
|
667
689
|
Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
|
|
668
690
|
Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
|
|
669
691
|
Anthropic::Beta::BetaWebSearchTool20250305::OrHash,
|
|
670
|
-
Anthropic::Beta::BetaWebFetchTool20250910::OrHash
|
|
692
|
+
Anthropic::Beta::BetaWebFetchTool20250910::OrHash,
|
|
693
|
+
Anthropic::Beta::BetaToolSearchToolBm25_20251119::OrHash,
|
|
694
|
+
Anthropic::Beta::BetaToolSearchToolRegex20251119::OrHash,
|
|
695
|
+
Anthropic::Beta::BetaMCPToolset::OrHash
|
|
671
696
|
)
|
|
672
697
|
],
|
|
673
698
|
top_k: Integer,
|
|
@@ -764,6 +789,9 @@ module Anthropic
|
|
|
764
789
|
mcp_servers: nil,
|
|
765
790
|
# An object describing metadata about the request.
|
|
766
791
|
metadata: nil,
|
|
792
|
+
# Configuration options for the model's output. Controls aspects like how much
|
|
793
|
+
# effort the model puts into its response.
|
|
794
|
+
output_config: nil,
|
|
767
795
|
# A schema to specify Claude's output format in responses.
|
|
768
796
|
output_format: nil,
|
|
769
797
|
# Determines whether to use priority capacity (if available) or standard capacity
|
|
@@ -928,6 +956,7 @@ module Anthropic
|
|
|
928
956
|
Anthropic::Beta::BetaRequestMCPServerURLDefinition
|
|
929
957
|
],
|
|
930
958
|
metadata: Anthropic::Beta::BetaMetadata,
|
|
959
|
+
output_config: Anthropic::Beta::BetaOutputConfig,
|
|
931
960
|
output_format:
|
|
932
961
|
T.nilable(Anthropic::Beta::BetaJSONOutputFormat),
|
|
933
962
|
service_tier:
|
|
@@ -961,11 +990,15 @@ module Anthropic
|
|
|
961
990
|
Anthropic::Beta::BetaMemoryTool20250818,
|
|
962
991
|
Anthropic::Beta::BetaToolComputerUse20250124,
|
|
963
992
|
Anthropic::Beta::BetaToolTextEditor20241022,
|
|
993
|
+
Anthropic::Beta::BetaToolComputerUse20251124,
|
|
964
994
|
Anthropic::Beta::BetaToolTextEditor20250124,
|
|
965
995
|
Anthropic::Beta::BetaToolTextEditor20250429,
|
|
966
996
|
Anthropic::Beta::BetaToolTextEditor20250728,
|
|
967
997
|
Anthropic::Beta::BetaWebSearchTool20250305,
|
|
968
|
-
Anthropic::Beta::BetaWebFetchTool20250910
|
|
998
|
+
Anthropic::Beta::BetaWebFetchTool20250910,
|
|
999
|
+
Anthropic::Beta::BetaToolSearchToolBm25_20251119,
|
|
1000
|
+
Anthropic::Beta::BetaToolSearchToolRegex20251119,
|
|
1001
|
+
Anthropic::Beta::BetaMCPToolset
|
|
969
1002
|
)
|
|
970
1003
|
],
|
|
971
1004
|
top_k: Integer,
|
|
@@ -67,8 +67,8 @@ module Anthropic
|
|
|
67
67
|
|
|
68
68
|
# Messages API creation parameters for the individual request.
|
|
69
69
|
#
|
|
70
|
-
# See the [Messages API reference](/en/api/messages) for
|
|
71
|
-
# available parameters.
|
|
70
|
+
# See the [Messages API reference](https://docs.claude.com/en/api/messages) for
|
|
71
|
+
# full documentation on available parameters.
|
|
72
72
|
sig do
|
|
73
73
|
returns(Anthropic::Messages::BatchCreateParams::Request::Params)
|
|
74
74
|
end
|
|
@@ -97,8 +97,8 @@ module Anthropic
|
|
|
97
97
|
custom_id:,
|
|
98
98
|
# Messages API creation parameters for the individual request.
|
|
99
99
|
#
|
|
100
|
-
# See the [Messages API reference](/en/api/messages) for
|
|
101
|
-
# available parameters.
|
|
100
|
+
# See the [Messages API reference](https://docs.claude.com/en/api/messages) for
|
|
101
|
+
# full documentation on available parameters.
|
|
102
102
|
params:
|
|
103
103
|
)
|
|
104
104
|
end
|
|
@@ -497,8 +497,8 @@ module Anthropic
|
|
|
497
497
|
|
|
498
498
|
# Messages API creation parameters for the individual request.
|
|
499
499
|
#
|
|
500
|
-
# See the [Messages API reference](/en/api/messages) for
|
|
501
|
-
# available parameters.
|
|
500
|
+
# See the [Messages API reference](https://docs.claude.com/en/api/messages) for
|
|
501
|
+
# full documentation on available parameters.
|
|
502
502
|
sig do
|
|
503
503
|
params(
|
|
504
504
|
max_tokens: Integer,
|
|
@@ -17,6 +17,14 @@ module Anthropic
|
|
|
17
17
|
TaggedSymbol = T.type_alias { T.all(Symbol, Anthropic::Model) }
|
|
18
18
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
19
19
|
|
|
20
|
+
# Premium model combining maximum intelligence with practical performance
|
|
21
|
+
CLAUDE_OPUS_4_5_20251101 =
|
|
22
|
+
T.let(:"claude-opus-4-5-20251101", Anthropic::Model::TaggedSymbol)
|
|
23
|
+
|
|
24
|
+
# Premium model combining maximum intelligence with practical performance
|
|
25
|
+
CLAUDE_OPUS_4_5 =
|
|
26
|
+
T.let(:"claude-opus-4-5", Anthropic::Model::TaggedSymbol)
|
|
27
|
+
|
|
20
28
|
# High-performance model with early extended thinking
|
|
21
29
|
CLAUDE_3_7_SONNET_LATEST =
|
|
22
30
|
T.let(:"claude-3-7-sonnet-latest", Anthropic::Model::TaggedSymbol)
|
|
@@ -63,6 +63,7 @@ module Anthropic
|
|
|
63
63
|
top_p: Float,
|
|
64
64
|
betas: T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
|
|
65
65
|
stream: T.noreturn,
|
|
66
|
+
compaction_control: T.nilable(T::Boolean),
|
|
66
67
|
request_options: Anthropic::RequestOptions::OrHash
|
|
67
68
|
).returns(Anthropic::Helpers::Tools::Runner)
|
|
68
69
|
end
|
|
@@ -299,6 +300,7 @@ module Anthropic
|
|
|
299
300
|
# There is no need to provide `stream:`. Instead, use `#stream_raw` or `#create`
|
|
300
301
|
# for streaming and non-streaming use cases, respectively.
|
|
301
302
|
stream: false,
|
|
303
|
+
compaction_control: nil,
|
|
302
304
|
request_options: {}
|
|
303
305
|
)
|
|
304
306
|
end
|
|
@@ -329,6 +331,7 @@ module Anthropic
|
|
|
329
331
|
Anthropic::Beta::BetaRequestMCPServerURLDefinition::OrHash
|
|
330
332
|
],
|
|
331
333
|
metadata: Anthropic::Beta::BetaMetadata::OrHash,
|
|
334
|
+
output_config: Anthropic::Beta::BetaOutputConfig::OrHash,
|
|
332
335
|
output_format:
|
|
333
336
|
T.nilable(Anthropic::Beta::BetaJSONOutputFormat::OrHash),
|
|
334
337
|
service_tier:
|
|
@@ -360,11 +363,15 @@ module Anthropic
|
|
|
360
363
|
Anthropic::Beta::BetaMemoryTool20250818::OrHash,
|
|
361
364
|
Anthropic::Beta::BetaToolComputerUse20250124::OrHash,
|
|
362
365
|
Anthropic::Beta::BetaToolTextEditor20241022::OrHash,
|
|
366
|
+
Anthropic::Beta::BetaToolComputerUse20251124::OrHash,
|
|
363
367
|
Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
|
|
364
368
|
Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
|
|
365
369
|
Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
|
|
366
370
|
Anthropic::Beta::BetaWebSearchTool20250305::OrHash,
|
|
367
|
-
Anthropic::Beta::BetaWebFetchTool20250910::OrHash
|
|
371
|
+
Anthropic::Beta::BetaWebFetchTool20250910::OrHash,
|
|
372
|
+
Anthropic::Beta::BetaToolSearchToolBm25_20251119::OrHash,
|
|
373
|
+
Anthropic::Beta::BetaToolSearchToolRegex20251119::OrHash,
|
|
374
|
+
Anthropic::Beta::BetaMCPToolset::OrHash
|
|
368
375
|
)
|
|
369
376
|
],
|
|
370
377
|
top_k: Integer,
|
|
@@ -464,6 +471,9 @@ module Anthropic
|
|
|
464
471
|
mcp_servers: nil,
|
|
465
472
|
# Body param: An object describing metadata about the request.
|
|
466
473
|
metadata: nil,
|
|
474
|
+
# Body param: Configuration options for the model's output. Controls aspects like
|
|
475
|
+
# how much effort the model puts into its response.
|
|
476
|
+
output_config: nil,
|
|
467
477
|
# Body param: A schema to specify Claude's output format in responses.
|
|
468
478
|
output_format: nil,
|
|
469
479
|
# Body param: Determines whether to use priority capacity (if available) or
|
|
@@ -639,6 +649,7 @@ module Anthropic
|
|
|
639
649
|
Anthropic::Beta::BetaRequestMCPServerURLDefinition::OrHash
|
|
640
650
|
],
|
|
641
651
|
metadata: Anthropic::Beta::BetaMetadata::OrHash,
|
|
652
|
+
output_config: Anthropic::Beta::BetaOutputConfig::OrHash,
|
|
642
653
|
output_format:
|
|
643
654
|
T.nilable(Anthropic::Beta::BetaJSONOutputFormat::OrHash),
|
|
644
655
|
service_tier:
|
|
@@ -670,11 +681,15 @@ module Anthropic
|
|
|
670
681
|
Anthropic::Beta::BetaMemoryTool20250818::OrHash,
|
|
671
682
|
Anthropic::Beta::BetaToolComputerUse20250124::OrHash,
|
|
672
683
|
Anthropic::Beta::BetaToolTextEditor20241022::OrHash,
|
|
684
|
+
Anthropic::Beta::BetaToolComputerUse20251124::OrHash,
|
|
673
685
|
Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
|
|
674
686
|
Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
|
|
675
687
|
Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
|
|
676
688
|
Anthropic::Beta::BetaWebSearchTool20250305::OrHash,
|
|
677
|
-
Anthropic::Beta::BetaWebFetchTool20250910::OrHash
|
|
689
|
+
Anthropic::Beta::BetaWebFetchTool20250910::OrHash,
|
|
690
|
+
Anthropic::Beta::BetaToolSearchToolBm25_20251119::OrHash,
|
|
691
|
+
Anthropic::Beta::BetaToolSearchToolRegex20251119::OrHash,
|
|
692
|
+
Anthropic::Beta::BetaMCPToolset::OrHash
|
|
678
693
|
)
|
|
679
694
|
],
|
|
680
695
|
top_k: Integer,
|
|
@@ -778,6 +793,9 @@ module Anthropic
|
|
|
778
793
|
mcp_servers: nil,
|
|
779
794
|
# Body param: An object describing metadata about the request.
|
|
780
795
|
metadata: nil,
|
|
796
|
+
# Body param: Configuration options for the model's output. Controls aspects like
|
|
797
|
+
# how much effort the model puts into its response.
|
|
798
|
+
output_config: nil,
|
|
781
799
|
# Body param: A schema to specify Claude's output format in responses.
|
|
782
800
|
output_format: nil,
|
|
783
801
|
# Body param: Determines whether to use priority capacity (if available) or
|
|
@@ -944,6 +962,7 @@ module Anthropic
|
|
|
944
962
|
T::Array[
|
|
945
963
|
Anthropic::Beta::BetaRequestMCPServerURLDefinition::OrHash
|
|
946
964
|
],
|
|
965
|
+
output_config: Anthropic::Beta::BetaOutputConfig::OrHash,
|
|
947
966
|
output_format:
|
|
948
967
|
T.nilable(Anthropic::Beta::BetaJSONOutputFormat::OrHash),
|
|
949
968
|
system_:
|
|
@@ -972,11 +991,15 @@ module Anthropic
|
|
|
972
991
|
Anthropic::Beta::BetaMemoryTool20250818::OrHash,
|
|
973
992
|
Anthropic::Beta::BetaToolComputerUse20250124::OrHash,
|
|
974
993
|
Anthropic::Beta::BetaToolTextEditor20241022::OrHash,
|
|
994
|
+
Anthropic::Beta::BetaToolComputerUse20251124::OrHash,
|
|
975
995
|
Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
|
|
976
996
|
Anthropic::Beta::BetaToolTextEditor20250429::OrHash,
|
|
977
997
|
Anthropic::Beta::BetaToolTextEditor20250728::OrHash,
|
|
978
998
|
Anthropic::Beta::BetaWebSearchTool20250305::OrHash,
|
|
979
|
-
Anthropic::Beta::BetaWebFetchTool20250910::OrHash
|
|
999
|
+
Anthropic::Beta::BetaWebFetchTool20250910::OrHash,
|
|
1000
|
+
Anthropic::Beta::BetaToolSearchToolBm25_20251119::OrHash,
|
|
1001
|
+
Anthropic::Beta::BetaToolSearchToolRegex20251119::OrHash,
|
|
1002
|
+
Anthropic::Beta::BetaMCPToolset::OrHash
|
|
980
1003
|
)
|
|
981
1004
|
],
|
|
982
1005
|
betas: T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
|
|
@@ -1061,6 +1084,9 @@ module Anthropic
|
|
|
1061
1084
|
context_management: nil,
|
|
1062
1085
|
# Body param: MCP servers to be utilized in this request
|
|
1063
1086
|
mcp_servers: nil,
|
|
1087
|
+
# Body param: Configuration options for the model's output. Controls aspects like
|
|
1088
|
+
# how much effort the model puts into its response.
|
|
1089
|
+
output_config: nil,
|
|
1064
1090
|
# Body param: A schema to specify Claude's output format in responses.
|
|
1065
1091
|
output_format: nil,
|
|
1066
1092
|
# Body param: System prompt.
|
|
@@ -12,6 +12,7 @@ module Anthropic
|
|
|
12
12
|
| :"output-128k-2025-02-19"
|
|
13
13
|
| :"files-api-2025-04-14"
|
|
14
14
|
| :"mcp-client-2025-04-04"
|
|
15
|
+
| :"mcp-client-2025-11-20"
|
|
15
16
|
| :"dev-full-thinking-2025-05-14"
|
|
16
17
|
| :"interleaved-thinking-2025-05-14"
|
|
17
18
|
| :"code-execution-2025-05-22"
|
|
@@ -36,6 +37,7 @@ module Anthropic
|
|
|
36
37
|
OUTPUT_128K_2025_02_19: :"output-128k-2025-02-19"
|
|
37
38
|
FILES_API_2025_04_14: :"files-api-2025-04-14"
|
|
38
39
|
MCP_CLIENT_2025_04_04: :"mcp-client-2025-04-04"
|
|
40
|
+
MCP_CLIENT_2025_11_20: :"mcp-client-2025-11-20"
|
|
39
41
|
DEV_FULL_THINKING_2025_05_14: :"dev-full-thinking-2025-05-14"
|
|
40
42
|
INTERLEAVED_THINKING_2025_05_14: :"interleaved-thinking-2025-05-14"
|
|
41
43
|
CODE_EXECUTION_2025_05_22: :"code-execution-2025-05-22"
|
|
@@ -7,7 +7,9 @@ module Anthropic
|
|
|
7
7
|
{
|
|
8
8
|
name: :code_execution,
|
|
9
9
|
type: :code_execution_20250522,
|
|
10
|
+
allowed_callers: ::Array[Anthropic::Models::Beta::BetaCodeExecutionTool20250522::allowed_caller],
|
|
10
11
|
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
12
|
+
defer_loading: bool,
|
|
11
13
|
strict: bool
|
|
12
14
|
}
|
|
13
15
|
|
|
@@ -16,14 +18,26 @@ module Anthropic
|
|
|
16
18
|
|
|
17
19
|
attr_accessor type: :code_execution_20250522
|
|
18
20
|
|
|
21
|
+
attr_reader allowed_callers: ::Array[Anthropic::Models::Beta::BetaCodeExecutionTool20250522::allowed_caller]?
|
|
22
|
+
|
|
23
|
+
def allowed_callers=: (
|
|
24
|
+
::Array[Anthropic::Models::Beta::BetaCodeExecutionTool20250522::allowed_caller]
|
|
25
|
+
) -> ::Array[Anthropic::Models::Beta::BetaCodeExecutionTool20250522::allowed_caller]
|
|
26
|
+
|
|
19
27
|
attr_accessor cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
|
|
20
28
|
|
|
29
|
+
attr_reader defer_loading: bool?
|
|
30
|
+
|
|
31
|
+
def defer_loading=: (bool) -> bool
|
|
32
|
+
|
|
21
33
|
attr_reader strict: bool?
|
|
22
34
|
|
|
23
35
|
def strict=: (bool) -> bool
|
|
24
36
|
|
|
25
37
|
def initialize: (
|
|
38
|
+
?allowed_callers: ::Array[Anthropic::Models::Beta::BetaCodeExecutionTool20250522::allowed_caller],
|
|
26
39
|
?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
40
|
+
?defer_loading: bool,
|
|
27
41
|
?strict: bool,
|
|
28
42
|
?name: :code_execution,
|
|
29
43
|
?type: :code_execution_20250522
|
|
@@ -32,9 +46,22 @@ module Anthropic
|
|
|
32
46
|
def to_hash: -> {
|
|
33
47
|
name: :code_execution,
|
|
34
48
|
type: :code_execution_20250522,
|
|
49
|
+
allowed_callers: ::Array[Anthropic::Models::Beta::BetaCodeExecutionTool20250522::allowed_caller],
|
|
35
50
|
cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
|
|
51
|
+
defer_loading: bool,
|
|
36
52
|
strict: bool
|
|
37
53
|
}
|
|
54
|
+
|
|
55
|
+
type allowed_caller = :direct | :code_execution_20250825
|
|
56
|
+
|
|
57
|
+
module AllowedCaller
|
|
58
|
+
extend Anthropic::Internal::Type::Enum
|
|
59
|
+
|
|
60
|
+
DIRECT: :direct
|
|
61
|
+
CODE_EXECUTION_20250825: :code_execution_20250825
|
|
62
|
+
|
|
63
|
+
def self?.values: -> ::Array[Anthropic::Models::Beta::BetaCodeExecutionTool20250522::allowed_caller]
|
|
64
|
+
end
|
|
38
65
|
end
|
|
39
66
|
end
|
|
40
67
|
end
|