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.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/anthropic/models/beta/beta_code_execution_tool_20250522.rb +1 -0
  5. data/lib/anthropic/models/beta/beta_code_execution_tool_20250825.rb +1 -0
  6. data/lib/anthropic/models/beta/beta_code_execution_tool_20260120.rb +1 -0
  7. data/lib/anthropic/models/beta/beta_memory_tool_20250818.rb +1 -0
  8. data/lib/anthropic/models/beta/beta_tool.rb +1 -0
  9. data/lib/anthropic/models/beta/beta_tool_bash_20241022.rb +1 -0
  10. data/lib/anthropic/models/beta/beta_tool_bash_20250124.rb +1 -0
  11. data/lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb +1 -0
  12. data/lib/anthropic/models/beta/beta_tool_computer_use_20250124.rb +1 -0
  13. data/lib/anthropic/models/beta/beta_tool_computer_use_20251124.rb +1 -0
  14. data/lib/anthropic/models/beta/beta_tool_search_tool_bm25_20251119.rb +1 -0
  15. data/lib/anthropic/models/beta/beta_tool_search_tool_regex_20251119.rb +1 -0
  16. data/lib/anthropic/models/beta/beta_tool_text_editor_20241022.rb +1 -0
  17. data/lib/anthropic/models/beta/beta_tool_text_editor_20250124.rb +1 -0
  18. data/lib/anthropic/models/beta/beta_tool_text_editor_20250429.rb +1 -0
  19. data/lib/anthropic/models/beta/beta_tool_text_editor_20250728.rb +1 -0
  20. data/lib/anthropic/models/beta/beta_web_fetch_tool_20250910.rb +1 -0
  21. data/lib/anthropic/models/beta/beta_web_fetch_tool_20260209.rb +1 -0
  22. data/lib/anthropic/models/beta/beta_web_search_tool_20250305.rb +1 -0
  23. data/lib/anthropic/models/beta/beta_web_search_tool_20260209.rb +1 -0
  24. data/lib/anthropic/models/code_execution_tool_20250522.rb +1 -0
  25. data/lib/anthropic/models/code_execution_tool_20250825.rb +1 -0
  26. data/lib/anthropic/models/code_execution_tool_20260120.rb +75 -0
  27. data/lib/anthropic/models/memory_tool_20250818.rb +1 -0
  28. data/lib/anthropic/models/message_count_tokens_params.rb +2 -2
  29. data/lib/anthropic/models/message_count_tokens_tool.rb +4 -339
  30. data/lib/anthropic/models/message_create_params.rb +2 -2
  31. data/lib/anthropic/models/messages/batch_create_params.rb +2 -2
  32. data/lib/anthropic/models/server_tool_caller_20260120.rb +21 -0
  33. data/lib/anthropic/models/server_tool_use_block.rb +4 -20
  34. data/lib/anthropic/models/server_tool_use_block_param.rb +4 -20
  35. data/lib/anthropic/models/tool.rb +1 -0
  36. data/lib/anthropic/models/tool_bash_20250124.rb +1 -0
  37. data/lib/anthropic/models/tool_search_tool_bm25_20251119.rb +1 -0
  38. data/lib/anthropic/models/tool_search_tool_regex_20251119.rb +1 -0
  39. data/lib/anthropic/models/tool_text_editor_20250124.rb +1 -0
  40. data/lib/anthropic/models/tool_text_editor_20250429.rb +1 -0
  41. data/lib/anthropic/models/tool_text_editor_20250728.rb +1 -0
  42. data/lib/anthropic/models/tool_union.rb +4 -334
  43. data/lib/anthropic/models/tool_use_block.rb +4 -20
  44. data/lib/anthropic/models/tool_use_block_param.rb +4 -20
  45. data/lib/anthropic/models/web_fetch_tool_20250910.rb +1 -0
  46. data/lib/anthropic/models/web_fetch_tool_20260209.rb +114 -0
  47. data/lib/anthropic/models/web_fetch_tool_result_block.rb +4 -20
  48. data/lib/anthropic/models/web_fetch_tool_result_block_param.rb +4 -21
  49. data/lib/anthropic/models/web_search_tool_20250305.rb +1 -0
  50. data/lib/anthropic/models/web_search_tool_20260209.rb +158 -0
  51. data/lib/anthropic/models/web_search_tool_result_block.rb +4 -21
  52. data/lib/anthropic/models/web_search_tool_result_block_param.rb +4 -21
  53. data/lib/anthropic/models.rb +8 -0
  54. data/lib/anthropic/resources/messages.rb +3 -3
  55. data/lib/anthropic/version.rb +1 -1
  56. data/lib/anthropic.rb +4 -0
  57. data/rbi/anthropic/models/beta/beta_code_execution_tool_20250522.rbi +5 -0
  58. data/rbi/anthropic/models/beta/beta_code_execution_tool_20250825.rbi +5 -0
  59. data/rbi/anthropic/models/beta/beta_code_execution_tool_20260120.rbi +5 -0
  60. data/rbi/anthropic/models/beta/beta_memory_tool_20250818.rbi +5 -0
  61. data/rbi/anthropic/models/beta/beta_tool.rbi +5 -0
  62. data/rbi/anthropic/models/beta/beta_tool_bash_20241022.rbi +5 -0
  63. data/rbi/anthropic/models/beta/beta_tool_bash_20250124.rbi +5 -0
  64. data/rbi/anthropic/models/beta/beta_tool_computer_use_20241022.rbi +5 -0
  65. data/rbi/anthropic/models/beta/beta_tool_computer_use_20250124.rbi +5 -0
  66. data/rbi/anthropic/models/beta/beta_tool_computer_use_20251124.rbi +5 -0
  67. data/rbi/anthropic/models/beta/beta_tool_search_tool_bm25_20251119.rbi +5 -0
  68. data/rbi/anthropic/models/beta/beta_tool_search_tool_regex_20251119.rbi +5 -0
  69. data/rbi/anthropic/models/beta/beta_tool_text_editor_20241022.rbi +5 -0
  70. data/rbi/anthropic/models/beta/beta_tool_text_editor_20250124.rbi +5 -0
  71. data/rbi/anthropic/models/beta/beta_tool_text_editor_20250429.rbi +5 -0
  72. data/rbi/anthropic/models/beta/beta_tool_text_editor_20250728.rbi +5 -0
  73. data/rbi/anthropic/models/beta/beta_web_fetch_tool_20250910.rbi +5 -0
  74. data/rbi/anthropic/models/beta/beta_web_fetch_tool_20260209.rbi +5 -0
  75. data/rbi/anthropic/models/beta/beta_web_search_tool_20250305.rbi +5 -0
  76. data/rbi/anthropic/models/beta/beta_web_search_tool_20260209.rbi +5 -0
  77. data/rbi/anthropic/models/code_execution_tool_20250522.rbi +5 -0
  78. data/rbi/anthropic/models/code_execution_tool_20250825.rbi +5 -0
  79. data/rbi/anthropic/models/code_execution_tool_20260120.rbi +157 -0
  80. data/rbi/anthropic/models/memory_tool_20250818.rbi +5 -0
  81. data/rbi/anthropic/models/message_count_tokens_params.rbi +12 -12
  82. data/rbi/anthropic/models/message_count_tokens_tool.rbi +3 -631
  83. data/rbi/anthropic/models/message_create_params.rbi +12 -12
  84. data/rbi/anthropic/models/messages/batch_create_params.rbi +12 -12
  85. data/rbi/anthropic/models/server_tool_caller_20260120.rbi +29 -0
  86. data/rbi/anthropic/models/server_tool_use_block.rbi +2 -28
  87. data/rbi/anthropic/models/server_tool_use_block_param.rbi +5 -31
  88. data/rbi/anthropic/models/tool.rbi +5 -0
  89. data/rbi/anthropic/models/tool_bash_20250124.rbi +5 -0
  90. data/rbi/anthropic/models/tool_search_tool_bm25_20251119.rbi +5 -0
  91. data/rbi/anthropic/models/tool_search_tool_regex_20251119.rbi +5 -0
  92. data/rbi/anthropic/models/tool_text_editor_20250124.rbi +5 -0
  93. data/rbi/anthropic/models/tool_text_editor_20250429.rbi +5 -0
  94. data/rbi/anthropic/models/tool_text_editor_20250728.rbi +5 -0
  95. data/rbi/anthropic/models/tool_union.rbi +3 -629
  96. data/rbi/anthropic/models/tool_use_block.rbi +2 -28
  97. data/rbi/anthropic/models/tool_use_block_param.rbi +5 -31
  98. data/rbi/anthropic/models/web_fetch_tool_20250910.rbi +5 -0
  99. data/rbi/anthropic/models/web_fetch_tool_20260209.rbi +197 -0
  100. data/rbi/anthropic/models/web_fetch_tool_result_block.rbi +2 -28
  101. data/rbi/anthropic/models/web_fetch_tool_result_block_param.rbi +5 -31
  102. data/rbi/anthropic/models/web_search_tool_20250305.rbi +5 -0
  103. data/rbi/anthropic/models/web_search_tool_20260209.rbi +265 -0
  104. data/rbi/anthropic/models/web_search_tool_result_block.rbi +2 -28
  105. data/rbi/anthropic/models/web_search_tool_result_block_param.rbi +5 -31
  106. data/rbi/anthropic/models.rbi +8 -0
  107. data/rbi/anthropic/resources/messages.rbi +9 -9
  108. data/sig/anthropic/models/beta/beta_code_execution_tool_20250522.rbs +3 -1
  109. data/sig/anthropic/models/beta/beta_code_execution_tool_20250825.rbs +3 -1
  110. data/sig/anthropic/models/beta/beta_code_execution_tool_20260120.rbs +3 -1
  111. data/sig/anthropic/models/beta/beta_memory_tool_20250818.rbs +3 -1
  112. data/sig/anthropic/models/beta/beta_tool.rbs +3 -1
  113. data/sig/anthropic/models/beta/beta_tool_bash_20241022.rbs +3 -1
  114. data/sig/anthropic/models/beta/beta_tool_bash_20250124.rbs +3 -1
  115. data/sig/anthropic/models/beta/beta_tool_computer_use_20241022.rbs +3 -1
  116. data/sig/anthropic/models/beta/beta_tool_computer_use_20250124.rbs +3 -1
  117. data/sig/anthropic/models/beta/beta_tool_computer_use_20251124.rbs +3 -1
  118. data/sig/anthropic/models/beta/beta_tool_search_tool_bm25_20251119.rbs +3 -1
  119. data/sig/anthropic/models/beta/beta_tool_search_tool_regex_20251119.rbs +3 -1
  120. data/sig/anthropic/models/beta/beta_tool_text_editor_20241022.rbs +3 -1
  121. data/sig/anthropic/models/beta/beta_tool_text_editor_20250124.rbs +3 -1
  122. data/sig/anthropic/models/beta/beta_tool_text_editor_20250429.rbs +3 -1
  123. data/sig/anthropic/models/beta/beta_tool_text_editor_20250728.rbs +3 -1
  124. data/sig/anthropic/models/beta/beta_web_fetch_tool_20250910.rbs +3 -1
  125. data/sig/anthropic/models/beta/beta_web_fetch_tool_20260209.rbs +3 -1
  126. data/sig/anthropic/models/beta/beta_web_search_tool_20250305.rbs +3 -1
  127. data/sig/anthropic/models/beta/beta_web_search_tool_20260209.rbs +3 -1
  128. data/sig/anthropic/models/code_execution_tool_20250522.rbs +3 -1
  129. data/sig/anthropic/models/code_execution_tool_20250825.rbs +3 -1
  130. data/sig/anthropic/models/code_execution_tool_20260120.rbs +66 -0
  131. data/sig/anthropic/models/memory_tool_20250818.rbs +3 -1
  132. data/sig/anthropic/models/message_count_tokens_tool.rbs +3 -268
  133. data/sig/anthropic/models/server_tool_caller_20260120.rbs +16 -0
  134. data/sig/anthropic/models/server_tool_use_block.rbs +1 -17
  135. data/sig/anthropic/models/server_tool_use_block_param.rbs +1 -17
  136. data/sig/anthropic/models/tool.rbs +3 -1
  137. data/sig/anthropic/models/tool_bash_20250124.rbs +3 -1
  138. data/sig/anthropic/models/tool_search_tool_bm25_20251119.rbs +3 -1
  139. data/sig/anthropic/models/tool_search_tool_regex_20251119.rbs +3 -1
  140. data/sig/anthropic/models/tool_text_editor_20250124.rbs +3 -1
  141. data/sig/anthropic/models/tool_text_editor_20250429.rbs +3 -1
  142. data/sig/anthropic/models/tool_text_editor_20250728.rbs +3 -1
  143. data/sig/anthropic/models/tool_union.rbs +3 -268
  144. data/sig/anthropic/models/tool_use_block.rbs +1 -17
  145. data/sig/anthropic/models/tool_use_block_param.rbs +1 -17
  146. data/sig/anthropic/models/web_fetch_tool_20250910.rbs +3 -1
  147. data/sig/anthropic/models/web_fetch_tool_20260209.rbs +91 -0
  148. data/sig/anthropic/models/web_fetch_tool_result_block.rbs +1 -17
  149. data/sig/anthropic/models/web_fetch_tool_result_block_param.rbs +1 -17
  150. data/sig/anthropic/models/web_search_tool_20250305.rbs +3 -1
  151. data/sig/anthropic/models/web_search_tool_20260209.rbs +123 -0
  152. data/sig/anthropic/models/web_search_tool_result_block.rbs +1 -17
  153. data/sig/anthropic/models/web_search_tool_result_block_param.rbs +1 -17
  154. data/sig/anthropic/models.rbs +8 -0
  155. metadata +14 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d7ee7b28853f467e03dfd3aad75f225c5c9aea18f555df7bc3aa5260cc780ce
