anthropic 1.19.0 → 1.20.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 (344) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +1 -1
  4. data/lib/anthropic/internal/type/enum.rb +11 -11
  5. data/lib/anthropic/models/bash_code_execution_output_block.rb +21 -0
  6. data/lib/anthropic/models/bash_code_execution_output_block_param.rb +21 -0
  7. data/lib/anthropic/models/bash_code_execution_result_block.rb +39 -0
  8. data/lib/anthropic/models/bash_code_execution_result_block_param.rb +39 -0
  9. data/lib/anthropic/models/bash_code_execution_tool_result_block.rb +39 -0
  10. data/lib/anthropic/models/bash_code_execution_tool_result_block_param.rb +49 -0
  11. data/lib/anthropic/models/bash_code_execution_tool_result_error.rb +21 -0
  12. data/lib/anthropic/models/bash_code_execution_tool_result_error_code.rb +18 -0
  13. data/lib/anthropic/models/bash_code_execution_tool_result_error_param.rb +21 -0
  14. data/lib/anthropic/models/beta/beta_code_execution_tool_20260120.rb +78 -0
  15. data/lib/anthropic/models/beta/beta_code_execution_tool_result_block.rb +5 -2
  16. data/lib/anthropic/models/beta/beta_code_execution_tool_result_block_content.rb +5 -1
  17. data/lib/anthropic/models/beta/beta_code_execution_tool_result_block_param.rb +3 -2
  18. data/lib/anthropic/models/beta/beta_code_execution_tool_result_block_param_content.rb +5 -1
  19. data/lib/anthropic/models/beta/beta_encrypted_code_execution_result_block.rb +46 -0
  20. data/lib/anthropic/models/beta/beta_encrypted_code_execution_result_block_param.rb +46 -0
  21. data/lib/anthropic/models/beta/beta_server_tool_caller_20260120.rb +25 -0
  22. data/lib/anthropic/models/beta/beta_server_tool_use_block.rb +5 -3
  23. data/lib/anthropic/models/beta/beta_server_tool_use_block_param.rb +5 -3
  24. data/lib/anthropic/models/beta/beta_tool_union.rb +10 -5
  25. data/lib/anthropic/models/beta/beta_tool_use_block.rb +5 -3
  26. data/lib/anthropic/models/beta/beta_tool_use_block_param.rb +5 -3
  27. data/lib/anthropic/models/beta/beta_user_location.rb +56 -0
  28. data/lib/anthropic/models/beta/beta_web_fetch_tool_20260209.rb +117 -0
  29. data/lib/anthropic/models/beta/beta_web_fetch_tool_result_block.rb +35 -1
  30. data/lib/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rb +31 -1
  31. data/lib/anthropic/models/beta/beta_web_search_tool_20250305.rb +3 -55
  32. data/lib/anthropic/models/beta/beta_web_search_tool_20260209.rb +110 -0
  33. data/lib/anthropic/models/beta/beta_web_search_tool_result_block.rb +35 -1
  34. data/lib/anthropic/models/beta/beta_web_search_tool_result_block_param.rb +31 -1
  35. data/lib/anthropic/models/beta/message_count_tokens_params.rb +12 -7
  36. data/lib/anthropic/models/beta/message_create_params.rb +2 -2
  37. data/lib/anthropic/models/beta/messages/batch_create_params.rb +2 -2
  38. data/lib/anthropic/models/citations_config.rb +15 -0
  39. data/lib/anthropic/models/code_execution_output_block.rb +21 -0
  40. data/lib/anthropic/models/code_execution_output_block_param.rb +21 -0
  41. data/lib/anthropic/models/code_execution_result_block.rb +39 -0
  42. data/lib/anthropic/models/code_execution_result_block_param.rb +39 -0
  43. data/lib/anthropic/models/code_execution_tool_20250522.rb +71 -0
  44. data/lib/anthropic/models/code_execution_tool_20250825.rb +71 -0
  45. data/lib/anthropic/models/code_execution_tool_result_block.rb +30 -0
  46. data/lib/anthropic/models/code_execution_tool_result_block_content.rb +20 -0
  47. data/lib/anthropic/models/code_execution_tool_result_block_param.rb +38 -0
  48. data/lib/anthropic/models/code_execution_tool_result_block_param_content.rb +20 -0
  49. data/lib/anthropic/models/code_execution_tool_result_error.rb +21 -0
  50. data/lib/anthropic/models/code_execution_tool_result_error_code.rb +17 -0
  51. data/lib/anthropic/models/code_execution_tool_result_error_param.rb +21 -0
  52. data/lib/anthropic/models/container.rb +27 -0
  53. data/lib/anthropic/models/container_upload_block.rb +23 -0
  54. data/lib/anthropic/models/container_upload_block_param.rb +33 -0
  55. data/lib/anthropic/models/content_block.rb +15 -1
  56. data/lib/anthropic/models/content_block_param.rb +16 -1
  57. data/lib/anthropic/models/direct_caller.rb +17 -0
  58. data/lib/anthropic/models/document_block.rb +52 -0
  59. data/lib/anthropic/models/encrypted_code_execution_result_block.rb +41 -0
  60. data/lib/anthropic/models/encrypted_code_execution_result_block_param.rb +41 -0
  61. data/lib/anthropic/models/memory_tool_20250818.rb +79 -0
  62. data/lib/anthropic/models/message.rb +12 -3
  63. data/lib/anthropic/models/message_count_tokens_params.rb +2 -2
  64. data/lib/anthropic/models/message_count_tokens_tool.rb +357 -1
  65. data/lib/anthropic/models/message_create_params.rb +11 -3
  66. data/lib/anthropic/models/message_param.rb +3 -3
  67. data/lib/anthropic/models/messages/batch_create_params.rb +11 -3
  68. data/lib/anthropic/models/model.rb +5 -0
  69. data/lib/anthropic/models/raw_content_block_start_event.rb +21 -3
  70. data/lib/anthropic/models/raw_message_delta_event.rb +14 -1
  71. data/lib/anthropic/models/server_tool_caller.rb +23 -0
  72. data/lib/anthropic/models/server_tool_usage.rb +9 -1
  73. data/lib/anthropic/models/server_tool_use_block.rb +67 -4
  74. data/lib/anthropic/models/server_tool_use_block_param.rb +64 -4
  75. data/lib/anthropic/models/text_editor_code_execution_create_result_block.rb +21 -0
  76. data/lib/anthropic/models/text_editor_code_execution_create_result_block_param.rb +21 -0
  77. data/lib/anthropic/models/text_editor_code_execution_str_replace_result_block.rb +45 -0
  78. data/lib/anthropic/models/text_editor_code_execution_str_replace_result_block_param.rb +45 -0
  79. data/lib/anthropic/models/text_editor_code_execution_tool_result_block.rb +43 -0
  80. data/lib/anthropic/models/text_editor_code_execution_tool_result_block_param.rb +53 -0
  81. data/lib/anthropic/models/text_editor_code_execution_tool_result_error.rb +27 -0
  82. data/lib/anthropic/models/text_editor_code_execution_tool_result_error_code.rb +18 -0
  83. data/lib/anthropic/models/text_editor_code_execution_tool_result_error_param.rb +27 -0
  84. data/lib/anthropic/models/text_editor_code_execution_view_result_block.rb +57 -0
  85. data/lib/anthropic/models/text_editor_code_execution_view_result_block_param.rb +57 -0
  86. data/lib/anthropic/models/tool.rb +35 -1
  87. data/lib/anthropic/models/tool_bash_20250124.rb +36 -1
  88. data/lib/anthropic/models/tool_reference_block.rb +21 -0
  89. data/lib/anthropic/models/tool_reference_block_param.rb +32 -0
  90. data/lib/anthropic/models/tool_result_block_param.rb +8 -4
  91. data/lib/anthropic/models/tool_search_tool_bm25_20251119.rb +82 -0
  92. data/lib/anthropic/models/tool_search_tool_regex_20251119.rb +82 -0
  93. data/lib/anthropic/models/tool_search_tool_result_block.rb +39 -0
  94. data/lib/anthropic/models/tool_search_tool_result_block_param.rb +49 -0
  95. data/lib/anthropic/models/tool_search_tool_result_error.rb +27 -0
  96. data/lib/anthropic/models/tool_search_tool_result_error_code.rb +17 -0
  97. data/lib/anthropic/models/tool_search_tool_result_error_param.rb +21 -0
  98. data/lib/anthropic/models/tool_search_tool_search_result_block.rb +21 -0
  99. data/lib/anthropic/models/tool_search_tool_search_result_block_param.rb +21 -0
  100. data/lib/anthropic/models/tool_text_editor_20250124.rb +36 -1
  101. data/lib/anthropic/models/tool_text_editor_20250429.rb +36 -1
  102. data/lib/anthropic/models/tool_text_editor_20250728.rb +36 -1
  103. data/lib/anthropic/models/tool_union.rb +352 -1
  104. data/lib/anthropic/models/tool_use_block.rb +47 -1
  105. data/lib/anthropic/models/tool_use_block_param.rb +45 -1
  106. data/lib/anthropic/models/web_fetch_block.rb +38 -0
  107. data/lib/anthropic/models/web_fetch_block_param.rb +38 -0
  108. data/lib/anthropic/models/web_fetch_tool_20250910.rb +113 -0
  109. data/lib/anthropic/models/web_fetch_tool_result_block.rb +85 -0
  110. data/lib/anthropic/models/web_fetch_tool_result_block_param.rb +94 -0
  111. data/lib/anthropic/models/web_fetch_tool_result_error_block.rb +21 -0
  112. data/lib/anthropic/models/web_fetch_tool_result_error_block_param.rb +21 -0
  113. data/lib/anthropic/models/web_fetch_tool_result_error_code.rb +21 -0
  114. data/lib/anthropic/models/web_search_tool_20250305.rb +28 -1
  115. data/lib/anthropic/models/web_search_tool_result_block.rb +48 -1
  116. data/lib/anthropic/models/web_search_tool_result_block_param.rb +46 -1
  117. data/lib/anthropic/models.rb +131 -0
  118. data/lib/anthropic/resources/beta/messages.rb +3 -3
  119. data/lib/anthropic/resources/messages.rb +9 -5
  120. data/lib/anthropic/version.rb +1 -1
  121. data/lib/anthropic.rb +69 -0
  122. data/rbi/anthropic/models/bash_code_execution_output_block.rbi +29 -0
  123. data/rbi/anthropic/models/bash_code_execution_output_block_param.rbi +29 -0
  124. data/rbi/anthropic/models/bash_code_execution_result_block.rbi +62 -0
  125. data/rbi/anthropic/models/bash_code_execution_result_block_param.rbi +63 -0
  126. data/rbi/anthropic/models/bash_code_execution_tool_result_block.rbi +79 -0
  127. data/rbi/anthropic/models/bash_code_execution_tool_result_block_param.rbi +102 -0
  128. data/rbi/anthropic/models/bash_code_execution_tool_result_error.rbi +44 -0
  129. data/rbi/anthropic/models/bash_code_execution_tool_result_error_code.rbi +51 -0
  130. data/rbi/anthropic/models/bash_code_execution_tool_result_error_param.rbi +42 -0
  131. data/rbi/anthropic/models/beta/beta_code_execution_tool_20260120.rbi +162 -0
  132. data/rbi/anthropic/models/beta/beta_code_execution_tool_result_block.rbi +9 -2
  133. data/rbi/anthropic/models/beta/beta_code_execution_tool_result_block_content.rbi +3 -1
  134. data/rbi/anthropic/models/beta/beta_code_execution_tool_result_block_param.rbi +8 -3
  135. data/rbi/anthropic/models/beta/beta_code_execution_tool_result_block_param_content.rbi +3 -1
  136. data/rbi/anthropic/models/beta/beta_encrypted_code_execution_result_block.rbi +69 -0
  137. data/rbi/anthropic/models/beta/beta_encrypted_code_execution_result_block_param.rbi +74 -0
  138. data/rbi/anthropic/models/beta/beta_server_tool_caller_20260120.rbi +33 -0
  139. data/rbi/anthropic/models/beta/beta_server_tool_use_block.rbi +6 -3
  140. data/rbi/anthropic/models/beta/beta_server_tool_use_block_param.rbi +10 -5
  141. data/rbi/anthropic/models/beta/beta_tool_union.rbi +5 -4
  142. data/rbi/anthropic/models/beta/beta_tool_use_block.rbi +6 -3
  143. data/rbi/anthropic/models/beta/beta_tool_use_block_param.rbi +10 -5
  144. data/rbi/anthropic/models/beta/beta_user_location.rbi +78 -0
  145. data/rbi/anthropic/models/beta/beta_web_fetch_tool_20260209.rbi +213 -0
  146. data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_block.rbi +62 -2
  147. data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rbi +65 -1
  148. data/rbi/anthropic/models/beta/beta_web_search_tool_20250305.rbi +4 -88
  149. data/rbi/anthropic/models/beta/beta_web_search_tool_20260209.rbi +205 -0
  150. data/rbi/anthropic/models/beta/beta_web_search_tool_result_block.rbi +62 -2
  151. data/rbi/anthropic/models/beta/beta_web_search_tool_result_block_param.rbi +65 -1
  152. data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +17 -4
  153. data/rbi/anthropic/models/beta/message_create_params.rbi +12 -0
  154. data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +12 -0
  155. data/rbi/anthropic/models/citations_config.rbi +23 -0
  156. data/rbi/anthropic/models/code_execution_output_block.rbi +29 -0
  157. data/rbi/anthropic/models/code_execution_output_block_param.rbi +29 -0
  158. data/rbi/anthropic/models/code_execution_result_block.rbi +62 -0
  159. data/rbi/anthropic/models/code_execution_result_block_param.rbi +62 -0
  160. data/rbi/anthropic/models/code_execution_tool_20250522.rbi +150 -0
  161. data/rbi/anthropic/models/code_execution_tool_20250825.rbi +150 -0
  162. data/rbi/anthropic/models/code_execution_tool_result_block.rbi +57 -0
  163. data/rbi/anthropic/models/code_execution_tool_result_block_content.rbi +27 -0
  164. data/rbi/anthropic/models/code_execution_tool_result_block_param.rbi +85 -0
  165. data/rbi/anthropic/models/code_execution_tool_result_block_param_content.rbi +29 -0
  166. data/rbi/anthropic/models/code_execution_tool_result_error.rbi +42 -0
  167. data/rbi/anthropic/models/code_execution_tool_result_error_code.rbi +44 -0
  168. data/rbi/anthropic/models/code_execution_tool_result_error_param.rbi +41 -0
  169. data/rbi/anthropic/models/container.rbi +35 -0
  170. data/rbi/anthropic/models/container_upload_block.rbi +27 -0
  171. data/rbi/anthropic/models/container_upload_block_param.rbi +61 -0
  172. data/rbi/anthropic/models/content_block.rbi +8 -1
  173. data/rbi/anthropic/models/content_block_param.rbi +7 -1
  174. data/rbi/anthropic/models/direct_caller.rbi +24 -0
  175. data/rbi/anthropic/models/document_block.rbi +81 -0
  176. data/rbi/anthropic/models/encrypted_code_execution_result_block.rbi +63 -0
  177. data/rbi/anthropic/models/encrypted_code_execution_result_block_param.rbi +63 -0
  178. data/rbi/anthropic/models/memory_tool_20250818.rbi +146 -0
  179. data/rbi/anthropic/models/message.rbi +20 -1
  180. data/rbi/anthropic/models/message_count_tokens_params.rbi +40 -4
  181. data/rbi/anthropic/models/message_count_tokens_tool.rbi +640 -1
  182. data/rbi/anthropic/models/message_create_params.rbi +48 -4
  183. data/rbi/anthropic/models/messages/batch_create_params.rbi +48 -4
  184. data/rbi/anthropic/models/model.rbi +4 -0
  185. data/rbi/anthropic/models/raw_content_block_start_event.rbi +22 -3
  186. data/rbi/anthropic/models/raw_message_delta_event.rbi +17 -1
  187. data/rbi/anthropic/models/server_tool_caller.rbi +27 -0
  188. data/rbi/anthropic/models/server_tool_usage.rbi +17 -2
  189. data/rbi/anthropic/models/server_tool_use_block.rbi +116 -4
  190. data/rbi/anthropic/models/server_tool_use_block_param.rbi +147 -5
  191. data/rbi/anthropic/models/text_editor_code_execution_create_result_block.rbi +36 -0
  192. data/rbi/anthropic/models/text_editor_code_execution_create_result_block_param.rbi +36 -0
  193. data/rbi/anthropic/models/text_editor_code_execution_str_replace_result_block.rbi +68 -0
  194. data/rbi/anthropic/models/text_editor_code_execution_str_replace_result_block_param.rbi +68 -0
  195. data/rbi/anthropic/models/text_editor_code_execution_tool_result_block.rbi +85 -0
  196. data/rbi/anthropic/models/text_editor_code_execution_tool_result_block_param.rbi +110 -0
  197. data/rbi/anthropic/models/text_editor_code_execution_tool_result_error.rbi +56 -0
  198. data/rbi/anthropic/models/text_editor_code_execution_tool_result_error_code.rbi +51 -0
  199. data/rbi/anthropic/models/text_editor_code_execution_tool_result_error_param.rbi +54 -0
  200. data/rbi/anthropic/models/text_editor_code_execution_view_result_block.rbi +113 -0
  201. data/rbi/anthropic/models/text_editor_code_execution_view_result_block_param.rbi +113 -0
  202. data/rbi/anthropic/models/tool.rbi +60 -0
  203. data/rbi/anthropic/models/tool_bash_20250124.rbi +73 -0
  204. data/rbi/anthropic/models/tool_reference_block.rbi +26 -0
  205. data/rbi/anthropic/models/tool_reference_block_param.rbi +60 -0
  206. data/rbi/anthropic/models/tool_result_block_param.rbi +3 -1
  207. data/rbi/anthropic/models/tool_search_tool_bm25_20251119.rbi +179 -0
  208. data/rbi/anthropic/models/tool_search_tool_regex_20251119.rbi +179 -0
  209. data/rbi/anthropic/models/tool_search_tool_result_block.rbi +70 -0
  210. data/rbi/anthropic/models/tool_search_tool_result_block_param.rbi +102 -0
  211. data/rbi/anthropic/models/tool_search_tool_result_error.rbi +50 -0
  212. data/rbi/anthropic/models/tool_search_tool_result_error_code.rbi +42 -0
  213. data/rbi/anthropic/models/tool_search_tool_result_error_param.rbi +41 -0
  214. data/rbi/anthropic/models/tool_search_tool_search_result_block.rbi +41 -0
  215. data/rbi/anthropic/models/tool_search_tool_search_result_block_param.rbi +41 -0
  216. data/rbi/anthropic/models/tool_text_editor_20250124.rbi +79 -0
  217. data/rbi/anthropic/models/tool_text_editor_20250429.rbi +79 -0
  218. data/rbi/anthropic/models/tool_text_editor_20250728.rbi +79 -0
  219. data/rbi/anthropic/models/tool_union.rbi +638 -1
  220. data/rbi/anthropic/models/tool_use_block.rbi +65 -1
  221. data/rbi/anthropic/models/tool_use_block_param.rbi +89 -1
  222. data/rbi/anthropic/models/web_fetch_block.rbi +60 -0
  223. data/rbi/anthropic/models/web_fetch_block_param.rbi +60 -0
  224. data/rbi/anthropic/models/web_fetch_tool_20250910.rbi +192 -0
  225. data/rbi/anthropic/models/web_fetch_tool_result_block.rbi +135 -0
  226. data/rbi/anthropic/models/web_fetch_tool_result_block_param.rbi +188 -0
  227. data/rbi/anthropic/models/web_fetch_tool_result_error_block.rbi +41 -0
  228. data/rbi/anthropic/models/web_fetch_tool_result_error_block_param.rbi +41 -0
  229. data/rbi/anthropic/models/web_fetch_tool_result_error_code.rbi +62 -0
  230. data/rbi/anthropic/models/web_search_tool_20250305.rbi +68 -0
  231. data/rbi/anthropic/models/web_search_tool_result_block.rbi +66 -1
  232. data/rbi/anthropic/models/web_search_tool_result_block_param.rbi +89 -1
  233. data/rbi/anthropic/models.rbi +157 -0
  234. data/rbi/anthropic/resources/beta/messages.rbi +9 -0
  235. data/rbi/anthropic/resources/messages.rbi +36 -3
  236. data/sig/anthropic/models/bash_code_execution_output_block.rbs +19 -0
  237. data/sig/anthropic/models/bash_code_execution_output_block_param.rbs +19 -0
  238. data/sig/anthropic/models/bash_code_execution_result_block.rbs +40 -0
  239. data/sig/anthropic/models/bash_code_execution_result_block_param.rbs +40 -0
  240. data/sig/anthropic/models/bash_code_execution_tool_result_block.rbs +40 -0
  241. data/sig/anthropic/models/bash_code_execution_tool_result_block_param.rbs +45 -0
  242. data/sig/anthropic/models/bash_code_execution_tool_result_error.rbs +25 -0
  243. data/sig/anthropic/models/bash_code_execution_tool_result_error_code.rbs +22 -0
  244. data/sig/anthropic/models/bash_code_execution_tool_result_error_param.rbs +25 -0
  245. data/sig/anthropic/models/beta/beta_code_execution_tool_20260120.rbs +68 -0
  246. data/sig/anthropic/models/beta/beta_code_execution_tool_result_block_content.rbs +1 -0
  247. data/sig/anthropic/models/beta/beta_code_execution_tool_result_block_param_content.rbs +1 -0
  248. data/sig/anthropic/models/beta/beta_encrypted_code_execution_result_block.rbs +44 -0
  249. data/sig/anthropic/models/beta/beta_encrypted_code_execution_result_block_param.rbs +44 -0
  250. data/sig/anthropic/models/beta/beta_server_tool_caller_20260120.rbs +23 -0
  251. data/sig/anthropic/models/beta/beta_server_tool_use_block.rbs +1 -0
  252. data/sig/anthropic/models/beta/beta_server_tool_use_block_param.rbs +1 -0
  253. data/sig/anthropic/models/beta/beta_tool_union.rbs +3 -0
  254. data/sig/anthropic/models/beta/beta_tool_use_block.rbs +1 -0
  255. data/sig/anthropic/models/beta/beta_tool_use_block_param.rbs +1 -0
  256. data/sig/anthropic/models/beta/beta_user_location.rbs +44 -0
  257. data/sig/anthropic/models/beta/beta_web_fetch_tool_20260209.rbs +93 -0
  258. data/sig/anthropic/models/beta/beta_web_fetch_tool_result_block.rbs +22 -2
  259. data/sig/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rbs +22 -2
  260. data/sig/anthropic/models/beta/beta_web_search_tool_20250305.rbs +4 -41
  261. data/sig/anthropic/models/beta/beta_web_search_tool_20260209.rbs +88 -0
  262. data/sig/anthropic/models/beta/beta_web_search_tool_result_block.rbs +22 -2
  263. data/sig/anthropic/models/beta/beta_web_search_tool_result_block_param.rbs +22 -2
  264. data/sig/anthropic/models/beta/message_count_tokens_params.rbs +3 -0
  265. data/sig/anthropic/models/citations_config.rbs +13 -0
  266. data/sig/anthropic/models/code_execution_output_block.rbs +16 -0
  267. data/sig/anthropic/models/code_execution_output_block_param.rbs +16 -0
  268. data/sig/anthropic/models/code_execution_result_block.rbs +40 -0
  269. data/sig/anthropic/models/code_execution_result_block_param.rbs +40 -0
  270. data/sig/anthropic/models/code_execution_tool_20250522.rbs +64 -0
  271. data/sig/anthropic/models/code_execution_tool_20250825.rbs +64 -0
  272. data/sig/anthropic/models/code_execution_tool_result_block.rbs +30 -0
  273. data/sig/anthropic/models/code_execution_tool_result_block_content.rbs +14 -0
  274. data/sig/anthropic/models/code_execution_tool_result_block_param.rbs +35 -0
  275. data/sig/anthropic/models/code_execution_tool_result_block_param_content.rbs +14 -0
  276. data/sig/anthropic/models/code_execution_tool_result_error.rbs +25 -0
  277. data/sig/anthropic/models/code_execution_tool_result_error_code.rbs +20 -0
  278. data/sig/anthropic/models/code_execution_tool_result_error_param.rbs +25 -0
  279. data/sig/anthropic/models/container.rbs +15 -0
  280. data/sig/anthropic/models/container_upload_block.rbs +15 -0
  281. data/sig/anthropic/models/container_upload_block_param.rbs +30 -0
  282. data/sig/anthropic/models/content_block.rbs +6 -0
  283. data/sig/anthropic/models/content_block_param.rbs +6 -0
  284. data/sig/anthropic/models/direct_caller.rbs +13 -0
  285. data/sig/anthropic/models/document_block.rbs +43 -0
  286. data/sig/anthropic/models/encrypted_code_execution_result_block.rbs +40 -0
  287. data/sig/anthropic/models/encrypted_code_execution_result_block_param.rbs +40 -0
  288. data/sig/anthropic/models/memory_tool_20250818.rbs +73 -0
  289. data/sig/anthropic/models/message.rbs +5 -0
  290. data/sig/anthropic/models/message_count_tokens_tool.rbs +274 -0
  291. data/sig/anthropic/models/message_create_params.rbs +5 -0
  292. data/sig/anthropic/models/messages/batch_create_params.rbs +5 -0
  293. data/sig/anthropic/models/model.rbs +4 -0
  294. data/sig/anthropic/models/raw_content_block_start_event.rbs +6 -0
  295. data/sig/anthropic/models/raw_message_delta_event.rbs +9 -1
  296. data/sig/anthropic/models/server_tool_caller.rbs +16 -0
  297. data/sig/anthropic/models/server_tool_usage.rbs +12 -3
  298. data/sig/anthropic/models/server_tool_use_block.rbs +59 -4
  299. data/sig/anthropic/models/server_tool_use_block_param.rbs +65 -6
  300. data/sig/anthropic/models/text_editor_code_execution_create_result_block.rbs +22 -0
  301. data/sig/anthropic/models/text_editor_code_execution_create_result_block_param.rbs +22 -0
  302. data/sig/anthropic/models/text_editor_code_execution_str_replace_result_block.rbs +45 -0
  303. data/sig/anthropic/models/text_editor_code_execution_str_replace_result_block_param.rbs +45 -0
  304. data/sig/anthropic/models/text_editor_code_execution_tool_result_block.rbs +42 -0
  305. data/sig/anthropic/models/text_editor_code_execution_tool_result_block_param.rbs +47 -0
  306. data/sig/anthropic/models/text_editor_code_execution_tool_result_error.rbs +30 -0
  307. data/sig/anthropic/models/text_editor_code_execution_tool_result_error_code.rbs +22 -0
  308. data/sig/anthropic/models/text_editor_code_execution_tool_result_error_param.rbs +30 -0
  309. data/sig/anthropic/models/text_editor_code_execution_view_result_block.rbs +57 -0
  310. data/sig/anthropic/models/text_editor_code_execution_view_result_block_param.rbs +57 -0
  311. data/sig/anthropic/models/tool.rbs +36 -0
  312. data/sig/anthropic/models/tool_bash_20250124.rbs +36 -0
  313. data/sig/anthropic/models/tool_reference_block.rbs +15 -0
  314. data/sig/anthropic/models/tool_reference_block_param.rbs +30 -0
  315. data/sig/anthropic/models/tool_result_block_param.rbs +1 -0
  316. data/sig/anthropic/models/tool_search_tool_bm25_20251119.rbs +75 -0
  317. data/sig/anthropic/models/tool_search_tool_regex_20251119.rbs +75 -0
  318. data/sig/anthropic/models/tool_search_tool_result_block.rbs +40 -0
  319. data/sig/anthropic/models/tool_search_tool_result_block_param.rbs +45 -0
  320. data/sig/anthropic/models/tool_search_tool_result_error.rbs +30 -0
  321. data/sig/anthropic/models/tool_search_tool_result_error_code.rbs +20 -0
  322. data/sig/anthropic/models/tool_search_tool_result_error_param.rbs +25 -0
  323. data/sig/anthropic/models/tool_search_tool_search_result_block.rbs +25 -0
  324. data/sig/anthropic/models/tool_search_tool_search_result_block_param.rbs +25 -0
  325. data/sig/anthropic/models/tool_text_editor_20250124.rbs +36 -0
  326. data/sig/anthropic/models/tool_text_editor_20250429.rbs +36 -0
  327. data/sig/anthropic/models/tool_text_editor_20250728.rbs +36 -0
  328. data/sig/anthropic/models/tool_union.rbs +274 -0
  329. data/sig/anthropic/models/tool_use_block.rbs +38 -1
  330. data/sig/anthropic/models/tool_use_block_param.rbs +38 -2
  331. data/sig/anthropic/models/web_fetch_block.rbs +35 -0
  332. data/sig/anthropic/models/web_fetch_block_param.rbs +35 -0
  333. data/sig/anthropic/models/web_fetch_tool_20250910.rbs +89 -0
  334. data/sig/anthropic/models/web_fetch_tool_result_block.rbs +71 -0
  335. data/sig/anthropic/models/web_fetch_tool_result_block_param.rbs +81 -0
  336. data/sig/anthropic/models/web_fetch_tool_result_error_block.rbs +25 -0
  337. data/sig/anthropic/models/web_fetch_tool_result_error_block_param.rbs +25 -0
  338. data/sig/anthropic/models/web_fetch_tool_result_error_code.rbs +28 -0
  339. data/sig/anthropic/models/web_search_tool_20250305.rbs +27 -0
  340. data/sig/anthropic/models/web_search_tool_result_block.rbs +32 -0
  341. data/sig/anthropic/models/web_search_tool_result_block_param.rbs +38 -2
  342. data/sig/anthropic/models.rbs +124 -0
  343. data/sig/anthropic/resources/messages.rbs +2 -0
  344. metadata +209 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d358b56bdf131ba8881da469e4f43252dacc64f199da513b9af6642e5adaba3
