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
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaMCPToolset < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute mcp_server_name
|
|
8
|
+
# Name of the MCP server to configure tools for
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :mcp_server_name, String
|
|
12
|
+
|
|
13
|
+
# @!attribute type
|
|
14
|
+
#
|
|
15
|
+
# @return [Symbol, :mcp_toolset]
|
|
16
|
+
required :type, const: :mcp_toolset
|
|
17
|
+
|
|
18
|
+
# @!attribute cache_control
|
|
19
|
+
# Create a cache control breakpoint at this content block.
|
|
20
|
+
#
|
|
21
|
+
# @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
|
|
22
|
+
optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
|
|
23
|
+
|
|
24
|
+
# @!attribute configs
|
|
25
|
+
# Configuration overrides for specific tools, keyed by tool name
|
|
26
|
+
#
|
|
27
|
+
# @return [Hash{Symbol=>Anthropic::Models::Beta::BetaMCPToolConfig}, nil]
|
|
28
|
+
optional :configs,
|
|
29
|
+
-> { Anthropic::Internal::Type::HashOf[Anthropic::Beta::BetaMCPToolConfig] },
|
|
30
|
+
nil?: true
|
|
31
|
+
|
|
32
|
+
# @!attribute default_config
|
|
33
|
+
# Default configuration applied to all tools from this server
|
|
34
|
+
#
|
|
35
|
+
# @return [Anthropic::Models::Beta::BetaMCPToolDefaultConfig, nil]
|
|
36
|
+
optional :default_config, -> { Anthropic::Beta::BetaMCPToolDefaultConfig }
|
|
37
|
+
|
|
38
|
+
# @!method initialize(mcp_server_name:, cache_control: nil, configs: nil, default_config: nil, type: :mcp_toolset)
|
|
39
|
+
# Configuration for a group of tools from an MCP server.
|
|
40
|
+
#
|
|
41
|
+
# Allows configuring enabled status and defer_loading for all tools from an MCP
|
|
42
|
+
# server, with optional per-tool overrides.
|
|
43
|
+
#
|
|
44
|
+
# @param mcp_server_name [String] Name of the MCP server to configure tools for
|
|
45
|
+
#
|
|
46
|
+
# @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
|
|
47
|
+
#
|
|
48
|
+
# @param configs [Hash{Symbol=>Anthropic::Models::Beta::BetaMCPToolConfig}, nil] Configuration overrides for specific tools, keyed by tool name
|
|
49
|
+
#
|
|
50
|
+
# @param default_config [Anthropic::Models::Beta::BetaMCPToolDefaultConfig] Default configuration applied to all tools from this server
|
|
51
|
+
#
|
|
52
|
+
# @param type [Symbol, :mcp_toolset]
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
BetaMCPToolset = Beta::BetaMCPToolset
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -17,28 +17,63 @@ module Anthropic
|
|
|
17
17
|
# @return [Symbol, :memory_20250818]
|
|
18
18
|
required :type, const: :memory_20250818
|
|
19
19
|
|
|
20
|
+
# @!attribute allowed_callers
|
|
21
|
+
#
|
|
22
|
+
# @return [Array<Symbol, Anthropic::Models::Beta::BetaMemoryTool20250818::AllowedCaller>, nil]
|
|
23
|
+
optional :allowed_callers,
|
|
24
|
+
-> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::BetaMemoryTool20250818::AllowedCaller] }
|
|
25
|
+
|
|
20
26
|
# @!attribute cache_control
|
|
21
27
|
# Create a cache control breakpoint at this content block.
|
|
22
28
|
#
|
|
23
29
|
# @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
|
|
24
30
|
optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
|
|
25
31
|
|
|
32
|
+
# @!attribute defer_loading
|
|
33
|
+
# If true, tool will not be included in initial system prompt. Only loaded when
|
|
34
|
+
# returned via tool_reference from tool search.
|
|
35
|
+
#
|
|
36
|
+
# @return [Boolean, nil]
|
|
37
|
+
optional :defer_loading, Anthropic::Internal::Type::Boolean
|
|
38
|
+
|
|
39
|
+
# @!attribute input_examples
|
|
40
|
+
#
|
|
41
|
+
# @return [Array<Hash{Symbol=>Object}>, nil]
|
|
42
|
+
optional :input_examples,
|
|
43
|
+
Anthropic::Internal::Type::ArrayOf[Anthropic::Internal::Type::HashOf[Anthropic::Internal::Type::Unknown]]
|
|
44
|
+
|
|
26
45
|
# @!attribute strict
|
|
27
46
|
#
|
|
28
47
|
# @return [Boolean, nil]
|
|
29
48
|
optional :strict, Anthropic::Internal::Type::Boolean
|
|
30
49
|
|
|
31
|
-
# @!method initialize(cache_control: nil, strict: nil, name: :memory, type: :memory_20250818)
|
|
50
|
+
# @!method initialize(allowed_callers: nil, cache_control: nil, defer_loading: nil, input_examples: nil, strict: nil, name: :memory, type: :memory_20250818)
|
|
32
51
|
# Some parameter documentations has been truncated, see
|
|
33
52
|
# {Anthropic::Models::Beta::BetaMemoryTool20250818} for more details.
|
|
34
53
|
#
|
|
54
|
+
# @param allowed_callers [Array<Symbol, Anthropic::Models::Beta::BetaMemoryTool20250818::AllowedCaller>]
|
|
55
|
+
#
|
|
35
56
|
# @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
|
|
36
57
|
#
|
|
58
|
+
# @param defer_loading [Boolean] If true, tool will not be included in initial system prompt. Only loaded when re
|
|
59
|
+
#
|
|
60
|
+
# @param input_examples [Array<Hash{Symbol=>Object}>]
|
|
61
|
+
#
|
|
37
62
|
# @param strict [Boolean]
|
|
38
63
|
#
|
|
39
64
|
# @param name [Symbol, :memory] Name of the tool.
|
|
40
65
|
#
|
|
41
66
|
# @param type [Symbol, :memory_20250818]
|
|
67
|
+
|
|
68
|
+
module AllowedCaller
|
|
69
|
+
extend Anthropic::Internal::Type::Enum
|
|
70
|
+
|
|
71
|
+
DIRECT = :direct
|
|
72
|
+
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
73
|
+
|
|
74
|
+
# @!method self.values
|
|
75
|
+
# @return [Array<Symbol>]
|
|
76
|
+
end
|
|
42
77
|
end
|
|
43
78
|
end
|
|
44
79
|
|
|
@@ -56,7 +56,7 @@ module Anthropic
|
|
|
56
56
|
# [{ "type": "text", "text": "B)" }]
|
|
57
57
|
# ```
|
|
58
58
|
#
|
|
59
|
-
# @return [Array<Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaWebFetchToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock>]
|
|
59
|
+
# @return [Array<Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaWebFetchToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaToolSearchToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock>]
|
|
60
60
|
required :content, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::BetaContentBlock] }
|
|
61
61
|
|
|
62
62
|
# parsed value of response when a JSON output schema object has been specified via :output_format
|
|
@@ -160,7 +160,7 @@ module Anthropic
|
|
|
160
160
|
#
|
|
161
161
|
# @param container [Anthropic::Models::Beta::BetaContainer, nil] Information about the container used in the request (for the code execution tool
|
|
162
162
|
#
|
|
163
|
-
# @param content [Array<Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaWebFetchToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock>] Content generated by the model.
|
|
163
|
+
# @param content [Array<Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaWebFetchToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaToolSearchToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock>] Content generated by the model.
|
|
164
164
|
#
|
|
165
165
|
# @param context_management [Anthropic::Models::Beta::BetaContextManagementResponse, nil] Context management response.
|
|
166
166
|
#
|
|
@@ -6,7 +6,7 @@ module Anthropic
|
|
|
6
6
|
class BetaMessageParam < Anthropic::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute content
|
|
8
8
|
#
|
|
9
|
-
# @return [String, Array<Anthropic::Models::Beta::BetaTextBlockParam, Anthropic::Models::Beta::BetaImageBlockParam, Anthropic::Models::Beta::BetaRequestDocumentBlock, Anthropic::Models::Beta::BetaSearchResultBlockParam, Anthropic::Models::Beta::BetaThinkingBlockParam, Anthropic::Models::Beta::BetaRedactedThinkingBlockParam, Anthropic::Models::Beta::BetaToolUseBlockParam, Anthropic::Models::Beta::BetaToolResultBlockParam, Anthropic::Models::Beta::BetaServerToolUseBlockParam, Anthropic::Models::Beta::BetaWebSearchToolResultBlockParam, Anthropic::Models::Beta::BetaWebFetchToolResultBlockParam, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaMCPToolUseBlockParam, Anthropic::Models::Beta::BetaRequestMCPToolResultBlockParam, Anthropic::Models::Beta::BetaContainerUploadBlockParam>]
|
|
9
|
+
# @return [String, Array<Anthropic::Models::Beta::BetaTextBlockParam, Anthropic::Models::Beta::BetaImageBlockParam, Anthropic::Models::Beta::BetaRequestDocumentBlock, Anthropic::Models::Beta::BetaSearchResultBlockParam, Anthropic::Models::Beta::BetaThinkingBlockParam, Anthropic::Models::Beta::BetaRedactedThinkingBlockParam, Anthropic::Models::Beta::BetaToolUseBlockParam, Anthropic::Models::Beta::BetaToolResultBlockParam, Anthropic::Models::Beta::BetaServerToolUseBlockParam, Anthropic::Models::Beta::BetaWebSearchToolResultBlockParam, Anthropic::Models::Beta::BetaWebFetchToolResultBlockParam, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaToolSearchToolResultBlockParam, Anthropic::Models::Beta::BetaMCPToolUseBlockParam, Anthropic::Models::Beta::BetaRequestMCPToolResultBlockParam, Anthropic::Models::Beta::BetaContainerUploadBlockParam>]
|
|
10
10
|
required :content, union: -> { Anthropic::Beta::BetaMessageParam::Content }
|
|
11
11
|
|
|
12
12
|
# @!attribute role
|
|
@@ -15,7 +15,7 @@ module Anthropic
|
|
|
15
15
|
required :role, enum: -> { Anthropic::Beta::BetaMessageParam::Role }
|
|
16
16
|
|
|
17
17
|
# @!method initialize(content:, role:)
|
|
18
|
-
# @param content [String, Array<Anthropic::Models::Beta::BetaTextBlockParam, Anthropic::Models::Beta::BetaImageBlockParam, Anthropic::Models::Beta::BetaRequestDocumentBlock, Anthropic::Models::Beta::BetaSearchResultBlockParam, Anthropic::Models::Beta::BetaThinkingBlockParam, Anthropic::Models::Beta::BetaRedactedThinkingBlockParam, Anthropic::Models::Beta::BetaToolUseBlockParam, Anthropic::Models::Beta::BetaToolResultBlockParam, Anthropic::Models::Beta::BetaServerToolUseBlockParam, Anthropic::Models::Beta::BetaWebSearchToolResultBlockParam, Anthropic::Models::Beta::BetaWebFetchToolResultBlockParam, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaMCPToolUseBlockParam, Anthropic::Models::Beta::BetaRequestMCPToolResultBlockParam, Anthropic::Models::Beta::BetaContainerUploadBlockParam>]
|
|
18
|
+
# @param content [String, Array<Anthropic::Models::Beta::BetaTextBlockParam, Anthropic::Models::Beta::BetaImageBlockParam, Anthropic::Models::Beta::BetaRequestDocumentBlock, Anthropic::Models::Beta::BetaSearchResultBlockParam, Anthropic::Models::Beta::BetaThinkingBlockParam, Anthropic::Models::Beta::BetaRedactedThinkingBlockParam, Anthropic::Models::Beta::BetaToolUseBlockParam, Anthropic::Models::Beta::BetaToolResultBlockParam, Anthropic::Models::Beta::BetaServerToolUseBlockParam, Anthropic::Models::Beta::BetaWebSearchToolResultBlockParam, Anthropic::Models::Beta::BetaWebFetchToolResultBlockParam, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaToolSearchToolResultBlockParam, Anthropic::Models::Beta::BetaMCPToolUseBlockParam, Anthropic::Models::Beta::BetaRequestMCPToolResultBlockParam, Anthropic::Models::Beta::BetaContainerUploadBlockParam>]
|
|
19
19
|
# @param role [Symbol, Anthropic::Models::Beta::BetaMessageParam::Role]
|
|
20
20
|
|
|
21
21
|
# @see Anthropic::Models::Beta::BetaMessageParam#content
|
|
@@ -27,7 +27,7 @@ module Anthropic
|
|
|
27
27
|
variant -> { Anthropic::Models::Beta::BetaMessageParam::Content::BetaContentBlockParamArray }
|
|
28
28
|
|
|
29
29
|
# @!method self.variants
|
|
30
|
-
# @return [Array(String, Array<Anthropic::Models::Beta::BetaTextBlockParam, Anthropic::Models::Beta::BetaImageBlockParam, Anthropic::Models::Beta::BetaRequestDocumentBlock, Anthropic::Models::Beta::BetaSearchResultBlockParam, Anthropic::Models::Beta::BetaThinkingBlockParam, Anthropic::Models::Beta::BetaRedactedThinkingBlockParam, Anthropic::Models::Beta::BetaToolUseBlockParam, Anthropic::Models::Beta::BetaToolResultBlockParam, Anthropic::Models::Beta::BetaServerToolUseBlockParam, Anthropic::Models::Beta::BetaWebSearchToolResultBlockParam, Anthropic::Models::Beta::BetaWebFetchToolResultBlockParam, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaMCPToolUseBlockParam, Anthropic::Models::Beta::BetaRequestMCPToolResultBlockParam, Anthropic::Models::Beta::BetaContainerUploadBlockParam>)]
|
|
30
|
+
# @return [Array(String, Array<Anthropic::Models::Beta::BetaTextBlockParam, Anthropic::Models::Beta::BetaImageBlockParam, Anthropic::Models::Beta::BetaRequestDocumentBlock, Anthropic::Models::Beta::BetaSearchResultBlockParam, Anthropic::Models::Beta::BetaThinkingBlockParam, Anthropic::Models::Beta::BetaRedactedThinkingBlockParam, Anthropic::Models::Beta::BetaToolUseBlockParam, Anthropic::Models::Beta::BetaToolResultBlockParam, Anthropic::Models::Beta::BetaServerToolUseBlockParam, Anthropic::Models::Beta::BetaWebSearchToolResultBlockParam, Anthropic::Models::Beta::BetaWebFetchToolResultBlockParam, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlockParam, Anthropic::Models::Beta::BetaToolSearchToolResultBlockParam, Anthropic::Models::Beta::BetaMCPToolUseBlockParam, Anthropic::Models::Beta::BetaRequestMCPToolResultBlockParam, Anthropic::Models::Beta::BetaContainerUploadBlockParam>)]
|
|
31
31
|
|
|
32
32
|
# @type [Anthropic::Internal::Type::Converter]
|
|
33
33
|
BetaContentBlockParamArray =
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaOutputConfig < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute effort
|
|
8
|
+
# All possible effort levels.
|
|
9
|
+
#
|
|
10
|
+
# @return [Symbol, Anthropic::Models::Beta::BetaOutputConfig::Effort, nil]
|
|
11
|
+
optional :effort, enum: -> { Anthropic::Beta::BetaOutputConfig::Effort }, nil?: true
|
|
12
|
+
|
|
13
|
+
# @!method initialize(effort: nil)
|
|
14
|
+
# @param effort [Symbol, Anthropic::Models::Beta::BetaOutputConfig::Effort, nil] All possible effort levels.
|
|
15
|
+
|
|
16
|
+
# All possible effort levels.
|
|
17
|
+
#
|
|
18
|
+
# @see Anthropic::Models::Beta::BetaOutputConfig#effort
|
|
19
|
+
module Effort
|
|
20
|
+
extend Anthropic::Internal::Type::Enum
|
|
21
|
+
|
|
22
|
+
LOW = :low
|
|
23
|
+
MEDIUM = :medium
|
|
24
|
+
HIGH = :high
|
|
25
|
+
|
|
26
|
+
# @!method self.values
|
|
27
|
+
# @return [Array<Symbol>]
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
BetaOutputConfig = Beta::BetaOutputConfig
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -7,7 +7,7 @@ module Anthropic
|
|
|
7
7
|
# @!attribute content_block
|
|
8
8
|
# Response model for a file uploaded to the container.
|
|
9
9
|
#
|
|
10
|
-
# @return [Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaWebFetchToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock]
|
|
10
|
+
# @return [Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaWebFetchToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaToolSearchToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock]
|
|
11
11
|
required :content_block, union: -> { Anthropic::Beta::BetaRawContentBlockStartEvent::ContentBlock }
|
|
12
12
|
|
|
13
13
|
# @!attribute index
|
|
@@ -21,7 +21,7 @@ module Anthropic
|
|
|
21
21
|
required :type, const: :content_block_start
|
|
22
22
|
|
|
23
23
|
# @!method initialize(content_block:, index:, type: :content_block_start)
|
|
24
|
-
# @param content_block [Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaWebFetchToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock] Response model for a file uploaded to the container.
|
|
24
|
+
# @param content_block [Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaWebFetchToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaToolSearchToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock] Response model for a file uploaded to the container.
|
|
25
25
|
#
|
|
26
26
|
# @param index [Integer]
|
|
27
27
|
#
|
|
@@ -56,6 +56,8 @@ module Anthropic
|
|
|
56
56
|
variant :text_editor_code_execution_tool_result,
|
|
57
57
|
-> { Anthropic::Beta::BetaTextEditorCodeExecutionToolResultBlock }
|
|
58
58
|
|
|
59
|
+
variant :tool_search_tool_result, -> { Anthropic::Beta::BetaToolSearchToolResultBlock }
|
|
60
|
+
|
|
59
61
|
variant :mcp_tool_use, -> { Anthropic::Beta::BetaMCPToolUseBlock }
|
|
60
62
|
|
|
61
63
|
variant :mcp_tool_result, -> { Anthropic::Beta::BetaMCPToolResultBlock }
|
|
@@ -64,7 +66,7 @@ module Anthropic
|
|
|
64
66
|
variant :container_upload, -> { Anthropic::Beta::BetaContainerUploadBlock }
|
|
65
67
|
|
|
66
68
|
# @!method self.variants
|
|
67
|
-
# @return [Array(Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaWebFetchToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock)]
|
|
69
|
+
# @return [Array(Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaWebFetchToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaToolSearchToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock)]
|
|
68
70
|
end
|
|
69
71
|
end
|
|
70
72
|
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaServerToolCaller < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute tool_id
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :tool_id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute type
|
|
13
|
+
#
|
|
14
|
+
# @return [Symbol, :code_execution_20250825]
|
|
15
|
+
required :type, const: :code_execution_20250825
|
|
16
|
+
|
|
17
|
+
# @!method initialize(tool_id:, type: :code_execution_20250825)
|
|
18
|
+
# Tool invocation generated by a server-side tool.
|
|
19
|
+
#
|
|
20
|
+
# @param tool_id [String]
|
|
21
|
+
# @param type [Symbol, :code_execution_20250825]
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
BetaServerToolCaller = Beta::BetaServerToolCaller
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -9,6 +9,12 @@ module Anthropic
|
|
|
9
9
|
# @return [String]
|
|
10
10
|
required :id, String
|
|
11
11
|
|
|
12
|
+
# @!attribute caller_
|
|
13
|
+
# Tool invocation directly from the model.
|
|
14
|
+
#
|
|
15
|
+
# @return [Anthropic::Models::Beta::BetaDirectCaller, Anthropic::Models::Beta::BetaServerToolCaller]
|
|
16
|
+
required :caller_, union: -> { Anthropic::Beta::BetaServerToolUseBlock::Caller }, api_name: :caller
|
|
17
|
+
|
|
12
18
|
# @!attribute input
|
|
13
19
|
#
|
|
14
20
|
# @return [Object]
|
|
@@ -24,12 +30,35 @@ module Anthropic
|
|
|
24
30
|
# @return [Symbol, :server_tool_use]
|
|
25
31
|
required :type, const: :server_tool_use
|
|
26
32
|
|
|
27
|
-
# @!method initialize(id:, input:, name:, type: :server_tool_use)
|
|
33
|
+
# @!method initialize(id:, caller_:, input:, name:, type: :server_tool_use)
|
|
28
34
|
# @param id [String]
|
|
35
|
+
#
|
|
36
|
+
# @param caller_ [Anthropic::Models::Beta::BetaDirectCaller, Anthropic::Models::Beta::BetaServerToolCaller] Tool invocation directly from the model.
|
|
37
|
+
#
|
|
29
38
|
# @param input [Object]
|
|
39
|
+
#
|
|
30
40
|
# @param name [Symbol, Anthropic::Models::Beta::BetaServerToolUseBlock::Name]
|
|
41
|
+
#
|
|
31
42
|
# @param type [Symbol, :server_tool_use]
|
|
32
43
|
|
|
44
|
+
# Tool invocation directly from the model.
|
|
45
|
+
#
|
|
46
|
+
# @see Anthropic::Models::Beta::BetaServerToolUseBlock#caller_
|
|
47
|
+
module Caller
|
|
48
|
+
extend Anthropic::Internal::Type::Union
|
|
49
|
+
|
|
50
|
+
discriminator :type
|
|
51
|
+
|
|
52
|
+
# Tool invocation directly from the model.
|
|
53
|
+
variant :direct, -> { Anthropic::Beta::BetaDirectCaller }
|
|
54
|
+
|
|
55
|
+
# Tool invocation generated by a server-side tool.
|
|
56
|
+
variant :code_execution_20250825, -> { Anthropic::Beta::BetaServerToolCaller }
|
|
57
|
+
|
|
58
|
+
# @!method self.variants
|
|
59
|
+
# @return [Array(Anthropic::Models::Beta::BetaDirectCaller, Anthropic::Models::Beta::BetaServerToolCaller)]
|
|
60
|
+
end
|
|
61
|
+
|
|
33
62
|
# @see Anthropic::Models::Beta::BetaServerToolUseBlock#name
|
|
34
63
|
module Name
|
|
35
64
|
extend Anthropic::Internal::Type::Enum
|
|
@@ -39,6 +68,8 @@ module Anthropic
|
|
|
39
68
|
CODE_EXECUTION = :code_execution
|
|
40
69
|
BASH_CODE_EXECUTION = :bash_code_execution
|
|
41
70
|
TEXT_EDITOR_CODE_EXECUTION = :text_editor_code_execution
|
|
71
|
+
TOOL_SEARCH_TOOL_REGEX = :tool_search_tool_regex
|
|
72
|
+
TOOL_SEARCH_TOOL_BM25 = :tool_search_tool_bm25
|
|
42
73
|
|
|
43
74
|
# @!method self.values
|
|
44
75
|
# @return [Array<Symbol>]
|
|
@@ -30,7 +30,17 @@ module Anthropic
|
|
|
30
30
|
# @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
|
|
31
31
|
optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
|
|
32
32
|
|
|
33
|
-
# @!
|
|
33
|
+
# @!attribute caller_
|
|
34
|
+
# Tool invocation directly from the model.
|
|
35
|
+
#
|
|
36
|
+
# @return [Anthropic::Models::Beta::BetaDirectCaller, Anthropic::Models::Beta::BetaServerToolCaller, nil]
|
|
37
|
+
optional :caller_,
|
|
38
|
+
union: -> {
|
|
39
|
+
Anthropic::Beta::BetaServerToolUseBlockParam::Caller
|
|
40
|
+
},
|
|
41
|
+
api_name: :caller
|
|
42
|
+
|
|
43
|
+
# @!method initialize(id:, input:, name:, cache_control: nil, caller_: nil, type: :server_tool_use)
|
|
34
44
|
# @param id [String]
|
|
35
45
|
#
|
|
36
46
|
# @param input [Hash{Symbol=>Object}]
|
|
@@ -39,6 +49,8 @@ module Anthropic
|
|
|
39
49
|
#
|
|
40
50
|
# @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
|
|
41
51
|
#
|
|
52
|
+
# @param caller_ [Anthropic::Models::Beta::BetaDirectCaller, Anthropic::Models::Beta::BetaServerToolCaller] Tool invocation directly from the model.
|
|
53
|
+
#
|
|
42
54
|
# @param type [Symbol, :server_tool_use]
|
|
43
55
|
|
|
44
56
|
# @see Anthropic::Models::Beta::BetaServerToolUseBlockParam#name
|
|
@@ -50,10 +62,30 @@ module Anthropic
|
|
|
50
62
|
CODE_EXECUTION = :code_execution
|
|
51
63
|
BASH_CODE_EXECUTION = :bash_code_execution
|
|
52
64
|
TEXT_EDITOR_CODE_EXECUTION = :text_editor_code_execution
|
|
65
|
+
TOOL_SEARCH_TOOL_REGEX = :tool_search_tool_regex
|
|
66
|
+
TOOL_SEARCH_TOOL_BM25 = :tool_search_tool_bm25
|
|
53
67
|
|
|
54
68
|
# @!method self.values
|
|
55
69
|
# @return [Array<Symbol>]
|
|
56
70
|
end
|
|
71
|
+
|
|
72
|
+
# Tool invocation directly from the model.
|
|
73
|
+
#
|
|
74
|
+
# @see Anthropic::Models::Beta::BetaServerToolUseBlockParam#caller_
|
|
75
|
+
module Caller
|
|
76
|
+
extend Anthropic::Internal::Type::Union
|
|
77
|
+
|
|
78
|
+
discriminator :type
|
|
79
|
+
|
|
80
|
+
# Tool invocation directly from the model.
|
|
81
|
+
variant :direct, -> { Anthropic::Beta::BetaDirectCaller }
|
|
82
|
+
|
|
83
|
+
# Tool invocation generated by a server-side tool.
|
|
84
|
+
variant :code_execution_20250825, -> { Anthropic::Beta::BetaServerToolCaller }
|
|
85
|
+
|
|
86
|
+
# @!method self.variants
|
|
87
|
+
# @return [Array(Anthropic::Models::Beta::BetaDirectCaller, Anthropic::Models::Beta::BetaServerToolCaller)]
|
|
88
|
+
end
|
|
57
89
|
end
|
|
58
90
|
end
|
|
59
91
|
|
|
@@ -21,12 +21,25 @@ module Anthropic
|
|
|
21
21
|
# @return [String]
|
|
22
22
|
required :name, String
|
|
23
23
|
|
|
24
|
+
# @!attribute allowed_callers
|
|
25
|
+
#
|
|
26
|
+
# @return [Array<Symbol, Anthropic::Models::Beta::BetaTool::AllowedCaller>, nil]
|
|
27
|
+
optional :allowed_callers,
|
|
28
|
+
-> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::BetaTool::AllowedCaller] }
|
|
29
|
+
|
|
24
30
|
# @!attribute cache_control
|
|
25
31
|
# Create a cache control breakpoint at this content block.
|
|
26
32
|
#
|
|
27
33
|
# @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
|
|
28
34
|
optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
|
|
29
35
|
|
|
36
|
+
# @!attribute defer_loading
|
|
37
|
+
# If true, tool will not be included in initial system prompt. Only loaded when
|
|
38
|
+
# returned via tool_reference from tool search.
|
|
39
|
+
#
|
|
40
|
+
# @return [Boolean, nil]
|
|
41
|
+
optional :defer_loading, Anthropic::Internal::Type::Boolean
|
|
42
|
+
|
|
30
43
|
# @!attribute description
|
|
31
44
|
# Description of what this tool does.
|
|
32
45
|
#
|
|
@@ -38,6 +51,12 @@ module Anthropic
|
|
|
38
51
|
# @return [String, nil]
|
|
39
52
|
optional :description, String
|
|
40
53
|
|
|
54
|
+
# @!attribute input_examples
|
|
55
|
+
#
|
|
56
|
+
# @return [Array<Hash{Symbol=>Object}>, nil]
|
|
57
|
+
optional :input_examples,
|
|
58
|
+
Anthropic::Internal::Type::ArrayOf[Anthropic::Internal::Type::HashOf[Anthropic::Internal::Type::Unknown]]
|
|
59
|
+
|
|
41
60
|
# @!attribute strict
|
|
42
61
|
#
|
|
43
62
|
# @return [Boolean, nil]
|
|
@@ -48,7 +67,7 @@ module Anthropic
|
|
|
48
67
|
# @return [Symbol, Anthropic::Models::Beta::BetaTool::Type, nil]
|
|
49
68
|
optional :type, enum: -> { Anthropic::Beta::BetaTool::Type }, nil?: true
|
|
50
69
|
|
|
51
|
-
# @!method initialize(input_schema:, name:, cache_control: nil, description: nil, strict: nil, type: nil)
|
|
70
|
+
# @!method initialize(input_schema:, name:, allowed_callers: nil, cache_control: nil, defer_loading: nil, description: nil, input_examples: nil, strict: nil, type: nil)
|
|
52
71
|
# Some parameter documentations has been truncated, see
|
|
53
72
|
# {Anthropic::Models::Beta::BetaTool} for more details.
|
|
54
73
|
#
|
|
@@ -56,10 +75,16 @@ module Anthropic
|
|
|
56
75
|
#
|
|
57
76
|
# @param name [String] Name of the tool.
|
|
58
77
|
#
|
|
78
|
+
# @param allowed_callers [Array<Symbol, Anthropic::Models::Beta::BetaTool::AllowedCaller>]
|
|
79
|
+
#
|
|
59
80
|
# @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
|
|
60
81
|
#
|
|
82
|
+
# @param defer_loading [Boolean] If true, tool will not be included in initial system prompt. Only loaded when re
|
|
83
|
+
#
|
|
61
84
|
# @param description [String] Description of what this tool does.
|
|
62
85
|
#
|
|
86
|
+
# @param input_examples [Array<Hash{Symbol=>Object}>]
|
|
87
|
+
#
|
|
63
88
|
# @param strict [Boolean]
|
|
64
89
|
#
|
|
65
90
|
# @param type [Symbol, Anthropic::Models::Beta::BetaTool::Type, nil]
|
|
@@ -94,6 +119,16 @@ module Anthropic
|
|
|
94
119
|
# @param type [Symbol, :object]
|
|
95
120
|
end
|
|
96
121
|
|
|
122
|
+
module AllowedCaller
|
|
123
|
+
extend Anthropic::Internal::Type::Enum
|
|
124
|
+
|
|
125
|
+
DIRECT = :direct
|
|
126
|
+
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
127
|
+
|
|
128
|
+
# @!method self.values
|
|
129
|
+
# @return [Array<Symbol>]
|
|
130
|
+
end
|
|
131
|
+
|
|
97
132
|
# @see Anthropic::Models::Beta::BetaTool#type
|
|
98
133
|
module Type
|
|
99
134
|
extend Anthropic::Internal::Type::Enum
|
|
@@ -17,28 +17,63 @@ module Anthropic
|
|
|
17
17
|
# @return [Symbol, :bash_20241022]
|
|
18
18
|
required :type, const: :bash_20241022
|
|
19
19
|
|
|
20
|
+
# @!attribute allowed_callers
|
|
21
|
+
#
|
|
22
|
+
# @return [Array<Symbol, Anthropic::Models::Beta::BetaToolBash20241022::AllowedCaller>, nil]
|
|
23
|
+
optional :allowed_callers,
|
|
24
|
+
-> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::BetaToolBash20241022::AllowedCaller] }
|
|
25
|
+
|
|
20
26
|
# @!attribute cache_control
|
|
21
27
|
# Create a cache control breakpoint at this content block.
|
|
22
28
|
#
|
|
23
29
|
# @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
|
|
24
30
|
optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
|
|
25
31
|
|
|
32
|
+
# @!attribute defer_loading
|
|
33
|
+
# If true, tool will not be included in initial system prompt. Only loaded when
|
|
34
|
+
# returned via tool_reference from tool search.
|
|
35
|
+
#
|
|
36
|
+
# @return [Boolean, nil]
|
|
37
|
+
optional :defer_loading, Anthropic::Internal::Type::Boolean
|
|
38
|
+
|
|
39
|
+
# @!attribute input_examples
|
|
40
|
+
#
|
|
41
|
+
# @return [Array<Hash{Symbol=>Object}>, nil]
|
|
42
|
+
optional :input_examples,
|
|
43
|
+
Anthropic::Internal::Type::ArrayOf[Anthropic::Internal::Type::HashOf[Anthropic::Internal::Type::Unknown]]
|
|
44
|
+
|
|
26
45
|
# @!attribute strict
|
|
27
46
|
#
|
|
28
47
|
# @return [Boolean, nil]
|
|
29
48
|
optional :strict, Anthropic::Internal::Type::Boolean
|
|
30
49
|
|
|
31
|
-
# @!method initialize(cache_control: nil, strict: nil, name: :bash, type: :bash_20241022)
|
|
50
|
+
# @!method initialize(allowed_callers: nil, cache_control: nil, defer_loading: nil, input_examples: nil, strict: nil, name: :bash, type: :bash_20241022)
|
|
32
51
|
# Some parameter documentations has been truncated, see
|
|
33
52
|
# {Anthropic::Models::Beta::BetaToolBash20241022} for more details.
|
|
34
53
|
#
|
|
54
|
+
# @param allowed_callers [Array<Symbol, Anthropic::Models::Beta::BetaToolBash20241022::AllowedCaller>]
|
|
55
|
+
#
|
|
35
56
|
# @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
|
|
36
57
|
#
|
|
58
|
+
# @param defer_loading [Boolean] If true, tool will not be included in initial system prompt. Only loaded when re
|
|
59
|
+
#
|
|
60
|
+
# @param input_examples [Array<Hash{Symbol=>Object}>]
|
|
61
|
+
#
|
|
37
62
|
# @param strict [Boolean]
|
|
38
63
|
#
|
|
39
64
|
# @param name [Symbol, :bash] Name of the tool.
|
|
40
65
|
#
|
|
41
66
|
# @param type [Symbol, :bash_20241022]
|
|
67
|
+
|
|
68
|
+
module AllowedCaller
|
|
69
|
+
extend Anthropic::Internal::Type::Enum
|
|
70
|
+
|
|
71
|
+
DIRECT = :direct
|
|
72
|
+
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
73
|
+
|
|
74
|
+
# @!method self.values
|
|
75
|
+
# @return [Array<Symbol>]
|
|
76
|
+
end
|
|
42
77
|
end
|
|
43
78
|
end
|
|
44
79
|
|
|
@@ -17,28 +17,63 @@ module Anthropic
|
|
|
17
17
|
# @return [Symbol, :bash_20250124]
|
|
18
18
|
required :type, const: :bash_20250124
|
|
19
19
|
|
|
20
|
+
# @!attribute allowed_callers
|
|
21
|
+
#
|
|
22
|
+
# @return [Array<Symbol, Anthropic::Models::Beta::BetaToolBash20250124::AllowedCaller>, nil]
|
|
23
|
+
optional :allowed_callers,
|
|
24
|
+
-> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::BetaToolBash20250124::AllowedCaller] }
|
|
25
|
+
|
|
20
26
|
# @!attribute cache_control
|
|
21
27
|
# Create a cache control breakpoint at this content block.
|
|
22
28
|
#
|
|
23
29
|
# @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
|
|
24
30
|
optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
|
|
25
31
|
|
|
32
|
+
# @!attribute defer_loading
|
|
33
|
+
# If true, tool will not be included in initial system prompt. Only loaded when
|
|
34
|
+
# returned via tool_reference from tool search.
|
|
35
|
+
#
|
|
36
|
+
# @return [Boolean, nil]
|
|
37
|
+
optional :defer_loading, Anthropic::Internal::Type::Boolean
|
|
38
|
+
|
|
39
|
+
# @!attribute input_examples
|
|
40
|
+
#
|
|
41
|
+
# @return [Array<Hash{Symbol=>Object}>, nil]
|
|
42
|
+
optional :input_examples,
|
|
43
|
+
Anthropic::Internal::Type::ArrayOf[Anthropic::Internal::Type::HashOf[Anthropic::Internal::Type::Unknown]]
|
|
44
|
+
|
|
26
45
|
# @!attribute strict
|
|
27
46
|
#
|
|
28
47
|
# @return [Boolean, nil]
|
|
29
48
|
optional :strict, Anthropic::Internal::Type::Boolean
|
|
30
49
|
|
|
31
|
-
# @!method initialize(cache_control: nil, strict: nil, name: :bash, type: :bash_20250124)
|
|
50
|
+
# @!method initialize(allowed_callers: nil, cache_control: nil, defer_loading: nil, input_examples: nil, strict: nil, name: :bash, type: :bash_20250124)
|
|
32
51
|
# Some parameter documentations has been truncated, see
|
|
33
52
|
# {Anthropic::Models::Beta::BetaToolBash20250124} for more details.
|
|
34
53
|
#
|
|
54
|
+
# @param allowed_callers [Array<Symbol, Anthropic::Models::Beta::BetaToolBash20250124::AllowedCaller>]
|
|
55
|
+
#
|
|
35
56
|
# @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
|
|
36
57
|
#
|
|
58
|
+
# @param defer_loading [Boolean] If true, tool will not be included in initial system prompt. Only loaded when re
|
|
59
|
+
#
|
|
60
|
+
# @param input_examples [Array<Hash{Symbol=>Object}>]
|
|
61
|
+
#
|
|
37
62
|
# @param strict [Boolean]
|
|
38
63
|
#
|
|
39
64
|
# @param name [Symbol, :bash] Name of the tool.
|
|
40
65
|
#
|
|
41
66
|
# @param type [Symbol, :bash_20250124]
|
|
67
|
+
|
|
68
|
+
module AllowedCaller
|
|
69
|
+
extend Anthropic::Internal::Type::Enum
|
|
70
|
+
|
|
71
|
+
DIRECT = :direct
|
|
72
|
+
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
73
|
+
|
|
74
|
+
# @!method self.values
|
|
75
|
+
# @return [Array<Symbol>]
|
|
76
|
+
end
|
|
42
77
|
end
|
|
43
78
|
end
|
|
44
79
|
|