4
- data.tar.gz: c27e4f300d4086681495211b73e0efda92d146c4cf8e8953884e3fa10f0e3235
3
+ metadata.gz: b0cb095656f34acdf22be107efb79087c1a80fea2d873f11010fb374d8965d7b
4
+ data.tar.gz: 706ea210c80c1ba1462fa7ee93b23dd8a8067aeddbb37c0b549d7cc7402832a7
5
5
  SHA512:
6
- metadata.gz: 9680aa601e1468ce9198d6f066894f65e84cf9220c50acd94f5aed8b1a5e0e7052a48c65b0b96053f80bd03694907be0de3af30ed545cfc1009bc538cbfe9e0a
7
- data.tar.gz: 4f796334a1c2bdd3953aa6b69e70fedb33dfbca9d4bdb7df9b696ff8995b5d342ecb6c4938fa9006defc9762240491299619db32250920fda60e7c1b2a1a014a
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
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "anthropic", "~> 1.20.0"
18
+ gem "anthropic", "~> 1.21.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -63,6 +63,7 @@ module Anthropic
63
63
 
64
64
  DIRECT = :direct
65
65
  CODE_EXECUTION_20250825 = :code_execution_20250825
66
+ CODE_EXECUTION_20260120 = :code_execution_20260120
66
67
 