4
- data.tar.gz: 2743c7a1fea4c86ddecadf74b44ba0ca4a795bdb65e6af29ba57ef475e10e076
3
+ metadata.gz: 6d7ee7b28853f467e03dfd3aad75f225c5c9aea18f555df7bc3aa5260cc780ce
4
+ data.tar.gz: c27e4f300d4086681495211b73e0efda92d146c4cf8e8953884e3fa10f0e3235
5
5
  SHA512:
6
- metadata.gz: 259cb9cd328c0f156212c05328439281ccceb75a7993d9832c82d8890e066146b94c8f77b1b43eacb239b54371e8f6443cc25fe28999e3a86008ebb557bb0a84
7
- data.tar.gz: 8e290e95b2156263dbb4613c88a6b83dd3f33e03843f4a2b8e315553a5cd1ccb93d20e1562ee0454a523823c26ccd901a05462893765547119b9c588fd398071
6
+ metadata.gz: 9680aa601e1468ce9198d6f066894f65e84cf9220c50acd94f5aed8b1a5e0e7052a48c65b0b96053f80bd03694907be0de3af30ed545cfc1009bc538cbfe9e0a
7
+ data.tar.gz: 4f796334a1c2bdd3953aa6b69e70fedb33dfbca9d4bdb7df9b696ff8995b5d342ecb6c4938fa9006defc9762240491299619db32250920fda60e7c1b2a1a014a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.20.0 (2026-02-17)
4
+
5
+ Full Changelog: [v1.19.0...v1.20.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.19.0...v1.20.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** Releasing claude-sonnet-4-6 ([389bc47](https://github.com/anthropics/anthropic-sdk-ruby/commit/389bc4755468998ffed4841c9e1a054957224152))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * **api:** fix spec errors ([85567d3](https://github.com/anthropics/anthropic-sdk-ruby/commit/85567d31b7520311f6607a7a0af682c513ad32e1))
15
+
3
16
  ## 1.19.0 (2026-02-07)
4
17
 
5
18
  Full Changelog: [v1.18.1...v1.19.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.18.1...v1.19.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.19.0"
18
+ gem "anthropic", "~> 1.20.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -17,28 +17,28 @@ module Anthropic
17
17
  # values safely.
18
18
  #
19
19
  # @example
20
- # # `stop_reason` is a `Anthropic::StopReason`
21
- # case stop_reason
22
- # when Anthropic::StopReason::END_TURN
20
+ # # `bash_code_execution_tool_result_error_code` is a `Anthropic::BashCodeExecutionToolResultErrorCode`
21
+ # case bash_code_execution_tool_result_error_code
22
+ # when Anthropic::BashCodeExecutionToolResultErrorCode::INVALID_TOOL_INPUT
23
23
  # # ...
24
- # when Anthropic::StopReason::MAX_TOKENS
24
+ # when Anthropic::BashCodeExecutionToolResultErrorCode::UNAVAILABLE
25
25
  # # ...
26
- # when Anthropic::StopReason::STOP_SEQUENCE
26
+ # when Anthropic::BashCodeExecutionToolResultErrorCode::TOO_MANY_REQUESTS
27
27
  # # ...
28
28
  # else
29
- # puts(stop_reason)
29
+ # puts(bash_code_execution_tool_result_error_code)
30
30
  # end
31
31
  #
32
32
  # @example
33
- # case stop_reason
34
- # in :end_turn
33
+ # case bash_code_execution_tool_result_error_code
34
+ # in :invalid_tool_input
35
35
  # # ...
36
- # in :max_tokens
36
+ # in :unavailable
37
37
  # # ...
38
- # in :stop_sequence
38
+ # in :too_many_requests
39
39
  # # ...
40
40
  # else
41
- # puts(stop_reason)
41
+ # puts(bash_code_execution_tool_result_error_code)
42
42
  # end
43
43
  module Enum
44
44
  include Anthropic::Internal::Type::Converter
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ class BashCodeExecutionOutputBlock < Anthropic::Internal::Type::BaseModel
6
+ # @!attribute file_id
7
+ #
8
+ # @return [String]
9
+ required :file_id, String
10
+
11
+ # @!attribute type
12
+ #
13
+ # @return [Symbol, :bash_code_execution_output]
14
+ required :type, const: :bash_code_execution_output
15
+
16
+ # @!method initialize(file_id:, type: :bash_code_execution_output)
17
+ # @param file_id [String]
18
+ # @param type [Symbol, :bash_code_execution_output]
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ class BashCodeExecutionOutputBlockParam < Anthropic::Internal::Type::BaseModel
6
+ # @!attribute file_id
7
+ #
8
+ # @return [String]
9
+ required :file_id, String
10
+
11
+ # @!attribute type
12
+ #
13
+ # @return [Symbol, :bash_code_execution_output]
14
+ required :type, const: :bash_code_execution_output
15
+
16
+ # @!method initialize(file_id:, type: :bash_code_execution_output)
17
+ # @param file_id [String]
18
+ # @param type [Symbol, :bash_code_execution_output]
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ class BashCodeExecutionResultBlock < Anthropic::Internal::Type::BaseModel
6
+ # @!attribute content
7
+ #
8
+ # @return [Array<Anthropic::Models::BashCodeExecutionOutputBlock>]
9
+ required :content, -> { Anthropic::Internal::Type::ArrayOf[Anthropic::BashCodeExecutionOutputBlock] }
10
+
11
+ # @!attribute return_code
12
+ #
13
+ # @return [Integer]
14
+ required :return_code, Integer
15
+
16
+ # @!attribute stderr
17
+ #
18
+ # @return [String]
19
+ required :stderr, String
20
+
21
+ # @!attribute stdout
22
+ #
23
+ # @return [String]
24
+ required :stdout, String
25
+
26
+ # @!attribute type
27
+ #
28
+ # @return [Symbol, :bash_code_execution_result]
29
+ required :type, const: :bash_code_execution_result
30
+
31
+ # @!method initialize(content:, return_code:, stderr:, stdout:, type: :bash_code_execution_result)
32
+ # @param content [Array<Anthropic::Models::BashCodeExecutionOutputBlock>]
33
+ # @param return_code [Integer]
34
+ # @param stderr [String]
35
+ # @param stdout [String]
36
+ # @param type [Symbol, :bash_code_execution_result]
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ class BashCodeExecutionResultBlockParam < Anthropic::Internal::Type::BaseModel
6
+ # @!attribute content
7
+ #
8
+ # @return [Array<Anthropic::Models::BashCodeExecutionOutputBlockParam>]
9
+ required :content, -> { Anthropic::Internal::Type::ArrayOf[Anthropic::BashCodeExecutionOutputBlockParam] }
10
+
11
+ # @!attribute return_code
12
+ #
13
+ # @return [Integer]
14
+ required :return_code, Integer
15
+
16
+ # @!attribute stderr
17
+ #
18
+ # @return [String]
19
+ required :stderr, String
20
+
21
+ # @!attribute stdout
22
+ #
23
+ # @return [String]
24
+ required :stdout, String
25
+
26
+ # @!attribute type
27
+ #
28
+ # @return [Symbol, :bash_code_execution_result]
29
+ required :type, const: :bash_code_execution_result
30
+
31
+ # @!method initialize(content:, return_code:, stderr:, stdout:, type: :bash_code_execution_result)
32
+ # @param content [Array<Anthropic::Models::BashCodeExecutionOutputBlockParam>]
33
+ # @param return_code [Integer]
34
+ # @param stderr [String]
35
+ # @param stdout [String]
36
+ # @param type [Symbol, :bash_code_execution_result]
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ class BashCodeExecutionToolResultBlock < Anthropic::Internal::Type::BaseModel
6
+ # @!attribute content
7
+ #
8
+ # @return [Anthropic::Models::BashCodeExecutionToolResultError, Anthropic::Models::BashCodeExecutionResultBlock]
9
+ required :content, union: -> { Anthropic::BashCodeExecutionToolResultBlock::Content }
10
+
11
+ # @!attribute tool_use_id
12
+ #
13
+ # @return [String]
14
+ required :tool_use_id, String
15
+
16
+ # @!attribute type
17
+ #
18
+ # @return [Symbol, :bash_code_execution_tool_result]
19
+ required :type, const: :bash_code_execution_tool_result
20
+
21
+ # @!method initialize(content:, tool_use_id:, type: :bash_code_execution_tool_result)
22
+ # @param content [Anthropic::Models::BashCodeExecutionToolResultError, Anthropic::Models::BashCodeExecutionResultBlock]
23
+ # @param tool_use_id [String]
24
+ # @param type [Symbol, :bash_code_execution_tool_result]
25
+
26
+ # @see Anthropic::Models::BashCodeExecutionToolResultBlock#content
27
+ module Content
28
+ extend Anthropic::Internal::Type::Union
29
+
30
+ variant -> { Anthropic::BashCodeExecutionToolResultError }
31
+
32
+ variant -> { Anthropic::BashCodeExecutionResultBlock }
33
+
34
+ # @!method self.variants
35
+ # @return [Array(Anthropic::Models::BashCodeExecutionToolResultError, Anthropic::Models::BashCodeExecutionResultBlock)]
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ class BashCodeExecutionToolResultBlockParam < Anthropic::Internal::Type::BaseModel
6
+ # @!attribute content
7
+ #
8
+ # @return [Anthropic::Models::BashCodeExecutionToolResultErrorParam, Anthropic::Models::BashCodeExecutionResultBlockParam]
9
+ required :content, union: -> { Anthropic::BashCodeExecutionToolResultBlockParam::Content }
10
+
11
+ # @!attribute tool_use_id
12
+ #
13
+ # @return [String]
14
+ required :tool_use_id, String
15
+
16
+ # @!attribute type
17
+ #
18
+ # @return [Symbol, :bash_code_execution_tool_result]
19
+ required :type, const: :bash_code_execution_tool_result
20
+
21
+ # @!attribute cache_control
22
+ # Create a cache control breakpoint at this content block.
23
+ #
24
+ # @return [Anthropic::Models::CacheControlEphemeral, nil]
25
+ optional :cache_control, -> { Anthropic::CacheControlEphemeral }, nil?: true
26
+
27
+ # @!method initialize(content:, tool_use_id:, cache_control: nil, type: :bash_code_execution_tool_result)
28
+ # @param content [Anthropic::Models::BashCodeExecutionToolResultErrorParam, Anthropic::Models::BashCodeExecutionResultBlockParam]
29
+ #
30
+ # @param tool_use_id [String]
31
+ #
32
+ # @param cache_control [Anthropic::Models::CacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
33
+ #
34
+ # @param type [Symbol, :bash_code_execution_tool_result]
35
+
36
+ # @see Anthropic::Models::BashCodeExecutionToolResultBlockParam#content
37
+ module Content
38
+ extend Anthropic::Internal::Type::Union
39
+
40
+ variant -> { Anthropic::BashCodeExecutionToolResultErrorParam }
41
+
42
+ variant -> { Anthropic::BashCodeExecutionResultBlockParam }
43
+
44
+ # @!method self.variants
45
+ # @return [Array(Anthropic::Models::BashCodeExecutionToolResultErrorParam, Anthropic::Models::BashCodeExecutionResultBlockParam)]
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ class BashCodeExecutionToolResultError < Anthropic::Internal::Type::BaseModel
6
+ # @!attribute error_code
7
+ #
8
+ # @return [Symbol, Anthropic::Models::BashCodeExecutionToolResultErrorCode]
9
+ required :error_code, enum: -> { Anthropic::BashCodeExecutionToolResultErrorCode }
10
+
11
+ # @!attribute type
12
+ #
13
+ # @return [Symbol, :bash_code_execution_tool_result_error]
14
+ required :type, const: :bash_code_execution_tool_result_error
15
+
16
+ # @!method initialize(error_code:, type: :bash_code_execution_tool_result_error)
17
+ # @param error_code [Symbol, Anthropic::Models::BashCodeExecutionToolResultErrorCode]
18
+ # @param type [Symbol, :bash_code_execution_tool_result_error]
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module BashCodeExecutionToolResultErrorCode
6
+ extend Anthropic::Internal::Type::Enum
7
+
8
+ INVALID_TOOL_INPUT = :invalid_tool_input
9
+ UNAVAILABLE = :unavailable
10
+ TOO_MANY_REQUESTS = :too_many_requests
11
+ EXECUTION_TIME_EXCEEDED = :execution_time_exceeded
12
+ OUTPUT_FILE_TOO_LARGE = :output_file_too_large
13
+
14
+ # @!method self.values
15
+ # @return [Array<Symbol>]
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ class BashCodeExecutionToolResultErrorParam < Anthropic::Internal::Type::BaseModel
6
+ # @!attribute error_code
7
+ #
8
+ # @return [Symbol, Anthropic::Models::BashCodeExecutionToolResultErrorCode]
9
+ required :error_code, enum: -> { Anthropic::BashCodeExecutionToolResultErrorCode }
10
+
11
+ # @!attribute type
12
+ #
13
+ # @return [Symbol, :bash_code_execution_tool_result_error]
14
+ required :type, const: :bash_code_execution_tool_result_error
15
+
16
+ # @!method initialize(error_code:, type: :bash_code_execution_tool_result_error)
17
+ # @param error_code [Symbol, Anthropic::Models::BashCodeExecutionToolResultErrorCode]
18
+ # @param type [Symbol, :bash_code_execution_tool_result_error]
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,78 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaCodeExecutionTool20260120 < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute name
8
+ # Name of the tool.
9
+ #
10
+ # This is how the tool will be called by the model and in `tool_use` blocks.
11
+ #
12
+ # @return [Symbol, :code_execution]
13
+ required :name, const: :code_execution
14
+
15
+ # @!attribute type
16
+ #
17
+ # @return [Symbol, :code_execution_20260120]
18
+ required :type, const: :code_execution_20260120
19
+
20
+ # @!attribute allowed_callers
21
+ #
22
+ # @return [Array<Symbol, Anthropic::Models::Beta::BetaCodeExecutionTool20260120::AllowedCaller>, nil]
23
+ optional :allowed_callers,
24
+ -> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::BetaCodeExecutionTool20260120::AllowedCaller] }
25
+
26
+ # @!attribute cache_control
27
+ # Create a cache control breakpoint at this content block.
28
+ #
29
+ # @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
30
+ optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
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 strict
40
+ # When true, guarantees schema validation on tool names and inputs
41
+ #
42
+ # @return [Boolean, nil]
43
+ optional :strict, Anthropic::Internal::Type::Boolean
44
+
45
+ # @!method initialize(allowed_callers: nil, cache_control: nil, defer_loading: nil, strict: nil, name: :code_execution, type: :code_execution_20260120)
46
+ # Some parameter documentations has been truncated, see
47
+ # {Anthropic::Models::Beta::BetaCodeExecutionTool20260120} for more details.
48
+ #
49
+ # Code execution tool with REPL state persistence (daemon mode + gVisor
50
+ # checkpoint).
51
+ #
52
+ # @param allowed_callers [Array<Symbol, Anthropic::Models::Beta::BetaCodeExecutionTool20260120::AllowedCaller>]
53
+ #
54
+ # @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
55
+ #
56
+ # @param defer_loading [Boolean] If true, tool will not be included in initial system prompt. Only loaded when re
57
+ #
58
+ # @param strict [Boolean] When true, guarantees schema validation on tool names and inputs
59
+ #
60
+ # @param name [Symbol, :code_execution] Name of the tool.
61
+ #
62
+ # @param type [Symbol, :code_execution_20260120]
63
+
64
+ module AllowedCaller
65
+ extend Anthropic::Internal::Type::Enum
66
+
67
+ DIRECT = :direct
68
+ CODE_EXECUTION_20250825 = :code_execution_20250825
69
+
70
+ # @!method self.values
71
+ # @return [Array<Symbol>]
72
+ end
73
+ end
74
+ end
75
+
76
+ BetaCodeExecutionTool20260120 = Beta::BetaCodeExecutionTool20260120
77
+ end
78
+ end
@@ -5,8 +5,9 @@ module Anthropic
5
5
  module Beta
6
6
  class BetaCodeExecutionToolResultBlock < Anthropic::Internal::Type::BaseModel
7
7
  # @!attribute content
8
+ # Code execution result with encrypted stdout for PFC + web_search results.
8
9
  #
9
- # @return [Anthropic::Models::Beta::BetaCodeExecutionToolResultError, Anthropic::Models::Beta::BetaCodeExecutionResultBlock]
10
+ # @return [Anthropic::Models::Beta::BetaCodeExecutionToolResultError, Anthropic::Models::Beta::BetaCodeExecutionResultBlock, Anthropic::Models::Beta::BetaEncryptedCodeExecutionResultBlock]
10
11
  required :content, union: -> { Anthropic::Beta::BetaCodeExecutionToolResultBlockContent }
11
12
 
12
13
  # @!attribute tool_use_id
@@ -20,8 +21,10 @@ module Anthropic
20
21
  required :type, const: :code_execution_tool_result
21
22
 
22
23
  # @!method initialize(content:, tool_use_id:, type: :code_execution_tool_result)
23
- # @param content [Anthropic::Models::Beta::BetaCodeExecutionToolResultError, Anthropic::Models::Beta::BetaCodeExecutionResultBlock]
24
+ # @param content [Anthropic::Models::Beta::BetaCodeExecutionToolResultError, Anthropic::Models::Beta::BetaCodeExecutionResultBlock, Anthropic::Models::Beta::BetaEncryptedCodeExecutionResultBlock] Code execution result with encrypted stdout for PFC + web_search results.
25
+ #
24
26
  # @param tool_use_id [String]
27
+ #
25
28
  # @param type [Symbol, :code_execution_tool_result]
26
29
  end
27
30
  end
@@ -3,6 +3,7 @@
3
3
  module Anthropic
4
4
  module Models
5
5
  module Beta
6
+ # Code execution result with encrypted stdout for PFC + web_search results.
6
7
  module BetaCodeExecutionToolResultBlockContent
7
8
  extend Anthropic::Internal::Type::Union
8
9
 
@@ -10,8 +11,11 @@ module Anthropic
10
11
 
11
12
  variant -> { Anthropic::Beta::BetaCodeExecutionResultBlock }
12
13
 
14
+ # Code execution result with encrypted stdout for PFC + web_search results.
15
+ variant -> { Anthropic::Beta::BetaEncryptedCodeExecutionResultBlock }
16
+
13
17
  # @!method self.variants
14
- # @return [Array(Anthropic::Models::Beta::BetaCodeExecutionToolResultError, Anthropic::Models::Beta::BetaCodeExecutionResultBlock)]
18
+ # @return [Array(Anthropic::Models::Beta::BetaCodeExecutionToolResultError, Anthropic::Models::Beta::BetaCodeExecutionResultBlock, Anthropic::Models::Beta::BetaEncryptedCodeExecutionResultBlock)]
15
19
  end
16
20
  end
17
21
 
@@ -5,8 +5,9 @@ module Anthropic
5
5
  module Beta
6
6
  class BetaCodeExecutionToolResultBlockParam < Anthropic::Internal::Type::BaseModel
7
7
  # @!attribute content
8
+ # Code execution result with encrypted stdout for PFC + web_search results.
8
9
  #
9
- # @return [Anthropic::Models::Beta::BetaCodeExecutionToolResultErrorParam, Anthropic::Models::Beta::BetaCodeExecutionResultBlockParam]
10
+ # @return [Anthropic::Models::Beta::BetaCodeExecutionToolResultErrorParam, Anthropic::Models::Beta::BetaCodeExecutionResultBlockParam, Anthropic::Models::Beta::BetaEncryptedCodeExecutionResultBlockParam]
10
11
  required :content, union: -> { Anthropic::Beta::BetaCodeExecutionToolResultBlockParamContent }
11
12
 
12
13
  # @!attribute tool_use_id
@@ -26,7 +27,7 @@ module Anthropic
26
27
  optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
27
28
 
28
29
  # @!method initialize(content:, tool_use_id:, cache_control: nil, type: :code_execution_tool_result)
29
- # @param content [Anthropic::Models::Beta::BetaCodeExecutionToolResultErrorParam, Anthropic::Models::Beta::BetaCodeExecutionResultBlockParam]
30
+ # @param content [Anthropic::Models::Beta::BetaCodeExecutionToolResultErrorParam, Anthropic::Models::Beta::BetaCodeExecutionResultBlockParam, Anthropic::Models::Beta::BetaEncryptedCodeExecutionResultBlockParam] Code execution result with encrypted stdout for PFC + web_search results.
30
31
  #
31
32
  # @param tool_use_id [String]
32
33
  #
@@ -3,6 +3,7 @@
3
3
  module Anthropic
4
4
  module Models
5
5
  module Beta
6
+ # Code execution result with encrypted stdout for PFC + web_search results.
6
7
  module BetaCodeExecutionToolResultBlockParamContent
7
8
  extend Anthropic::Internal::Type::Union
8
9
 
@@ -10,8 +11,11 @@ module Anthropic
10
11
 
11
12
  variant -> { Anthropic::Beta::BetaCodeExecutionResultBlockParam }
12
13
 
14
+ # Code execution result with encrypted stdout for PFC + web_search results.
15
+ variant -> { Anthropic::Beta::BetaEncryptedCodeExecutionResultBlockParam }
16
+
13
17
  # @!method self.variants
14
- # @return [Array(Anthropic::Models::Beta::BetaCodeExecutionToolResultErrorParam, Anthropic::Models::Beta::BetaCodeExecutionResultBlockParam)]
18
+ # @return [Array(Anthropic::Models::Beta::BetaCodeExecutionToolResultErrorParam, Anthropic::Models::Beta::BetaCodeExecutionResultBlockParam, Anthropic::Models::Beta::BetaEncryptedCodeExecutionResultBlockParam)]
15
19
  end
16
20
  end
17
21
 
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaEncryptedCodeExecutionResultBlock < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute content
8
+ #
9
+ # @return [Array<Anthropic::Models::Beta::BetaCodeExecutionOutputBlock>]
10
+ required :content,
11
+ -> { Anthropic::Internal::Type::ArrayOf[Anthropic::Beta::BetaCodeExecutionOutputBlock] }
12
+
13
+ # @!attribute encrypted_stdout
14
+ #
15
+ # @return [String]
16
+ required :encrypted_stdout, String
17
+
18
+ # @!attribute return_code
19
+ #
20
+ # @return [Integer]
21
+ required :return_code, Integer
22
+
23
+ # @!attribute stderr
24
+ #
25
+ # @return [String]
26
+ required :stderr, String
27
+
28
+ # @!attribute type
29
+ #
30
+ # @return [Symbol, :encrypted_code_execution_result]
31
+ required :type, const: :encrypted_code_execution_result
32
+
33
+ # @!method initialize(content:, encrypted_stdout:, return_code:, stderr:, type: :encrypted_code_execution_result)
34
+ # Code execution result with encrypted stdout for PFC + web_search results.
35
+ #
36
+ # @param content [Array<Anthropic::Models::Beta::BetaCodeExecutionOutputBlock>]
37
+ # @param encrypted_stdout [String]
38
+ # @param return_code [Integer]
39
+ # @param stderr [String]
40
+ # @param type [Symbol, :encrypted_code_execution_result]
41
+ end
42
+ end
43
+
44
+ BetaEncryptedCodeExecutionResultBlock = Beta::BetaEncryptedCodeExecutionResultBlock
45
+ end
46
+ end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaEncryptedCodeExecutionResultBlockParam < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute content
8
+ #
9
+ # @return [Array<Anthropic::Models::Beta::BetaCodeExecutionOutputBlockParam>]
10
+ required :content,
11
+ -> { Anthropic::Internal::Type::ArrayOf[Anthropic::Beta::BetaCodeExecutionOutputBlockParam] }
12
+
13
+ # @!attribute encrypted_stdout
14
+ #
15
+ # @return [String]
16
+ required :encrypted_stdout, String
17
+
18
+ # @!attribute return_code
19
+ #
20
+ # @return [Integer]
21
+ required :return_code, Integer
22
+
23
+ # @!attribute stderr
24
+ #
25
+ # @return [String]
26
+ required :stderr, String
27
+
28
+ # @!attribute type
29
+ #
30
+ # @return [Symbol, :encrypted_code_execution_result]
31
+ required :type, const: :encrypted_code_execution_result
32
+
33
+ # @!method initialize(content:, encrypted_stdout:, return_code:, stderr:, type: :encrypted_code_execution_result)
34
+ # Code execution result with encrypted stdout for PFC + web_search results.
35
+ #
36
+ # @param content [Array<Anthropic::Models::Beta::BetaCodeExecutionOutputBlockParam>]
37
+ # @param encrypted_stdout [String]
38
+ # @param return_code [Integer]
39
+ # @param stderr [String]
40
+ # @param type [Symbol, :encrypted_code_execution_result]
41
+ end
42
+ end
43
+
44
+ BetaEncryptedCodeExecutionResultBlockParam = Beta::BetaEncryptedCodeExecutionResultBlockParam
45
+ end
46
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaServerToolCaller20260120 < 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_20260120]
15
+ required :type, const: :code_execution_20260120
16
+
17
+ # @!method initialize(tool_id:, type: :code_execution_20260120)
18
+ # @param tool_id [String]
19
+ # @param type [Symbol, :code_execution_20260120]
20
+ end
21
+ end
22
+
23
+ BetaServerToolCaller20260120 = Beta::BetaServerToolCaller20260120
24
+ end
25
+ end