anthropic 1.20.0 → 1.21.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 +8 -0
- data/README.md +1 -1
- data/lib/anthropic/models/beta/beta_code_execution_tool_20250522.rb +1 -0
- data/lib/anthropic/models/beta/beta_code_execution_tool_20250825.rb +1 -0
- data/lib/anthropic/models/beta/beta_code_execution_tool_20260120.rb +1 -0
- data/lib/anthropic/models/beta/beta_memory_tool_20250818.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool_bash_20241022.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool_bash_20250124.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool_computer_use_20250124.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool_computer_use_20251124.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool_search_tool_bm25_20251119.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool_search_tool_regex_20251119.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool_text_editor_20241022.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250124.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250429.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250728.rb +1 -0
- data/lib/anthropic/models/beta/beta_web_fetch_tool_20250910.rb +1 -0
- data/lib/anthropic/models/beta/beta_web_fetch_tool_20260209.rb +1 -0
- data/lib/anthropic/models/beta/beta_web_search_tool_20250305.rb +1 -0
- data/lib/anthropic/models/beta/beta_web_search_tool_20260209.rb +1 -0
- data/lib/anthropic/models/code_execution_tool_20250522.rb +1 -0
- data/lib/anthropic/models/code_execution_tool_20250825.rb +1 -0
- data/lib/anthropic/models/code_execution_tool_20260120.rb +75 -0
- data/lib/anthropic/models/memory_tool_20250818.rb +1 -0
- data/lib/anthropic/models/message_count_tokens_params.rb +2 -2
- data/lib/anthropic/models/message_count_tokens_tool.rb +4 -339
- 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/server_tool_caller_20260120.rb +21 -0
- data/lib/anthropic/models/server_tool_use_block.rb +4 -20
- data/lib/anthropic/models/server_tool_use_block_param.rb +4 -20
- data/lib/anthropic/models/tool.rb +1 -0
- data/lib/anthropic/models/tool_bash_20250124.rb +1 -0
- data/lib/anthropic/models/tool_search_tool_bm25_20251119.rb +1 -0
- data/lib/anthropic/models/tool_search_tool_regex_20251119.rb +1 -0
- data/lib/anthropic/models/tool_text_editor_20250124.rb +1 -0
- data/lib/anthropic/models/tool_text_editor_20250429.rb +1 -0
- data/lib/anthropic/models/tool_text_editor_20250728.rb +1 -0
- data/lib/anthropic/models/tool_union.rb +4 -334
- data/lib/anthropic/models/tool_use_block.rb +4 -20
- data/lib/anthropic/models/tool_use_block_param.rb +4 -20
- data/lib/anthropic/models/web_fetch_tool_20250910.rb +1 -0
- data/lib/anthropic/models/web_fetch_tool_20260209.rb +114 -0
- data/lib/anthropic/models/web_fetch_tool_result_block.rb +4 -20
- data/lib/anthropic/models/web_fetch_tool_result_block_param.rb +4 -21
- data/lib/anthropic/models/web_search_tool_20250305.rb +1 -0
- data/lib/anthropic/models/web_search_tool_20260209.rb +158 -0
- data/lib/anthropic/models/web_search_tool_result_block.rb +4 -21
- data/lib/anthropic/models/web_search_tool_result_block_param.rb +4 -21
- data/lib/anthropic/models.rb +8 -0
- data/lib/anthropic/resources/messages.rb +3 -3
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +4 -0
- data/rbi/anthropic/models/beta/beta_code_execution_tool_20250522.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_code_execution_tool_20250825.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_code_execution_tool_20260120.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_memory_tool_20250818.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool_bash_20241022.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool_bash_20250124.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool_computer_use_20241022.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool_computer_use_20250124.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool_computer_use_20251124.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool_search_tool_bm25_20251119.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool_search_tool_regex_20251119.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20241022.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250124.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250429.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250728.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_20250910.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_20260209.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_web_search_tool_20250305.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_web_search_tool_20260209.rbi +5 -0
- data/rbi/anthropic/models/code_execution_tool_20250522.rbi +5 -0
- data/rbi/anthropic/models/code_execution_tool_20250825.rbi +5 -0
- data/rbi/anthropic/models/code_execution_tool_20260120.rbi +157 -0
- data/rbi/anthropic/models/memory_tool_20250818.rbi +5 -0
- data/rbi/anthropic/models/message_count_tokens_params.rbi +12 -12
- data/rbi/anthropic/models/message_count_tokens_tool.rbi +3 -631
- data/rbi/anthropic/models/message_create_params.rbi +12 -12
- data/rbi/anthropic/models/messages/batch_create_params.rbi +12 -12
- data/rbi/anthropic/models/server_tool_caller_20260120.rbi +29 -0
- data/rbi/anthropic/models/server_tool_use_block.rbi +2 -28
- data/rbi/anthropic/models/server_tool_use_block_param.rbi +5 -31
- data/rbi/anthropic/models/tool.rbi +5 -0
- data/rbi/anthropic/models/tool_bash_20250124.rbi +5 -0
- data/rbi/anthropic/models/tool_search_tool_bm25_20251119.rbi +5 -0
- data/rbi/anthropic/models/tool_search_tool_regex_20251119.rbi +5 -0
- data/rbi/anthropic/models/tool_text_editor_20250124.rbi +5 -0
- data/rbi/anthropic/models/tool_text_editor_20250429.rbi +5 -0
- data/rbi/anthropic/models/tool_text_editor_20250728.rbi +5 -0
- data/rbi/anthropic/models/tool_union.rbi +3 -629
- data/rbi/anthropic/models/tool_use_block.rbi +2 -28
- data/rbi/anthropic/models/tool_use_block_param.rbi +5 -31
- data/rbi/anthropic/models/web_fetch_tool_20250910.rbi +5 -0
- data/rbi/anthropic/models/web_fetch_tool_20260209.rbi +197 -0
- data/rbi/anthropic/models/web_fetch_tool_result_block.rbi +2 -28
- data/rbi/anthropic/models/web_fetch_tool_result_block_param.rbi +5 -31
- data/rbi/anthropic/models/web_search_tool_20250305.rbi +5 -0
- data/rbi/anthropic/models/web_search_tool_20260209.rbi +265 -0
- data/rbi/anthropic/models/web_search_tool_result_block.rbi +2 -28
- data/rbi/anthropic/models/web_search_tool_result_block_param.rbi +5 -31
- data/rbi/anthropic/models.rbi +8 -0
- data/rbi/anthropic/resources/messages.rbi +9 -9
- data/sig/anthropic/models/beta/beta_code_execution_tool_20250522.rbs +3 -1
- data/sig/anthropic/models/beta/beta_code_execution_tool_20250825.rbs +3 -1
- data/sig/anthropic/models/beta/beta_code_execution_tool_20260120.rbs +3 -1
- data/sig/anthropic/models/beta/beta_memory_tool_20250818.rbs +3 -1
- data/sig/anthropic/models/beta/beta_tool.rbs +3 -1
- data/sig/anthropic/models/beta/beta_tool_bash_20241022.rbs +3 -1
- data/sig/anthropic/models/beta/beta_tool_bash_20250124.rbs +3 -1
- data/sig/anthropic/models/beta/beta_tool_computer_use_20241022.rbs +3 -1
- data/sig/anthropic/models/beta/beta_tool_computer_use_20250124.rbs +3 -1
- data/sig/anthropic/models/beta/beta_tool_computer_use_20251124.rbs +3 -1
- data/sig/anthropic/models/beta/beta_tool_search_tool_bm25_20251119.rbs +3 -1
- data/sig/anthropic/models/beta/beta_tool_search_tool_regex_20251119.rbs +3 -1
- data/sig/anthropic/models/beta/beta_tool_text_editor_20241022.rbs +3 -1
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250124.rbs +3 -1
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250429.rbs +3 -1
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250728.rbs +3 -1
- data/sig/anthropic/models/beta/beta_web_fetch_tool_20250910.rbs +3 -1
- data/sig/anthropic/models/beta/beta_web_fetch_tool_20260209.rbs +3 -1
- data/sig/anthropic/models/beta/beta_web_search_tool_20250305.rbs +3 -1
- data/sig/anthropic/models/beta/beta_web_search_tool_20260209.rbs +3 -1
- data/sig/anthropic/models/code_execution_tool_20250522.rbs +3 -1
- data/sig/anthropic/models/code_execution_tool_20250825.rbs +3 -1
- data/sig/anthropic/models/code_execution_tool_20260120.rbs +66 -0
- data/sig/anthropic/models/memory_tool_20250818.rbs +3 -1
- data/sig/anthropic/models/message_count_tokens_tool.rbs +3 -268
- data/sig/anthropic/models/server_tool_caller_20260120.rbs +16 -0
- data/sig/anthropic/models/server_tool_use_block.rbs +1 -17
- data/sig/anthropic/models/server_tool_use_block_param.rbs +1 -17
- data/sig/anthropic/models/tool.rbs +3 -1
- data/sig/anthropic/models/tool_bash_20250124.rbs +3 -1
- data/sig/anthropic/models/tool_search_tool_bm25_20251119.rbs +3 -1
- data/sig/anthropic/models/tool_search_tool_regex_20251119.rbs +3 -1
- data/sig/anthropic/models/tool_text_editor_20250124.rbs +3 -1
- data/sig/anthropic/models/tool_text_editor_20250429.rbs +3 -1
- data/sig/anthropic/models/tool_text_editor_20250728.rbs +3 -1
- data/sig/anthropic/models/tool_union.rbs +3 -268
- data/sig/anthropic/models/tool_use_block.rbs +1 -17
- data/sig/anthropic/models/tool_use_block_param.rbs +1 -17
- data/sig/anthropic/models/web_fetch_tool_20250910.rbs +3 -1
- data/sig/anthropic/models/web_fetch_tool_20260209.rbs +91 -0
- data/sig/anthropic/models/web_fetch_tool_result_block.rbs +1 -17
- data/sig/anthropic/models/web_fetch_tool_result_block_param.rbs +1 -17
- data/sig/anthropic/models/web_search_tool_20250305.rbs +3 -1
- data/sig/anthropic/models/web_search_tool_20260209.rbs +123 -0
- data/sig/anthropic/models/web_search_tool_result_block.rbs +1 -17
- data/sig/anthropic/models/web_search_tool_result_block_param.rbs +1 -17
- data/sig/anthropic/models.rbs +8 -0
- metadata +14 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b0cb095656f34acdf22be107efb79087c1a80fea2d873f11010fb374d8965d7b
|
|
4
|
+
data.tar.gz: 706ea210c80c1ba1462fa7ee93b23dd8a8067aeddbb37c0b549d7cc7402832a7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a35a161860f9e605e035c773160948f014185031108c81f108dc1b54656ae655ef9a0455d39eb79aaf1dbe4ef0a5d9c3268bd2293cd6601568efc11adff7a8f8
|
|
7
|
+
data.tar.gz: 3259249d2d3ac3c716f6d365e71d91dab168a634dc679d256647d22d161ddce1991da94f04c47c034572d3fe63d42cc2c9be16fa22d23eb53a530995d70b44fd
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.21.0 (2026-02-18)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.20.0...v1.21.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.20.0...v1.21.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** manual updates ([3e6a003](https://github.com/anthropics/anthropic-sdk-ruby/commit/3e6a00343dd617f94eeeb27b25571dff3ce54b8b))
|
|
10
|
+
|
|
3
11
|
## 1.20.0 (2026-02-17)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v1.19.0...v1.20.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.19.0...v1.20.0)
|
data/README.md
CHANGED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
class CodeExecutionTool20260120 < 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_20260120]
|
|
17
|
+
required :type, const: :code_execution_20260120
|
|
18
|
+
|
|
19
|
+
# @!attribute allowed_callers
|
|
20
|
+
#
|
|
21
|
+
# @return [Array<Symbol, Anthropic::Models::CodeExecutionTool20260120::AllowedCaller>, nil]
|
|
22
|
+
optional :allowed_callers,
|
|
23
|
+
-> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::CodeExecutionTool20260120::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_20260120)
|
|
45
|
+
# Some parameter documentations has been truncated, see
|
|
46
|
+
# {Anthropic::Models::CodeExecutionTool20260120} for more details.
|
|
47
|
+
#
|
|
48
|
+
# Code execution tool with REPL state persistence (daemon mode + gVisor
|
|
49
|
+
# checkpoint).
|
|
50
|
+
#
|
|
51
|
+
# @param allowed_callers [Array<Symbol, Anthropic::Models::CodeExecutionTool20260120::AllowedCaller>]
|
|
52
|
+
#
|
|
53
|
+
# @param cache_control [Anthropic::Models::CacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
|
|
54
|
+
#
|
|
55
|
+
# @param defer_loading [Boolean] If true, tool will not be included in initial system prompt. Only loaded when re
|
|
56
|
+
#
|
|
57
|
+
# @param strict [Boolean] When true, guarantees schema validation on tool names and inputs
|
|
58
|
+
#
|
|
59
|
+
# @param name [Symbol, :code_execution] Name of the tool.
|
|
60
|
+
#
|
|
61
|
+
# @param type [Symbol, :code_execution_20260120]
|
|
62
|
+
|
|
63
|
+
module AllowedCaller
|
|
64
|
+
extend Anthropic::Internal::Type::Enum
|
|
65
|
+
|
|
66
|
+
DIRECT = :direct
|
|
67
|
+
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
68
|
+
CODE_EXECUTION_20260120 = :code_execution_20260120
|
|
69
|
+
|
|
70
|
+
# @!method self.values
|
|
71
|
+
# @return [Array<Symbol>]
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
@@ -199,7 +199,7 @@ module Anthropic
|
|
|
199
199
|
#
|
|
200
200
|
# See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
|
|
201
201
|
#
|
|
202
|
-
# @return [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::
|
|
202
|
+
# @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::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119>, nil]
|
|
203
203
|
optional :tools, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::MessageCountTokensTool] }
|
|
204
204
|
|
|
205
205
|
# @!method initialize(messages:, model:, output_config: nil, system_: nil, thinking: nil, tool_choice: nil, tools: nil, request_options: {})
|
|
@@ -218,7 +218,7 @@ module Anthropic
|
|
|
218
218
|
#
|
|
219
219
|
# @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,
|
|
220
220
|
#
|
|
221
|
-
# @param tools [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::CodeExecutionTool20250522, Anthropic::Models::CodeExecutionTool20250825, Anthropic::Models::
|
|
221
|
+
# @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::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119>] Definitions of tools that the model may use.
|
|
222
222
|
#
|
|
223
223
|
# @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}]
|
|
224
224
|
|