67
68
  # @!method self.values
68
69
  # @return [Array<Symbol>]
@@ -63,6 +63,7 @@ module Anthropic
63
63
 
64
64
  DIRECT = :direct
65
65
  CODE_EXECUTION_20250825 = :code_execution_20250825
66
+ CODE_EXECUTION_20260120 = :code_execution_20260120
66
67
 
67
68
  # @!method self.values
68
69
  # @return [Array<Symbol>]
@@ -66,6 +66,7 @@ module Anthropic
66
66
 
67
67
  DIRECT = :direct
68
68
  CODE_EXECUTION_20250825 = :code_execution_20250825
69
+ CODE_EXECUTION_20260120 = :code_execution_20260120
69
70
 
70
71
  # @!method self.values
71
72
  # @return [Array<Symbol>]
@@ -71,6 +71,7 @@ module Anthropic
71
71
 
72
72
  DIRECT = :direct
73
73
  CODE_EXECUTION_20250825 = :code_execution_20250825
74
+ CODE_EXECUTION_20260120 = :code_execution_20260120
74
75
 
75
76
  # @!method self.values
76
77
  # @return [Array<Symbol>]
@@ -137,6 +137,7 @@ module Anthropic
137
137
 
138
138
  DIRECT = :direct
139
139
  CODE_EXECUTION_20250825 = :code_execution_20250825
