anthropic 1.48.2 → 1.49.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 +14 -0
- data/README.md +1 -1
- data/lib/anthropic/client.rb +8 -2
- data/lib/anthropic/errors.rb +14 -0
- data/lib/anthropic/helpers/aws/client.rb +3 -3
- data/lib/anthropic/helpers/aws_auth.rb +39 -29
- data/lib/anthropic/helpers/bedrock/client.rb +99 -67
- data/lib/anthropic/helpers/bedrock/event_stream.rb +92 -0
- data/lib/anthropic/helpers/bedrock/mantle_client.rb +3 -3
- data/lib/anthropic/helpers/vertex/client.rb +99 -55
- data/lib/anthropic/internal/transport/base_client.rb +196 -33
- data/lib/anthropic/internal/util.rb +37 -1
- data/lib/anthropic/middleware.rb +435 -0
- data/lib/anthropic/models/beta/beta_advisor_tool_20260301.rb +3 -1
- data/lib/anthropic/models/beta/beta_code_execution_tool_20250522.rb +3 -1
- data/lib/anthropic/models/beta/beta_code_execution_tool_20250825.rb +3 -1
- data/lib/anthropic/models/beta/beta_code_execution_tool_20260120.rb +3 -1
- data/lib/anthropic/models/beta/beta_code_execution_tool_20260521.rb +86 -0
- data/lib/anthropic/models/beta/beta_content_block.rb +3 -3
- data/lib/anthropic/models/beta/beta_content_block_param.rb +10 -12
- data/lib/anthropic/models/beta/beta_fallback_block.rb +13 -5
- data/lib/anthropic/models/beta/beta_fallback_block_param.rb +22 -13
- data/lib/anthropic/models/beta/beta_fallback_refusal_trigger.rb +44 -0
- data/lib/anthropic/models/beta/beta_memory_tool_20250818.rb +3 -1
- data/lib/anthropic/models/beta/beta_raw_content_block_start_event.rb +3 -3
- data/lib/anthropic/models/beta/beta_refusal_stop_details.rb +3 -7
- data/lib/anthropic/models/beta/beta_tool.rb +3 -1
- data/lib/anthropic/models/beta/beta_tool_bash_20241022.rb +3 -1
- data/lib/anthropic/models/beta/beta_tool_bash_20250124.rb +3 -1
- data/lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb +3 -1
- data/lib/anthropic/models/beta/beta_tool_computer_use_20250124.rb +3 -1
- data/lib/anthropic/models/beta/beta_tool_computer_use_20251124.rb +3 -1
- data/lib/anthropic/models/beta/beta_tool_search_tool_bm25_20251119.rb +3 -1
- data/lib/anthropic/models/beta/beta_tool_search_tool_regex_20251119.rb +3 -1
- data/lib/anthropic/models/beta/beta_tool_text_editor_20241022.rb +3 -1
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250124.rb +3 -1
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250429.rb +3 -1
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250728.rb +3 -1
- data/lib/anthropic/models/beta/beta_tool_union.rb +4 -1
- data/lib/anthropic/models/beta/beta_web_fetch_tool_20250910.rb +3 -1
- data/lib/anthropic/models/beta/beta_web_fetch_tool_20260209.rb +3 -1
- data/lib/anthropic/models/beta/beta_web_fetch_tool_20260309.rb +3 -1
- data/lib/anthropic/models/beta/beta_web_search_tool_20250305.rb +3 -1
- data/lib/anthropic/models/beta/beta_web_search_tool_20260209.rb +3 -1
- data/lib/anthropic/models/beta/beta_webhook_event.rb +2 -2
- data/lib/anthropic/models/beta/beta_webhook_event_data.rb +3 -1
- data/lib/anthropic/models/beta/beta_webhook_session_updated_event_data.rb +41 -0
- data/lib/anthropic/models/beta/message_count_tokens_params.rb +6 -3
- data/lib/anthropic/models/beta/message_create_params.rb +2 -2
- data/lib/anthropic/models/beta/messages/batch_create_params.rb +2 -2
- data/lib/anthropic/models/beta/unwrap_webhook_event.rb +2 -2
- data/lib/anthropic/models/code_execution_tool_20250522.rb +3 -1
- data/lib/anthropic/models/code_execution_tool_20250825.rb +3 -1
- data/lib/anthropic/models/code_execution_tool_20260120.rb +3 -1
- data/lib/anthropic/models/code_execution_tool_20260521.rb +82 -0
- data/lib/anthropic/models/memory_tool_20250818.rb +3 -1
- data/lib/anthropic/models/message_count_tokens_params.rb +2 -2
- data/lib/anthropic/models/message_count_tokens_tool.rb +4 -1
- data/lib/anthropic/models/message_create_params.rb +2 -2
- data/lib/anthropic/models/messages/batch_create_params.rb +2 -2
- data/lib/anthropic/models/refusal_stop_details.rb +3 -7
- data/lib/anthropic/models/tool.rb +3 -1
- data/lib/anthropic/models/tool_bash_20250124.rb +3 -1
- data/lib/anthropic/models/tool_search_tool_bm25_20251119.rb +3 -1
- data/lib/anthropic/models/tool_search_tool_regex_20251119.rb +3 -1
- data/lib/anthropic/models/tool_text_editor_20250124.rb +3 -1
- data/lib/anthropic/models/tool_text_editor_20250429.rb +3 -1
- data/lib/anthropic/models/tool_text_editor_20250728.rb +3 -1
- data/lib/anthropic/models/tool_union.rb +4 -1
- data/lib/anthropic/models/web_fetch_tool_20250910.rb +3 -1
- data/lib/anthropic/models/web_fetch_tool_20260209.rb +3 -1
- data/lib/anthropic/models/web_fetch_tool_20260309.rb +3 -1
- data/lib/anthropic/models/web_search_tool_20250305.rb +3 -1
- data/lib/anthropic/models/web_search_tool_20260209.rb +3 -1
- data/lib/anthropic/models.rb +2 -0
- data/lib/anthropic/request_options.rb +9 -0
- data/lib/anthropic/resources/beta/messages.rb +3 -3
- data/lib/anthropic/resources/messages.rb +3 -3
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +6 -0
- data/rbi/anthropic/client.rbi +7 -2
- data/rbi/anthropic/errors.rbi +5 -0
- data/rbi/anthropic/helpers/aws/client.rbi +3 -6
- data/rbi/anthropic/helpers/bedrock/client.rbi +24 -13
- data/rbi/anthropic/helpers/bedrock/event_stream.rbi +25 -0
- data/rbi/anthropic/helpers/bedrock/mantle_client.rbi +3 -6
- data/rbi/anthropic/helpers/vertex/client.rbi +28 -8
- data/rbi/anthropic/internal/transport/base_client.rbi +39 -4
- data/rbi/anthropic/internal/util.rbi +5 -0
- data/rbi/anthropic/middleware.rbi +338 -0
- data/rbi/anthropic/models/beta/beta_advisor_tool_20260301.rbi +7 -1
- data/rbi/anthropic/models/beta/beta_code_execution_tool_20250522.rbi +7 -1
- data/rbi/anthropic/models/beta/beta_code_execution_tool_20250825.rbi +7 -1
- data/rbi/anthropic/models/beta/beta_code_execution_tool_20260120.rbi +7 -1
- data/rbi/anthropic/models/beta/beta_code_execution_tool_20260521.rbi +178 -0
- data/rbi/anthropic/models/beta/beta_fallback_block.rbi +19 -4
- data/rbi/anthropic/models/beta/beta_fallback_block_param.rbi +23 -13
- data/rbi/anthropic/models/beta/beta_fallback_refusal_trigger.rbi +108 -0
- data/rbi/anthropic/models/beta/beta_memory_tool_20250818.rbi +7 -1
- data/rbi/anthropic/models/beta/beta_refusal_stop_details.rbi +3 -9
- data/rbi/anthropic/models/beta/beta_tool.rbi +7 -1
- data/rbi/anthropic/models/beta/beta_tool_bash_20241022.rbi +7 -1
- data/rbi/anthropic/models/beta/beta_tool_bash_20250124.rbi +7 -1
- data/rbi/anthropic/models/beta/beta_tool_computer_use_20241022.rbi +7 -1
- data/rbi/anthropic/models/beta/beta_tool_computer_use_20250124.rbi +7 -1
- data/rbi/anthropic/models/beta/beta_tool_computer_use_20251124.rbi +7 -1
- data/rbi/anthropic/models/beta/beta_tool_search_tool_bm25_20251119.rbi +7 -1
- data/rbi/anthropic/models/beta/beta_tool_search_tool_regex_20251119.rbi +7 -1
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20241022.rbi +7 -1
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250124.rbi +7 -1
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250429.rbi +7 -1
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250728.rbi +7 -1
- data/rbi/anthropic/models/beta/beta_tool_union.rbi +1 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_20250910.rbi +7 -1
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_20260209.rbi +7 -1
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_20260309.rbi +7 -1
- data/rbi/anthropic/models/beta/beta_web_search_tool_20250305.rbi +7 -1
- data/rbi/anthropic/models/beta/beta_web_search_tool_20260209.rbi +7 -1
- data/rbi/anthropic/models/beta/beta_webhook_event.rbi +6 -3
- data/rbi/anthropic/models/beta/beta_webhook_event_data.rbi +2 -1
- data/rbi/anthropic/models/beta/beta_webhook_session_updated_event_data.rbi +63 -0
- data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +5 -0
- data/rbi/anthropic/models/beta/message_create_params.rbi +4 -0
- data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +4 -0
- data/rbi/anthropic/models/beta/unwrap_webhook_event.rbi +2 -1
- data/rbi/anthropic/models/code_execution_tool_20250522.rbi +7 -1
- data/rbi/anthropic/models/code_execution_tool_20250825.rbi +7 -1
- data/rbi/anthropic/models/code_execution_tool_20260120.rbi +7 -1
- data/rbi/anthropic/models/code_execution_tool_20260521.rbi +168 -0
- data/rbi/anthropic/models/memory_tool_20250818.rbi +7 -1
- data/rbi/anthropic/models/message_count_tokens_params.rbi +4 -0
- data/rbi/anthropic/models/message_count_tokens_tool.rbi +1 -0
- data/rbi/anthropic/models/message_create_params.rbi +4 -0
- data/rbi/anthropic/models/messages/batch_create_params.rbi +4 -0
- data/rbi/anthropic/models/refusal_stop_details.rbi +3 -9
- data/rbi/anthropic/models/tool.rbi +7 -1
- data/rbi/anthropic/models/tool_bash_20250124.rbi +7 -1
- data/rbi/anthropic/models/tool_search_tool_bm25_20251119.rbi +7 -1
- data/rbi/anthropic/models/tool_search_tool_regex_20251119.rbi +7 -1
- data/rbi/anthropic/models/tool_text_editor_20250124.rbi +7 -1
- data/rbi/anthropic/models/tool_text_editor_20250429.rbi +7 -1
- data/rbi/anthropic/models/tool_text_editor_20250728.rbi +7 -1
- data/rbi/anthropic/models/tool_union.rbi +1 -0
- data/rbi/anthropic/models/web_fetch_tool_20250910.rbi +7 -1
- data/rbi/anthropic/models/web_fetch_tool_20260209.rbi +7 -1
- data/rbi/anthropic/models/web_fetch_tool_20260309.rbi +7 -1
- data/rbi/anthropic/models/web_search_tool_20250305.rbi +7 -1
- data/rbi/anthropic/models/web_search_tool_20260209.rbi +7 -1
- data/rbi/anthropic/models.rbi +2 -0
- data/rbi/anthropic/request_options.rbi +5 -0
- data/rbi/anthropic/resources/beta/messages.rbi +3 -0
- data/rbi/anthropic/resources/messages.rbi +3 -0
- data/sig/anthropic/client.rbs +2 -1
- data/sig/anthropic/errors.rbs +3 -0
- data/sig/anthropic/helpers/bedrock/client.rbs +12 -4
- data/sig/anthropic/helpers/vertex/client.rbs +17 -4
- data/sig/anthropic/internal/transport/base_client.rbs +18 -3
- data/sig/anthropic/internal/util.rbs +2 -0
- data/sig/anthropic/middleware.rbs +117 -0
- data/sig/anthropic/models/beta/beta_advisor_tool_20260301.rbs +5 -1
- data/sig/anthropic/models/beta/beta_code_execution_tool_20250522.rbs +5 -1
- data/sig/anthropic/models/beta/beta_code_execution_tool_20250825.rbs +5 -1
- data/sig/anthropic/models/beta/beta_code_execution_tool_20260120.rbs +5 -1
- data/sig/anthropic/models/beta/beta_code_execution_tool_20260521.rbs +74 -0
- data/sig/anthropic/models/beta/beta_fallback_block.rbs +5 -0
- data/sig/anthropic/models/beta/beta_fallback_block_param.rbs +9 -2
- data/sig/anthropic/models/beta/beta_fallback_refusal_trigger.rbs +42 -0
- data/sig/anthropic/models/beta/beta_memory_tool_20250818.rbs +5 -1
- data/sig/anthropic/models/beta/beta_tool.rbs +5 -1
- data/sig/anthropic/models/beta/beta_tool_bash_20241022.rbs +5 -1
- data/sig/anthropic/models/beta/beta_tool_bash_20250124.rbs +5 -1
- data/sig/anthropic/models/beta/beta_tool_computer_use_20241022.rbs +5 -1
- data/sig/anthropic/models/beta/beta_tool_computer_use_20250124.rbs +5 -1
- data/sig/anthropic/models/beta/beta_tool_computer_use_20251124.rbs +5 -1
- data/sig/anthropic/models/beta/beta_tool_search_tool_bm25_20251119.rbs +5 -1
- data/sig/anthropic/models/beta/beta_tool_search_tool_regex_20251119.rbs +5 -1
- data/sig/anthropic/models/beta/beta_tool_text_editor_20241022.rbs +5 -1
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250124.rbs +5 -1
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250429.rbs +5 -1
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250728.rbs +5 -1
- data/sig/anthropic/models/beta/beta_tool_union.rbs +1 -0
- data/sig/anthropic/models/beta/beta_web_fetch_tool_20250910.rbs +5 -1
- data/sig/anthropic/models/beta/beta_web_fetch_tool_20260209.rbs +5 -1
- data/sig/anthropic/models/beta/beta_web_fetch_tool_20260309.rbs +5 -1
- data/sig/anthropic/models/beta/beta_web_search_tool_20250305.rbs +5 -1
- data/sig/anthropic/models/beta/beta_web_search_tool_20260209.rbs +5 -1
- data/sig/anthropic/models/beta/beta_webhook_event_data.rbs +1 -0
- data/sig/anthropic/models/beta/beta_webhook_session_updated_event_data.rbs +39 -0
- data/sig/anthropic/models/beta/message_count_tokens_params.rbs +1 -0
- data/sig/anthropic/models/code_execution_tool_20250522.rbs +5 -1
- data/sig/anthropic/models/code_execution_tool_20250825.rbs +5 -1
- data/sig/anthropic/models/code_execution_tool_20260120.rbs +5 -1
- data/sig/anthropic/models/code_execution_tool_20260521.rbs +70 -0
- data/sig/anthropic/models/memory_tool_20250818.rbs +5 -1
- data/sig/anthropic/models/message_count_tokens_tool.rbs +1 -0
- data/sig/anthropic/models/tool.rbs +5 -1
- data/sig/anthropic/models/tool_bash_20250124.rbs +5 -1
- data/sig/anthropic/models/tool_search_tool_bm25_20251119.rbs +5 -1
- data/sig/anthropic/models/tool_search_tool_regex_20251119.rbs +5 -1
- data/sig/anthropic/models/tool_text_editor_20250124.rbs +5 -1
- data/sig/anthropic/models/tool_text_editor_20250429.rbs +5 -1
- data/sig/anthropic/models/tool_text_editor_20250728.rbs +5 -1
- data/sig/anthropic/models/tool_union.rbs +1 -0
- data/sig/anthropic/models/web_fetch_tool_20250910.rbs +5 -1
- data/sig/anthropic/models/web_fetch_tool_20260209.rbs +5 -1
- data/sig/anthropic/models/web_fetch_tool_20260309.rbs +5 -1
- data/sig/anthropic/models/web_search_tool_20250305.rbs +5 -1
- data/sig/anthropic/models/web_search_tool_20260209.rbs +5 -1
- data/sig/anthropic/models.rbs +2 -0
- data/sig/anthropic/request_options.rbs +4 -1
- metadata +19 -2
|
@@ -362,7 +362,7 @@ module Anthropic
|
|
|
362
362
|
#
|
|
363
363
|
# See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
|
|
364
364
|
#
|
|
365
|
-
# @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::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaMemoryTool20250818, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolComputerUse20251124, 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::BetaAdvisorTool20260301, Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119, Anthropic::Models::Beta::BetaToolSearchToolRegex20251119, Anthropic::Models::Beta::BetaMCPToolset>, nil]
|
|
365
|
+
# @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::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaMemoryTool20250818, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolComputerUse20251124, 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::BetaAdvisorTool20260301, Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119, Anthropic::Models::Beta::BetaToolSearchToolRegex20251119, Anthropic::Models::Beta::BetaMCPToolset>, nil]
|
|
366
366
|
optional :tools, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::BetaToolUnion] }
|
|
367
367
|
|
|
368
368
|
# @!attribute top_k
|
|
@@ -454,7 +454,7 @@ module Anthropic
|
|
|
454
454
|
#
|
|
455
455
|
# @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,
|
|
456
456
|
#
|
|
457
|
-
# @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::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaMemoryTool20250818, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolComputerUse20251124, 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::BetaAdvisorTool20260301, Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119, Anthropic::Models::Beta::BetaToolSearchToolRegex20251119, Anthropic::Models::Beta::BetaMCPToolset>] Definitions of tools that the model may use.
|
|
457
|
+
# @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::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaMemoryTool20250818, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolComputerUse20251124, 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::BetaAdvisorTool20260301, Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119, Anthropic::Models::Beta::BetaToolSearchToolRegex20251119, Anthropic::Models::Beta::BetaMCPToolset>] Definitions of tools that the model may use.
|
|
458
458
|
#
|
|
459
459
|
# @param top_k [Integer] Only sample from the top K options for each subsequent token.
|
|
460
460
|
#
|
|
@@ -430,7 +430,7 @@ module Anthropic
|
|
|
430
430
|
#
|
|
431
431
|
# See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
|
|
432
432
|
#
|
|
433
|
-
# @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::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaMemoryTool20250818, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolComputerUse20251124, 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::BetaAdvisorTool20260301, Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119, Anthropic::Models::Beta::BetaToolSearchToolRegex20251119, Anthropic::Models::Beta::BetaMCPToolset>, nil]
|
|
433
|
+
# @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::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaMemoryTool20250818, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolComputerUse20251124, 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::BetaAdvisorTool20260301, Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119, Anthropic::Models::Beta::BetaToolSearchToolRegex20251119, Anthropic::Models::Beta::BetaMCPToolset>, nil]
|
|
434
434
|
optional :tools, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::BetaToolUnion] }
|
|
435
435
|
|
|
436
436
|
# @!attribute top_k
|
|
@@ -524,7 +524,7 @@ module Anthropic
|
|
|
524
524
|
#
|
|
525
525
|
# @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,
|
|
526
526
|
#
|
|
527
|
-
# @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::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaMemoryTool20250818, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolComputerUse20251124, 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::BetaAdvisorTool20260301, Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119, Anthropic::Models::Beta::BetaToolSearchToolRegex20251119, Anthropic::Models::Beta::BetaMCPToolset>] Definitions of tools that the model may use.
|
|
527
|
+
# @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::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaMemoryTool20250818, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolComputerUse20251124, 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::BetaAdvisorTool20260301, Anthropic::Models::Beta::BetaToolSearchToolBm25_20251119, Anthropic::Models::Beta::BetaToolSearchToolRegex20251119, Anthropic::Models::Beta::BetaMCPToolset>] Definitions of tools that the model may use.
|
|
528
528
|
#
|
|
529
529
|
# @param top_k [Integer] Only sample from the top K options for each subsequent token.
|
|
530
530
|
#
|
|
@@ -18,7 +18,7 @@ module Anthropic
|
|
|
18
18
|
|
|
19
19
|
# @!attribute data
|
|
20
20
|
#
|
|
21
|
-
# @return [Anthropic::Models::Beta::BetaWebhookSessionCreatedEventData, Anthropic::Models::Beta::BetaWebhookSessionPendingEventData, Anthropic::Models::Beta::BetaWebhookSessionRunningEventData, Anthropic::Models::Beta::BetaWebhookSessionIdledEventData, Anthropic::Models::Beta::BetaWebhookSessionRequiresActionEventData, Anthropic::Models::Beta::BetaWebhookSessionArchivedEventData, Anthropic::Models::Beta::BetaWebhookSessionDeletedEventData, Anthropic::Models::Beta::BetaWebhookSessionStatusRescheduledEventData, Anthropic::Models::Beta::BetaWebhookSessionStatusRunStartedEventData, Anthropic::Models::Beta::BetaWebhookSessionStatusIdledEventData, Anthropic::Models::Beta::BetaWebhookSessionStatusTerminatedEventData, Anthropic::Models::Beta::BetaWebhookSessionThreadCreatedEventData, Anthropic::Models::Beta::BetaWebhookSessionThreadIdledEventData, Anthropic::Models::Beta::BetaWebhookSessionThreadTerminatedEventData, Anthropic::Models::Beta::BetaWebhookSessionOutcomeEvaluationEndedEventData, Anthropic::Models::Beta::BetaWebhookVaultCreatedEventData, Anthropic::Models::Beta::BetaWebhookVaultArchivedEventData, Anthropic::Models::Beta::BetaWebhookVaultDeletedEventData, Anthropic::Models::Beta::BetaWebhookVaultCredentialCreatedEventData, Anthropic::Models::Beta::BetaWebhookVaultCredentialArchivedEventData, Anthropic::Models::Beta::BetaWebhookVaultCredentialDeletedEventData, Anthropic::Models::Beta::BetaWebhookVaultCredentialRefreshFailedEventData]
|
|
21
|
+
# @return [Anthropic::Models::Beta::BetaWebhookSessionCreatedEventData, Anthropic::Models::Beta::BetaWebhookSessionPendingEventData, Anthropic::Models::Beta::BetaWebhookSessionRunningEventData, Anthropic::Models::Beta::BetaWebhookSessionIdledEventData, Anthropic::Models::Beta::BetaWebhookSessionRequiresActionEventData, Anthropic::Models::Beta::BetaWebhookSessionArchivedEventData, Anthropic::Models::Beta::BetaWebhookSessionDeletedEventData, Anthropic::Models::Beta::BetaWebhookSessionStatusRescheduledEventData, Anthropic::Models::Beta::BetaWebhookSessionStatusRunStartedEventData, Anthropic::Models::Beta::BetaWebhookSessionStatusIdledEventData, Anthropic::Models::Beta::BetaWebhookSessionStatusTerminatedEventData, Anthropic::Models::Beta::BetaWebhookSessionThreadCreatedEventData, Anthropic::Models::Beta::BetaWebhookSessionThreadIdledEventData, Anthropic::Models::Beta::BetaWebhookSessionThreadTerminatedEventData, Anthropic::Models::Beta::BetaWebhookSessionOutcomeEvaluationEndedEventData, Anthropic::Models::Beta::BetaWebhookVaultCreatedEventData, Anthropic::Models::Beta::BetaWebhookVaultArchivedEventData, Anthropic::Models::Beta::BetaWebhookVaultDeletedEventData, Anthropic::Models::Beta::BetaWebhookVaultCredentialCreatedEventData, Anthropic::Models::Beta::BetaWebhookVaultCredentialArchivedEventData, Anthropic::Models::Beta::BetaWebhookVaultCredentialDeletedEventData, Anthropic::Models::Beta::BetaWebhookVaultCredentialRefreshFailedEventData, Anthropic::Models::Beta::BetaWebhookSessionUpdatedEventData]
|
|
22
22
|
required :data, union: -> { Anthropic::Beta::BetaWebhookEventData }
|
|
23
23
|
|
|
24
24
|
# @!attribute type
|
|
@@ -32,7 +32,7 @@ module Anthropic
|
|
|
32
32
|
#
|
|
33
33
|
# @param created_at [Time] RFC 3339 timestamp when the event occurred.
|
|
34
34
|
#
|
|
35
|
-
# @param data [Anthropic::Models::Beta::BetaWebhookSessionCreatedEventData, Anthropic::Models::Beta::BetaWebhookSessionPendingEventData, Anthropic::Models::Beta::BetaWebhookSessionRunningEventData, Anthropic::Models::Beta::BetaWebhookSessionIdledEventData, Anthropic::Models::Beta::BetaWebhookSessionRequiresActionEventData, Anthropic::Models::Beta::BetaWebhookSessionArchivedEventData, Anthropic::Models::Beta::BetaWebhookSessionDeletedEventData, Anthropic::Models::Beta::BetaWebhookSessionStatusRescheduledEventData, Anthropic::Models::Beta::BetaWebhookSessionStatusRunStartedEventData, Anthropic::Models::Beta::BetaWebhookSessionStatusIdledEventData, Anthropic::Models::Beta::BetaWebhookSessionStatusTerminatedEventData, Anthropic::Models::Beta::BetaWebhookSessionThreadCreatedEventData, Anthropic::Models::Beta::BetaWebhookSessionThreadIdledEventData, Anthropic::Models::Beta::BetaWebhookSessionThreadTerminatedEventData, Anthropic::Models::Beta::BetaWebhookSessionOutcomeEvaluationEndedEventData, Anthropic::Models::Beta::BetaWebhookVaultCreatedEventData, Anthropic::Models::Beta::BetaWebhookVaultArchivedEventData, Anthropic::Models::Beta::BetaWebhookVaultDeletedEventData, Anthropic::Models::Beta::BetaWebhookVaultCredentialCreatedEventData, Anthropic::Models::Beta::BetaWebhookVaultCredentialArchivedEventData, Anthropic::Models::Beta::BetaWebhookVaultCredentialDeletedEventData, Anthropic::Models::Beta::BetaWebhookVaultCredentialRefreshFailedEventData]
|
|
35
|
+
# @param data [Anthropic::Models::Beta::BetaWebhookSessionCreatedEventData, Anthropic::Models::Beta::BetaWebhookSessionPendingEventData, Anthropic::Models::Beta::BetaWebhookSessionRunningEventData, Anthropic::Models::Beta::BetaWebhookSessionIdledEventData, Anthropic::Models::Beta::BetaWebhookSessionRequiresActionEventData, Anthropic::Models::Beta::BetaWebhookSessionArchivedEventData, Anthropic::Models::Beta::BetaWebhookSessionDeletedEventData, Anthropic::Models::Beta::BetaWebhookSessionStatusRescheduledEventData, Anthropic::Models::Beta::BetaWebhookSessionStatusRunStartedEventData, Anthropic::Models::Beta::BetaWebhookSessionStatusIdledEventData, Anthropic::Models::Beta::BetaWebhookSessionStatusTerminatedEventData, Anthropic::Models::Beta::BetaWebhookSessionThreadCreatedEventData, Anthropic::Models::Beta::BetaWebhookSessionThreadIdledEventData, Anthropic::Models::Beta::BetaWebhookSessionThreadTerminatedEventData, Anthropic::Models::Beta::BetaWebhookSessionOutcomeEvaluationEndedEventData, Anthropic::Models::Beta::BetaWebhookVaultCreatedEventData, Anthropic::Models::Beta::BetaWebhookVaultArchivedEventData, Anthropic::Models::Beta::BetaWebhookVaultDeletedEventData, Anthropic::Models::Beta::BetaWebhookVaultCredentialCreatedEventData, Anthropic::Models::Beta::BetaWebhookVaultCredentialArchivedEventData, Anthropic::Models::Beta::BetaWebhookVaultCredentialDeletedEventData, Anthropic::Models::Beta::BetaWebhookVaultCredentialRefreshFailedEventData, Anthropic::Models::Beta::BetaWebhookSessionUpdatedEventData]
|
|
36
36
|
#
|
|
37
37
|
# @param type [Symbol, :event] Object type. Always `event` for webhook payloads.
|
|
38
38
|
end
|
|
@@ -62,13 +62,15 @@ module Anthropic
|
|
|
62
62
|
# Values: direct: The model can call this tool directly. code_execution_20250825:
|
|
63
63
|
# The tool can be called from the code execution environment (v1).
|
|
64
64
|
# code_execution_20260120: The tool can be called from the code execution
|
|
65
|
-
# environment (v2 with persistence).
|
|
65
|
+
# environment (v2 with persistence). code_execution_20260521: The tool can be
|
|
66
|
+
# called from the code execution environment (v2 with persistence).
|
|
66
67
|
module AllowedCaller
|
|
67
68
|
extend Anthropic::Internal::Type::Enum
|
|
68
69
|
|
|
69
70
|
DIRECT = :direct
|
|
70
71
|
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
71
72
|
CODE_EXECUTION_20260120 = :code_execution_20260120
|
|
73
|
+
CODE_EXECUTION_20260521 = :code_execution_20260521
|
|
72
74
|
|
|
73
75
|
# @!method self.values
|
|
74
76
|
# @return [Array<Symbol>]
|
|
@@ -62,13 +62,15 @@ module Anthropic
|
|
|
62
62
|
# Values: direct: The model can call this tool directly. code_execution_20250825:
|
|
63
63
|
# The tool can be called from the code execution environment (v1).
|
|
64
64
|
# code_execution_20260120: The tool can be called from the code execution
|
|
65
|
-
# environment (v2 with persistence).
|
|
65
|
+
# environment (v2 with persistence). code_execution_20260521: The tool can be
|
|
66
|
+
# called from the code execution environment (v2 with persistence).
|
|
66
67
|
module AllowedCaller
|
|
67
68
|
extend Anthropic::Internal::Type::Enum
|
|
68
69
|
|
|
69
70
|
DIRECT = :direct
|
|
70
71
|
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
71
72
|
CODE_EXECUTION_20260120 = :code_execution_20260120
|
|
73
|
+
CODE_EXECUTION_20260521 = :code_execution_20260521
|
|
72
74
|
|
|
73
75
|
# @!method self.values
|
|
74
76
|
# @return [Array<Symbol>]
|
|
@@ -65,13 +65,15 @@ module Anthropic
|
|
|
65
65
|
# Values: direct: The model can call this tool directly. code_execution_20250825:
|
|
66
66
|
# The tool can be called from the code execution environment (v1).
|
|
67
67
|
# code_execution_20260120: The tool can be called from the code execution
|
|
68
|
-
# environment (v2 with persistence).
|
|
68
|
+
# environment (v2 with persistence). code_execution_20260521: The tool can be
|
|
69
|
+
# called from the code execution environment (v2 with persistence).
|
|
69
70
|
module AllowedCaller
|
|
70
71
|
extend Anthropic::Internal::Type::Enum
|
|
71
72
|
|
|
72
73
|
DIRECT = :direct
|
|
73
74
|
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
74
75
|
CODE_EXECUTION_20260120 = :code_execution_20260120
|
|
76
|
+
CODE_EXECUTION_20260521 = :code_execution_20260521
|
|
75
77
|
|
|
76
78
|
# @!method self.values
|
|
77
79
|
# @return [Array<Symbol>]
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
class CodeExecutionTool20260521 < Anthropic::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute name
|
|
7
|
+
# Name of the tool.
|
|
8
|
+
#
|
|
9
|
+
# This is how the tool will be called by the model and in `tool_use` blocks.
|
|
10
|
+
#
|
|
11
|
+
# @return [Symbol, :code_execution]
|
|
12
|
+
required :name, const: :code_execution
|
|
13
|
+
|
|
14
|
+
# @!attribute type
|
|
15
|
+
#
|
|
16
|
+
# @return [Symbol, :code_execution_20260521]
|
|
17
|
+
required :type, const: :code_execution_20260521
|
|
18
|
+
|
|
19
|
+
# @!attribute allowed_callers
|
|
20
|
+
#
|
|
21
|
+
# @return [Array<Symbol, Anthropic::Models::CodeExecutionTool20260521::AllowedCaller>, nil]
|
|
22
|
+
optional :allowed_callers,
|
|
23
|
+
-> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::CodeExecutionTool20260521::AllowedCaller] }
|
|
24
|
+
|
|
25
|
+
# @!attribute cache_control
|
|
26
|
+
# Create a cache control breakpoint at this content block.
|
|
27
|
+
#
|
|
28
|
+
# @return [Anthropic::Models::CacheControlEphemeral, nil]
|
|
29
|
+
optional :cache_control, -> { Anthropic::CacheControlEphemeral }, nil?: true
|
|
30
|
+
|
|
31
|
+
# @!attribute defer_loading
|
|
32
|
+
# If true, tool will not be included in initial system prompt. Only loaded when
|
|
33
|
+
# returned via tool_reference from tool search.
|
|
34
|
+
#
|
|
35
|
+
# @return [Boolean, nil]
|
|
36
|
+
optional :defer_loading, Anthropic::Internal::Type::Boolean
|
|
37
|
+
|
|
38
|
+
# @!attribute strict
|
|
39
|
+
# When true, guarantees schema validation on tool names and inputs
|
|
40
|
+
#
|
|
41
|
+
# @return [Boolean, nil]
|
|
42
|
+
optional :strict, Anthropic::Internal::Type::Boolean
|
|
43
|
+
|
|
44
|
+
# @!method initialize(allowed_callers: nil, cache_control: nil, defer_loading: nil, strict: nil, name: :code_execution, type: :code_execution_20260521)
|
|
45
|
+
# Some parameter documentations has been truncated, see
|
|
46
|
+
# {Anthropic::Models::CodeExecutionTool20260521} for more details.
|
|
47
|
+
#
|
|
48
|
+
# Code execution tool with REPL state persistence.
|
|
49
|
+
#
|
|
50
|
+
# @param allowed_callers [Array<Symbol, Anthropic::Models::CodeExecutionTool20260521::AllowedCaller>]
|
|
51
|
+
#
|
|
52
|
+
# @param cache_control [Anthropic::Models::CacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
|
|
53
|
+
#
|
|
54
|
+
# @param defer_loading [Boolean] If true, tool will not be included in initial system prompt. Only loaded when re
|
|
55
|
+
#
|
|
56
|
+
# @param strict [Boolean] When true, guarantees schema validation on tool names and inputs
|
|
57
|
+
#
|
|
58
|
+
# @param name [Symbol, :code_execution] Name of the tool.
|
|
59
|
+
#
|
|
60
|
+
# @param type [Symbol, :code_execution_20260521]
|
|
61
|
+
|
|
62
|
+
# Specifies who can invoke a tool.
|
|
63
|
+
#
|
|
64
|
+
# Values: direct: The model can call this tool directly. code_execution_20250825:
|
|
65
|
+
# The tool can be called from the code execution environment (v1).
|
|
66
|
+
# code_execution_20260120: The tool can be called from the code execution
|
|
67
|
+
# environment (v2 with persistence). code_execution_20260521: The tool can be
|
|
68
|
+
# called from the code execution environment (v2 with persistence).
|
|
69
|
+
module AllowedCaller
|
|
70
|
+
extend Anthropic::Internal::Type::Enum
|
|
71
|
+
|
|
72
|
+
DIRECT = :direct
|
|
73
|
+
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
74
|
+
CODE_EXECUTION_20260120 = :code_execution_20260120
|
|
75
|
+
CODE_EXECUTION_20260521 = :code_execution_20260521
|
|
76
|
+
|
|
77
|
+
# @!method self.values
|
|
78
|
+
# @return [Array<Symbol>]
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
@@ -70,13 +70,15 @@ module Anthropic
|
|
|
70
70
|
# Values: direct: The model can call this tool directly. code_execution_20250825:
|
|
71
71
|
# The tool can be called from the code execution environment (v1).
|
|
72
72
|
# code_execution_20260120: The tool can be called from the code execution
|
|
73
|
-
# environment (v2 with persistence).
|
|
73
|
+
# environment (v2 with persistence). code_execution_20260521: The tool can be
|
|
74
|
+
# called from the code execution environment (v2 with persistence).
|
|
74
75
|
module AllowedCaller
|
|
75
76
|
extend Anthropic::Internal::Type::Enum
|
|
76
77
|
|
|
77
78
|
DIRECT = :direct
|
|
78
79
|
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
79
80
|
CODE_EXECUTION_20260120 = :code_execution_20260120
|
|
81
|
+
CODE_EXECUTION_20260521 = :code_execution_20260521
|
|
80
82
|
|
|
81
83
|
# @!method self.values
|
|
82
84
|
# @return [Array<Symbol>]
|
|
@@ -207,7 +207,7 @@ module Anthropic
|
|
|
207
207
|
#
|
|
208
208
|
# See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
|
|
209
209
|
#
|
|
210
|
-
# @return [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119>, nil]
|
|
210
|
+
# @return [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::CodeExecutionTool20260521, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119>, nil]
|
|
211
211
|
optional :tools, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::MessageCountTokensTool] }
|
|
212
212
|
|
|
213
213
|
# @!method initialize(messages:, model:, cache_control: nil, output_config: nil, system_: nil, thinking: nil, tool_choice: nil, tools: nil, request_options: {})
|
|
@@ -228,7 +228,7 @@ module Anthropic
|
|
|
228
228
|
#
|
|
229
229
|
# @param tool_choice [Anthropic::Models::ToolChoiceAuto, Anthropic::Models::ToolChoiceAny, Anthropic::Models::ToolChoiceTool, Anthropic::Models::ToolChoiceNone] How the model should use the provided tools. The model can use a specific tool,
|
|
230
230
|
#
|
|
231
|
-
# @param tools [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119>] Definitions of tools that the model may use.
|
|
231
|
+
# @param tools [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::CodeExecutionTool20260521, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119>] Definitions of tools that the model may use.
|
|
232
232
|
#
|
|
233
233
|
# @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}]
|
|
234
234
|
|
|
@@ -18,6 +18,9 @@ module Anthropic
|
|
|
18
18
|
# Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).
|
|
19
19
|
variant -> { Anthropic::CodeExecutionTool20260120 }
|
|
20
20
|
|
|
21
|
+
# Code execution tool with REPL state persistence.
|
|
22
|
+
variant -> { Anthropic::CodeExecutionTool20260521 }
|
|
23
|
+
|
|
21
24
|
variant -> { Anthropic::MemoryTool20250818 }
|
|
22
25
|
|
|
23
26
|
variant -> { Anthropic::ToolTextEditor20250124 }
|
|
@@ -42,7 +45,7 @@ module Anthropic
|
|
|
42
45
|
variant -> { Anthropic::ToolSearchToolRegex20251119 }
|
|
43
46
|
|
|
44
47
|
# @!method self.variants
|
|
45
|
-
# @return [Array(Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119)]
|
|
48
|
+
# @return [Array(Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::CodeExecutionTool20260521, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119)]
|
|
46
49
|
end
|
|
47
50
|
end
|
|
48
51
|
end
|
|
@@ -285,7 +285,7 @@ module Anthropic
|
|
|
285
285
|
#
|
|
286
286
|
# See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
|
|
287
287
|
#
|
|
288
|
-
# @return [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119>, nil]
|
|
288
|
+
# @return [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::CodeExecutionTool20260521, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119>, nil]
|
|
289
289
|
optional :tools, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::ToolUnion] }
|
|
290
290
|
|
|
291
291
|
# @!attribute top_k
|
|
@@ -350,7 +350,7 @@ module Anthropic
|
|
|
350
350
|
#
|
|
351
351
|
# @param tool_choice [Anthropic::Models::ToolChoiceAuto, Anthropic::Models::ToolChoiceAny, Anthropic::Models::ToolChoiceTool, Anthropic::Models::ToolChoiceNone] How the model should use the provided tools. The model can use a specific tool,
|
|
352
352
|
#
|
|
353
|
-
# @param tools [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119>] Definitions of tools that the model may use.
|
|
353
|
+
# @param tools [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::CodeExecutionTool20260521, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119>] Definitions of tools that the model may use.
|
|
354
354
|
#
|
|
355
355
|
# @param top_k [Integer] Only sample from the top K options for each subsequent token.
|
|
356
356
|
#
|
|
@@ -339,7 +339,7 @@ module Anthropic
|
|
|
339
339
|
#
|
|
340
340
|
# See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
|
|
341
341
|
#
|
|
342
|
-
# @return [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119>, nil]
|
|
342
|
+
# @return [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::CodeExecutionTool20260521, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119>, nil]
|
|
343
343
|
optional :tools, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::ToolUnion] }
|
|
344
344
|
|
|
345
345
|
# @!attribute top_k
|
|
@@ -412,7 +412,7 @@ module Anthropic
|
|
|
412
412
|
#
|
|
413
413
|
# @param tool_choice [Anthropic::Models::ToolChoiceAuto, Anthropic::Models::ToolChoiceAny, Anthropic::Models::ToolChoiceTool, Anthropic::Models::ToolChoiceNone] How the model should use the provided tools. The model can use a specific tool,
|
|
414
414
|
#
|
|
415
|
-
# @param tools [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119>] Definitions of tools that the model may use.
|
|
415
|
+
# @param tools [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::CodeExecutionTool20260521, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119>] Definitions of tools that the model may use.
|
|
416
416
|
#
|
|
417
417
|
# @param top_k [Integer] Only sample from the top K options for each subsequent token.
|
|
418
418
|
#
|
|
@@ -4,9 +4,7 @@ module Anthropic
|
|
|
4
4
|
module Models
|
|
5
5
|
class RefusalStopDetails < Anthropic::Internal::Type::BaseModel
|
|
6
6
|
# @!attribute category
|
|
7
|
-
# The policy category that triggered
|
|
8
|
-
#
|
|
9
|
-
# `null` when the refusal doesn't map to a named category.
|
|
7
|
+
# The policy category that triggered a refusal.
|
|
10
8
|
#
|
|
11
9
|
# @return [Symbol, Anthropic::Models::RefusalStopDetails::Category, nil]
|
|
12
10
|
required :category, enum: -> { Anthropic::RefusalStopDetails::Category }, nil?: true
|
|
@@ -31,15 +29,13 @@ module Anthropic
|
|
|
31
29
|
#
|
|
32
30
|
# Structured information about a refusal.
|
|
33
31
|
#
|
|
34
|
-
# @param category [Symbol, Anthropic::Models::RefusalStopDetails::Category, nil] The policy category that triggered
|
|
32
|
+
# @param category [Symbol, Anthropic::Models::RefusalStopDetails::Category, nil] The policy category that triggered a refusal.
|
|
35
33
|
#
|
|
36
34
|
# @param explanation [String, nil] Human-readable explanation of the refusal.
|
|
37
35
|
#
|
|
38
36
|
# @param type [Symbol, :refusal]
|
|
39
37
|
|
|
40
|
-
# The policy category that triggered
|
|
41
|
-
#
|
|
42
|
-
# `null` when the refusal doesn't map to a named category.
|
|
38
|
+
# The policy category that triggered a refusal.
|
|
43
39
|
#
|
|
44
40
|
# @see Anthropic::Models::RefusalStopDetails#category
|
|
45
41
|
module Category
|
|
@@ -135,13 +135,15 @@ module Anthropic
|
|
|
135
135
|
# Values: direct: The model can call this tool directly. code_execution_20250825:
|
|
136
136
|
# The tool can be called from the code execution environment (v1).
|
|
137
137
|
# code_execution_20260120: The tool can be called from the code execution
|
|
138
|
-
# environment (v2 with persistence).
|
|
138
|
+
# environment (v2 with persistence). code_execution_20260521: The tool can be
|
|
139
|
+
# called from the code execution environment (v2 with persistence).
|
|
139
140
|
module AllowedCaller
|
|
140
141
|
extend Anthropic::Internal::Type::Enum
|
|
141
142
|
|
|
142
143
|
DIRECT = :direct
|
|
143
144
|
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
144
145
|
CODE_EXECUTION_20260120 = :code_execution_20260120
|
|
146
|
+
CODE_EXECUTION_20260521 = :code_execution_20260521
|
|
145
147
|
|
|
146
148
|
# @!method self.values
|
|
147
149
|
# @return [Array<Symbol>]
|
|
@@ -70,13 +70,15 @@ module Anthropic
|
|
|
70
70
|
# Values: direct: The model can call this tool directly. code_execution_20250825:
|
|
71
71
|
# The tool can be called from the code execution environment (v1).
|
|
72
72
|
# code_execution_20260120: The tool can be called from the code execution
|
|
73
|
-
# environment (v2 with persistence).
|
|
73
|
+
# environment (v2 with persistence). code_execution_20260521: The tool can be
|
|
74
|
+
# called from the code execution environment (v2 with persistence).
|
|
74
75
|
module AllowedCaller
|
|
75
76
|
extend Anthropic::Internal::Type::Enum
|
|
76
77
|
|
|
77
78
|
DIRECT = :direct
|
|
78
79
|
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
79
80
|
CODE_EXECUTION_20260120 = :code_execution_20260120
|
|
81
|
+
CODE_EXECUTION_20260521 = :code_execution_20260521
|
|
80
82
|
|
|
81
83
|
# @!method self.values
|
|
82
84
|
# @return [Array<Symbol>]
|
|
@@ -73,13 +73,15 @@ module Anthropic
|
|
|
73
73
|
# Values: direct: The model can call this tool directly. code_execution_20250825:
|
|
74
74
|
# The tool can be called from the code execution environment (v1).
|
|
75
75
|
# code_execution_20260120: The tool can be called from the code execution
|
|
76
|
-
# environment (v2 with persistence).
|
|
76
|
+
# environment (v2 with persistence). code_execution_20260521: The tool can be
|
|
77
|
+
# called from the code execution environment (v2 with persistence).
|
|
77
78
|
module AllowedCaller
|
|
78
79
|
extend Anthropic::Internal::Type::Enum
|
|
79
80
|
|
|
80
81
|
DIRECT = :direct
|
|
81
82
|
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
82
83
|
CODE_EXECUTION_20260120 = :code_execution_20260120
|
|
84
|
+
CODE_EXECUTION_20260521 = :code_execution_20260521
|
|
83
85
|
|
|
84
86
|
# @!method self.values
|
|
85
87
|
# @return [Array<Symbol>]
|
|
@@ -73,13 +73,15 @@ module Anthropic
|
|
|
73
73
|
# Values: direct: The model can call this tool directly. code_execution_20250825:
|
|
74
74
|
# The tool can be called from the code execution environment (v1).
|
|
75
75
|
# code_execution_20260120: The tool can be called from the code execution
|
|
76
|
-
# environment (v2 with persistence).
|
|
76
|
+
# environment (v2 with persistence). code_execution_20260521: The tool can be
|
|
77
|
+
# called from the code execution environment (v2 with persistence).
|
|
77
78
|
module AllowedCaller
|
|
78
79
|
extend Anthropic::Internal::Type::Enum
|
|
79
80
|
|
|
80
81
|
DIRECT = :direct
|
|
81
82
|
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
82
83
|
CODE_EXECUTION_20260120 = :code_execution_20260120
|
|
84
|
+
CODE_EXECUTION_20260521 = :code_execution_20260521
|
|
83
85
|
|
|
84
86
|
# @!method self.values
|
|
85
87
|
# @return [Array<Symbol>]
|
|
@@ -70,13 +70,15 @@ module Anthropic
|
|
|
70
70
|
# Values: direct: The model can call this tool directly. code_execution_20250825:
|
|
71
71
|
# The tool can be called from the code execution environment (v1).
|
|
72
72
|
# code_execution_20260120: The tool can be called from the code execution
|
|
73
|
-
# environment (v2 with persistence).
|
|
73
|
+
# environment (v2 with persistence). code_execution_20260521: The tool can be
|
|
74
|
+
# called from the code execution environment (v2 with persistence).
|
|
74
75
|
module AllowedCaller
|
|
75
76
|
extend Anthropic::Internal::Type::Enum
|
|
76
77
|
|
|
77
78
|
DIRECT = :direct
|
|
78
79
|
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
79
80
|
CODE_EXECUTION_20260120 = :code_execution_20260120
|
|
81
|
+
CODE_EXECUTION_20260521 = :code_execution_20260521
|
|
80
82
|
|
|
81
83
|
# @!method self.values
|
|
82
84
|
# @return [Array<Symbol>]
|
|
@@ -70,13 +70,15 @@ module Anthropic
|
|
|
70
70
|
# Values: direct: The model can call this tool directly. code_execution_20250825:
|
|
71
71
|
# The tool can be called from the code execution environment (v1).
|
|
72
72
|
# code_execution_20260120: The tool can be called from the code execution
|
|
73
|
-
# environment (v2 with persistence).
|
|
73
|
+
# environment (v2 with persistence). code_execution_20260521: The tool can be
|
|
74
|
+
# called from the code execution environment (v2 with persistence).
|
|
74
75
|
module AllowedCaller
|
|
75
76
|
extend Anthropic::Internal::Type::Enum
|
|
76
77
|
|
|
77
78
|
DIRECT = :direct
|
|
78
79
|
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
79
80
|
CODE_EXECUTION_20260120 = :code_execution_20260120
|
|
81
|
+
CODE_EXECUTION_20260521 = :code_execution_20260521
|
|
80
82
|
|
|
81
83
|
# @!method self.values
|
|
82
84
|
# @return [Array<Symbol>]
|
|
@@ -79,13 +79,15 @@ module Anthropic
|
|
|
79
79
|
# Values: direct: The model can call this tool directly. code_execution_20250825:
|
|
80
80
|
# The tool can be called from the code execution environment (v1).
|
|
81
81
|
# code_execution_20260120: The tool can be called from the code execution
|
|
82
|
-
# environment (v2 with persistence).
|
|
82
|
+
# environment (v2 with persistence). code_execution_20260521: The tool can be
|
|
83
|
+
# called from the code execution environment (v2 with persistence).
|
|
83
84
|
module AllowedCaller
|
|
84
85
|
extend Anthropic::Internal::Type::Enum
|
|
85
86
|
|
|
86
87
|
DIRECT = :direct
|
|
87
88
|
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
88
89
|
CODE_EXECUTION_20260120 = :code_execution_20260120
|
|
90
|
+
CODE_EXECUTION_20260521 = :code_execution_20260521
|
|
89
91
|
|
|
90
92
|
# @!method self.values
|
|
91
93
|
# @return [Array<Symbol>]
|
|
@@ -18,6 +18,9 @@ module Anthropic
|
|
|
18
18
|
# Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint).
|
|
19
19
|
variant -> { Anthropic::CodeExecutionTool20260120 }
|
|
20
20
|
|
|
21
|
+
# Code execution tool with REPL state persistence.
|
|
22
|
+
variant -> { Anthropic::CodeExecutionTool20260521 }
|
|
23
|
+
|
|
21
24
|
variant -> { Anthropic::MemoryTool20250818 }
|
|
22
25
|
|
|
23
26
|
variant -> { Anthropic::ToolTextEditor20250124 }
|
|
@@ -42,7 +45,7 @@ module Anthropic
|
|
|
42
45
|
variant -> { Anthropic::ToolSearchToolRegex20251119 }
|
|
43
46
|
|
|
44
47
|
# @!method self.variants
|
|
45
|
-
# @return [Array(Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119)]
|
|
48
|
+
# @return [Array(Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::CodeExecutionTool20260120, Anthropic::Models::CodeExecutionTool20260521, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::WebSearchTool20260209, Anthropic::Models::WebFetchTool20260209, Anthropic::Models::WebFetchTool20260309, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119)]
|
|
46
49
|
end
|
|
47
50
|
end
|
|
48
51
|
end
|
|
@@ -104,13 +104,15 @@ module Anthropic
|
|
|
104
104
|
# Values: direct: The model can call this tool directly. code_execution_20250825:
|
|
105
105
|
# The tool can be called from the code execution environment (v1).
|
|
106
106
|
# code_execution_20260120: The tool can be called from the code execution
|
|
107
|
-
# environment (v2 with persistence).
|
|
107
|
+
# environment (v2 with persistence). code_execution_20260521: The tool can be
|
|
108
|
+
# called from the code execution environment (v2 with persistence).
|
|
108
109
|
module AllowedCaller
|
|
109
110
|
extend Anthropic::Internal::Type::Enum
|
|
110
111
|
|
|
111
112
|
DIRECT = :direct
|
|
112
113
|
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
113
114
|
CODE_EXECUTION_20260120 = :code_execution_20260120
|
|
115
|
+
CODE_EXECUTION_20260521 = :code_execution_20260521
|
|
114
116
|
|
|
115
117
|
# @!method self.values
|
|
116
118
|
# @return [Array<Symbol>]
|
|
@@ -104,13 +104,15 @@ module Anthropic
|
|
|
104
104
|
# Values: direct: The model can call this tool directly. code_execution_20250825:
|
|
105
105
|
# The tool can be called from the code execution environment (v1).
|
|
106
106
|
# code_execution_20260120: The tool can be called from the code execution
|
|
107
|
-
# environment (v2 with persistence).
|
|
107
|
+
# environment (v2 with persistence). code_execution_20260521: The tool can be
|
|
108
|
+
# called from the code execution environment (v2 with persistence).
|
|
108
109
|
module AllowedCaller
|
|
109
110
|
extend Anthropic::Internal::Type::Enum
|
|
110
111
|
|
|
111
112
|
DIRECT = :direct
|
|
112
113
|
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
113
114
|
CODE_EXECUTION_20260120 = :code_execution_20260120
|
|
115
|
+
CODE_EXECUTION_20260521 = :code_execution_20260521
|
|
114
116
|
|
|
115
117
|
# @!method self.values
|
|
116
118
|
# @return [Array<Symbol>]
|
|
@@ -116,13 +116,15 @@ module Anthropic
|
|
|
116
116
|
# Values: direct: The model can call this tool directly. code_execution_20250825:
|
|
117
117
|
# The tool can be called from the code execution environment (v1).
|
|
118
118
|
# code_execution_20260120: The tool can be called from the code execution
|
|
119
|
-
# environment (v2 with persistence).
|
|
119
|
+
# environment (v2 with persistence). code_execution_20260521: The tool can be
|
|
120
|
+
# called from the code execution environment (v2 with persistence).
|
|
120
121
|
module AllowedCaller
|
|
121
122
|
extend Anthropic::Internal::Type::Enum
|
|
122
123
|
|
|
123
124
|
DIRECT = :direct
|
|
124
125
|
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
125
126
|
CODE_EXECUTION_20260120 = :code_execution_20260120
|
|
127
|
+
CODE_EXECUTION_20260521 = :code_execution_20260521
|
|
126
128
|
|
|
127
129
|
# @!method self.values
|
|
128
130
|
# @return [Array<Symbol>]
|
|
@@ -97,13 +97,15 @@ module Anthropic
|
|
|
97
97
|
# Values: direct: The model can call this tool directly. code_execution_20250825:
|
|
98
98
|
# The tool can be called from the code execution environment (v1).
|
|
99
99
|
# code_execution_20260120: The tool can be called from the code execution
|
|
100
|
-
# environment (v2 with persistence).
|
|
100
|
+
# environment (v2 with persistence). code_execution_20260521: The tool can be
|
|
101
|
+
# called from the code execution environment (v2 with persistence).
|
|
101
102
|
module AllowedCaller
|
|
102
103
|
extend Anthropic::Internal::Type::Enum
|
|
103
104
|
|
|
104
105
|
DIRECT = :direct
|
|
105
106
|
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
106
107
|
CODE_EXECUTION_20260120 = :code_execution_20260120
|
|
108
|
+
CODE_EXECUTION_20260521 = :code_execution_20260521
|
|
107
109
|
|
|
108
110
|
# @!method self.values
|
|
109
111
|
# @return [Array<Symbol>]
|
|
@@ -97,13 +97,15 @@ module Anthropic
|
|
|
97
97
|
# Values: direct: The model can call this tool directly. code_execution_20250825:
|
|
98
98
|
# The tool can be called from the code execution environment (v1).
|
|
99
99
|
# code_execution_20260120: The tool can be called from the code execution
|
|
100
|
-
# environment (v2 with persistence).
|
|
100
|
+
# environment (v2 with persistence). code_execution_20260521: The tool can be
|
|
101
|
+
# called from the code execution environment (v2 with persistence).
|
|
101
102
|
module AllowedCaller
|
|
102
103
|
extend Anthropic::Internal::Type::Enum
|
|
103
104
|
|
|
104
105
|
DIRECT = :direct
|
|
105
106
|
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
106
107
|
CODE_EXECUTION_20260120 = :code_execution_20260120
|
|
108
|
+
CODE_EXECUTION_20260521 = :code_execution_20260521
|
|
107
109
|
|
|
108
110
|
# @!method self.values
|
|
109
111
|
# @return [Array<Symbol>]
|
data/lib/anthropic/models.rb
CHANGED
|
@@ -139,6 +139,8 @@ module Anthropic
|
|
|
139
139
|
|
|
140
140
|
CodeExecutionTool20260120 = Anthropic::Models::CodeExecutionTool20260120
|
|
141
141
|
|
|
142
|
+
CodeExecutionTool20260521 = Anthropic::Models::CodeExecutionTool20260521
|
|
143
|
+
|
|
142
144
|
CodeExecutionToolResultBlock = Anthropic::Models::CodeExecutionToolResultBlock
|
|
143
145
|
|
|
144
146
|
CodeExecutionToolResultBlockContent = Anthropic::Models::CodeExecutionToolResultBlockContent
|
|
@@ -65,6 +65,15 @@ module Anthropic
|
|
|
65
65
|
# @return [Float, nil]
|
|
66
66
|
optional :timeout, Float
|
|
67
67
|
|
|
68
|
+
# @!attribute middleware
|
|
69
|
+
# Per-request HTTP around-middleware — a single `#call(req, nxt)` callable
|
|
70
|
+
# or an array of them (see {Anthropic::Middleware}). Appended innermost,
|
|
71
|
+
# below any client-level middleware, so client-level entries still wrap
|
|
72
|
+
# every request this one fabricates or retries.
|
|
73
|
+
#
|
|
74
|
+
# @return [Array<#call>, #call, nil]
|
|
75
|
+
optional :middleware, Anthropic::Internal::Type::Unknown
|
|
76
|
+
|
|
68
77
|
# @!method initialize(values = {})
|
|
69
78
|
# Returns a new instance of RequestOptions.
|
|
70
79
|
#
|