140
+ CODE_EXECUTION_20260120 = :code_execution_20260120
140
141
 
141
142
  # @!method self.values
142
143
  # @return [Array<Symbol>]
@@ -71,6 +71,7 @@ module Anthropic
71
71
 
72
72
  DIRECT = :direct
73
73
  CODE_EXECUTION_20250825 = :code_execution_20250825
74
+ CODE_EXECUTION_20260120 = :code_execution_20260120
74
75
 
75
76
  # @!method self.values
76
77
  # @return [Array<Symbol>]
@@ -71,6 +71,7 @@ module Anthropic
71
71
 
72
72
  DIRECT = :direct
73
73
  CODE_EXECUTION_20250825 = :code_execution_20250825
74
+ CODE_EXECUTION_20260120 = :code_execution_20260120
74
75
 
75
76
  # @!method self.values
76
77
  # @return [Array<Symbol>]
@@ -95,6 +95,7 @@ module Anthropic
95
95
 
96
96
  DIRECT = :direct
97
97
  CODE_EXECUTION_20250825 = :code_execution_20250825
98
+ CODE_EXECUTION_20260120 = :code_execution_20260120
98
99
 
99
100
  # @!method self.values
100
101
  # @return [Array<Symbol>]
@@ -95,6 +95,7 @@ module Anthropic
95
95
 
96
96
  DIRECT = :direct
97
97
  CODE_EXECUTION_20250825 = :code_execution_20250825
98
+ CODE_EXECUTION_20260120 = :code_execution_20260120
98
99
 
99
100
  # @!method self.values
100
101
  # @return [Array<Symbol>]
@@ -103,6 +103,7 @@ module Anthropic
103
103
 
104
104
  DIRECT = :direct
105
105
  CODE_EXECUTION_20250825 = :code_execution_20250825
106
+ CODE_EXECUTION_20260120 = :code_execution_20260120
106
107
 
107
108
  # @!method self.values
108
109
  # @return [Array<Symbol>]
@@ -74,6 +74,7 @@ module Anthropic
74
74
 
75
75
  DIRECT = :direct
76
76
  CODE_EXECUTION_20250825 = :code_execution_20250825
77
+ CODE_EXECUTION_20260120 = :code_execution_20260120
77
78
 
78
79
  # @!method self.values
79
80
  # @return [Array<Symbol>]
@@ -74,6 +74,7 @@ module Anthropic
74
74
 
75
75
  DIRECT = :direct
76
76
  CODE_EXECUTION_20250825 = :code_execution_20250825
77
+ CODE_EXECUTION_20260120 = :code_execution_20260120
77
78
 
78
79
  # @!method self.values
79
80
  # @return [Array<Symbol>]
@@ -71,6 +71,7 @@ module Anthropic
71
71
 
72
72
  DIRECT = :direct
73
73
  CODE_EXECUTION_20250825 = :code_execution_20250825
74
+ CODE_EXECUTION_20260120 = :code_execution_20260120
74
75
 
75
76
  # @!method self.values
76
77
  # @return [Array<Symbol>]
@@ -71,6 +71,7 @@ module Anthropic
71
71
 
72
72
  DIRECT = :direct
73
73
  CODE_EXECUTION_20250825 = :code_execution_20250825
74
+ CODE_EXECUTION_20260120 = :code_execution_20260120
74
75
 
75
76
  # @!method self.values
76
77
  # @return [Array<Symbol>]
@@ -71,6 +71,7 @@ module Anthropic
71
71
 
72
72
  DIRECT = :direct
73
73
  CODE_EXECUTION_20250825 = :code_execution_20250825
74
+ CODE_EXECUTION_20260120 = :code_execution_20260120
74
75
 
75
76
  # @!method self.values
76
77
  # @return [Array<Symbol>]
@@ -80,6 +80,7 @@ module Anthropic
80
80
 
81
81
  DIRECT = :direct
82
82
  CODE_EXECUTION_20250825 = :code_execution_20250825
83
+ CODE_EXECUTION_20260120 = :code_execution_20260120
83
84
 
84
85
  # @!method self.values
85
86
  # @return [Array<Symbol>]
@@ -105,6 +105,7 @@ module Anthropic
105
105
 
106
106
  DIRECT = :direct
107
107
  CODE_EXECUTION_20250825 = :code_execution_20250825
108
+ CODE_EXECUTION_20260120 = :code_execution_20260120
108
109
 
109
110
  # @!method self.values
110
111
  # @return [Array<Symbol>]
@@ -105,6 +105,7 @@ module Anthropic
105
105
 
106
106
  DIRECT = :direct
107
107
  CODE_EXECUTION_20250825 = :code_execution_20250825
108
+ CODE_EXECUTION_20260120 = :code_execution_20260120
108
109
 
109
110
  # @!method self.values
110
111
  # @return [Array<Symbol>]
@@ -98,6 +98,7 @@ module Anthropic
98
98
 
99
99
  DIRECT = :direct
100
100
  CODE_EXECUTION_20250825 = :code_execution_20250825
101
+ CODE_EXECUTION_20260120 = :code_execution_20260120
101
102
 
102
103
  # @!method self.values
103
104
  # @return [Array<Symbol>]
@@ -98,6 +98,7 @@ module Anthropic
98
98
 
99
99
  DIRECT = :direct
100
100
  CODE_EXECUTION_20250825 = :code_execution_20250825
101
+ CODE_EXECUTION_20260120 = :code_execution_20260120
101
102
 
102
103
  # @!method self.values
103
104
  # @return [Array<Symbol>]
@@ -62,6 +62,7 @@ module Anthropic
62
62
 
63
63
  DIRECT = :direct
64
64
  CODE_EXECUTION_20250825 = :code_execution_20250825
65
+ CODE_EXECUTION_20260120 = :code_execution_20260120
65
66
 
66
67
  # @!method self.values
67
68
  # @return [Array<Symbol>]
@@ -62,6 +62,7 @@ module Anthropic
62
62
 
63
63
  DIRECT = :direct
64
64
  CODE_EXECUTION_20250825 = :code_execution_20250825
65
+ CODE_EXECUTION_20260120 = :code_execution_20260120
65
66
 
66
67
  # @!method self.values
67
68
  # @return [Array<Symbol>]
@@ -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
@@ -70,6 +70,7 @@ module Anthropic
70
70
 
71
71
  DIRECT = :direct
72
72
  CODE_EXECUTION_20250825 = :code_execution_20250825
73
+ CODE_EXECUTION_20260120 = :code_execution_20260120
73
74
 
74
75
  # @!method self.values
75
76
  # @return [Array<Symbol>]
@@ -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::MessageCountTokensTool::CodeExecutionTool20260120, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::MessageCountTokensTool::WebSearchTool20260209, Anthropic::Models::MessageCountTokensTool::WebFetchTool20260209, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119>, nil]
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::MessageCountTokensTool::CodeExecutionTool20260120, Anthropic::Models::MemoryTool20250818, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305, Anthropic::Models::WebFetchTool20250910, Anthropic::Models::MessageCountTokensTool::WebSearchTool20260209, Anthropic::Models::MessageCountTokensTool::WebFetchTool20260209, Anthropic::Models::ToolSearchToolBm25_20251119, Anthropic::Models::ToolSearchToolRegex20251119>] Definitions of tools that the model may use.
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