anthropic 1.1.1 → 1.9.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 (331) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +170 -0
  3. data/README.md +32 -16
  4. data/lib/anthropic/client.rb +5 -2
  5. data/lib/anthropic/errors.rb +22 -0
  6. data/lib/anthropic/helpers/bedrock/client.rb +34 -4
  7. data/lib/anthropic/helpers/input_schema/array_of.rb +41 -0
  8. data/lib/anthropic/helpers/input_schema/base_model.rb +86 -0
  9. data/lib/anthropic/helpers/input_schema/boolean.rb +29 -0
  10. data/lib/anthropic/helpers/input_schema/enum_of.rb +63 -0
  11. data/lib/anthropic/helpers/input_schema/json_schema_converter.rb +199 -0
  12. data/lib/anthropic/helpers/input_schema/parsed_json.rb +39 -0
  13. data/lib/anthropic/helpers/input_schema/property_mapping.rb +47 -0
  14. data/lib/anthropic/helpers/input_schema/union_of.rb +56 -0
  15. data/lib/anthropic/helpers/input_schema.rb +16 -0
  16. data/lib/anthropic/helpers/streaming/events.rb +141 -0
  17. data/lib/anthropic/helpers/streaming/message_stream.rb +278 -0
  18. data/lib/anthropic/helpers/streaming.rb +37 -0
  19. data/lib/anthropic/helpers/vertex/client.rb +4 -1
  20. data/lib/anthropic/input_schema.rb +10 -0
  21. data/lib/anthropic/internal/stream.rb +6 -3
  22. data/lib/anthropic/internal/transport/base_client.rb +30 -5
  23. data/lib/anthropic/internal/transport/pooled_net_requester.rb +1 -9
  24. data/lib/anthropic/internal/type/array_of.rb +7 -1
  25. data/lib/anthropic/internal/type/base_model.rb +81 -32
  26. data/lib/anthropic/internal/type/base_stream.rb +3 -1
  27. data/lib/anthropic/internal/type/boolean.rb +7 -1
  28. data/lib/anthropic/internal/type/converter.rb +69 -34
  29. data/lib/anthropic/internal/type/enum.rb +16 -5
  30. data/lib/anthropic/internal/type/file_input.rb +6 -1
  31. data/lib/anthropic/internal/type/hash_of.rb +7 -1
  32. data/lib/anthropic/internal/type/union.rb +26 -16
  33. data/lib/anthropic/internal/type/unknown.rb +7 -1
  34. data/lib/anthropic/internal/util.rb +10 -11
  35. data/lib/anthropic/models/anthropic_beta.rb +3 -0
  36. data/lib/anthropic/models/beta/beta_base64_pdf_block.rb +1 -65
  37. data/lib/anthropic/models/beta/beta_bash_code_execution_output_block.rb +25 -0
  38. data/lib/anthropic/models/beta/beta_bash_code_execution_output_block_param.rb +25 -0
  39. data/lib/anthropic/models/beta/beta_bash_code_execution_result_block.rb +44 -0
  40. data/lib/anthropic/models/beta/beta_bash_code_execution_result_block_param.rb +44 -0
  41. data/lib/anthropic/models/beta/beta_bash_code_execution_tool_result_block.rb +43 -0
  42. data/lib/anthropic/models/beta/beta_bash_code_execution_tool_result_block_param.rb +53 -0
  43. data/lib/anthropic/models/beta/beta_bash_code_execution_tool_result_error.rb +39 -0
  44. data/lib/anthropic/models/beta/beta_bash_code_execution_tool_result_error_param.rb +39 -0
  45. data/lib/anthropic/models/beta/beta_citation_char_location.rb +7 -1
  46. data/lib/anthropic/models/beta/beta_citation_config.rb +19 -0
  47. data/lib/anthropic/models/beta/beta_citation_content_block_location.rb +7 -1
  48. data/lib/anthropic/models/beta/beta_citation_page_location.rb +7 -1
  49. data/lib/anthropic/models/beta/beta_citation_search_result_location.rb +55 -0
  50. data/lib/anthropic/models/beta/beta_citation_search_result_location_param.rb +55 -0
  51. data/lib/anthropic/models/beta/beta_citations_delta.rb +5 -3
  52. data/lib/anthropic/models/beta/beta_code_execution_tool_20250825.rb +40 -0
  53. data/lib/anthropic/models/beta/beta_content_block.rb +12 -5
  54. data/lib/anthropic/models/beta/beta_content_block_param.rb +28 -17
  55. data/lib/anthropic/models/beta/beta_document_block.rb +56 -0
  56. data/lib/anthropic/models/beta/beta_message.rb +6 -2
  57. data/lib/anthropic/models/beta/beta_message_param.rb +3 -3
  58. data/lib/anthropic/models/beta/beta_raw_content_block_start_event.rb +14 -7
  59. data/lib/anthropic/models/beta/beta_request_document_block.rb +75 -0
  60. data/lib/anthropic/models/beta/beta_search_result_block_param.rb +55 -0
  61. data/lib/anthropic/models/beta/beta_server_tool_usage.rb +9 -1
  62. data/lib/anthropic/models/beta/beta_server_tool_use_block.rb +3 -0
  63. data/lib/anthropic/models/beta/beta_server_tool_use_block_param.rb +3 -0
  64. data/lib/anthropic/models/beta/beta_text_block.rb +2 -2
  65. data/lib/anthropic/models/beta/beta_text_block_param.rb +2 -2
  66. data/lib/anthropic/models/beta/beta_text_citation.rb +3 -1
  67. data/lib/anthropic/models/beta/beta_text_citation_param.rb +3 -1
  68. data/lib/anthropic/models/beta/beta_text_editor_code_execution_create_result_block.rb +25 -0
  69. data/lib/anthropic/models/beta/beta_text_editor_code_execution_create_result_block_param.rb +26 -0
  70. data/lib/anthropic/models/beta/beta_text_editor_code_execution_str_replace_result_block.rb +49 -0
  71. data/lib/anthropic/models/beta/beta_text_editor_code_execution_str_replace_result_block_param.rb +50 -0
  72. data/lib/anthropic/models/beta/beta_text_editor_code_execution_tool_result_block.rb +47 -0
  73. data/lib/anthropic/models/beta/beta_text_editor_code_execution_tool_result_block_param.rb +57 -0
  74. data/lib/anthropic/models/beta/beta_text_editor_code_execution_tool_result_error.rb +45 -0
  75. data/lib/anthropic/models/beta/beta_text_editor_code_execution_tool_result_error_param.rb +46 -0
  76. data/lib/anthropic/models/beta/beta_text_editor_code_execution_view_result_block.rb +61 -0
  77. data/lib/anthropic/models/beta/beta_text_editor_code_execution_view_result_block_param.rb +62 -0
  78. data/lib/anthropic/models/beta/beta_tool.rb +7 -1
  79. data/lib/anthropic/models/beta/beta_tool_result_block_param.rb +8 -4
  80. data/lib/anthropic/models/beta/beta_tool_text_editor_20250728.rb +49 -0
  81. data/lib/anthropic/models/beta/beta_tool_union.rb +12 -6
  82. data/lib/anthropic/models/beta/beta_web_fetch_block.rb +42 -0
  83. data/lib/anthropic/models/beta/beta_web_fetch_block_param.rb +42 -0
  84. data/lib/anthropic/models/beta/beta_web_fetch_tool_20250910.rb +82 -0
  85. data/lib/anthropic/models/beta/beta_web_fetch_tool_result_block.rb +43 -0
  86. data/lib/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rb +53 -0
  87. data/lib/anthropic/models/beta/beta_web_fetch_tool_result_error_block.rb +25 -0
  88. data/lib/anthropic/models/beta/beta_web_fetch_tool_result_error_block_param.rb +25 -0
  89. data/lib/anthropic/models/beta/beta_web_fetch_tool_result_error_code.rb +25 -0
  90. data/lib/anthropic/models/beta/message_count_tokens_params.rb +23 -36
  91. data/lib/anthropic/models/beta/message_create_params.rb +10 -27
  92. data/lib/anthropic/models/beta/messages/batch_create_params.rb +13 -37
  93. data/lib/anthropic/models/beta/messages/beta_message_batch.rb +1 -4
  94. data/lib/anthropic/models/beta_error_response.rb +7 -1
  95. data/lib/anthropic/models/cache_control_ephemeral.rb +39 -1
  96. data/lib/anthropic/models/cache_creation.rb +24 -0
  97. data/lib/anthropic/models/citation_char_location.rb +7 -1
  98. data/lib/anthropic/models/citation_content_block_location.rb +7 -1
  99. data/lib/anthropic/models/citation_page_location.rb +7 -1
  100. data/lib/anthropic/models/citation_search_result_location_param.rb +51 -0
  101. data/lib/anthropic/models/citations_delta.rb +5 -3
  102. data/lib/anthropic/models/citations_search_result_location.rb +51 -0
  103. data/lib/anthropic/models/content_block.rb +5 -5
  104. data/lib/anthropic/models/content_block_param.rb +14 -11
  105. data/lib/anthropic/models/document_block_param.rb +2 -2
  106. data/lib/anthropic/models/error_response.rb +7 -1
  107. data/lib/anthropic/models/message.rb +6 -2
  108. data/lib/anthropic/models/message_count_tokens_params.rb +10 -27
  109. data/lib/anthropic/models/message_count_tokens_tool.rb +5 -1
  110. data/lib/anthropic/models/message_create_params.rb +10 -27
  111. data/lib/anthropic/models/message_param.rb +3 -3
  112. data/lib/anthropic/models/messages/batch_create_params.rb +11 -31
  113. data/lib/anthropic/models/model.rb +16 -21
  114. data/lib/anthropic/models/raw_content_block_start_event.rb +7 -7
  115. data/lib/anthropic/models/search_result_block_param.rb +51 -0
  116. data/lib/anthropic/models/text_block.rb +2 -2
  117. data/lib/anthropic/models/text_block_param.rb +2 -2
  118. data/lib/anthropic/models/text_citation.rb +3 -1
  119. data/lib/anthropic/models/text_citation_param.rb +3 -1
  120. data/lib/anthropic/models/tool.rb +7 -1
  121. data/lib/anthropic/models/tool_result_block_param.rb +8 -4
  122. data/lib/anthropic/models/tool_text_editor_20250429.rb +36 -0
  123. data/lib/anthropic/models/tool_text_editor_20250728.rb +45 -0
  124. data/lib/anthropic/models/tool_union.rb +5 -1
  125. data/lib/anthropic/models/tool_use_block.rb +14 -0
  126. data/lib/anthropic/models/usage.rb +9 -1
  127. data/lib/anthropic/models.rb +16 -4
  128. data/lib/anthropic/resources/beta/messages.rb +73 -6
  129. data/lib/anthropic/resources/messages.rb +152 -7
  130. data/lib/anthropic/streaming.rb +5 -0
  131. data/lib/anthropic/version.rb +1 -1
  132. data/lib/anthropic.rb +54 -0
  133. data/rbi/anthropic/errors.rbi +18 -2
  134. data/rbi/anthropic/helpers/bedrock/client.rbi +17 -6
  135. data/rbi/anthropic/helpers/input_schema/array_of.rbi +16 -0
  136. data/rbi/anthropic/helpers/input_schema/base_model.rbi +21 -0
  137. data/rbi/anthropic/helpers/input_schema/boolean.rbi +11 -0
  138. data/rbi/anthropic/helpers/input_schema/enum_of.rbi +30 -0
  139. data/rbi/anthropic/helpers/input_schema/json_schema_converter.rbi +89 -0
  140. data/rbi/anthropic/helpers/input_schema/union_of.rbi +23 -0
  141. data/rbi/anthropic/helpers/streaming/events.rbi +95 -0
  142. data/rbi/anthropic/helpers/streaming/message_stream.rbi +73 -0
  143. data/rbi/anthropic/helpers/structured_output.rbi +16 -0
  144. data/rbi/anthropic/helpers/vertex/client.rbi +17 -6
  145. data/rbi/anthropic/input_schema.rbi +12 -0
  146. data/rbi/anthropic/internal/transport/base_client.rbi +1 -1
  147. data/rbi/anthropic/internal/type/base_stream.rbi +8 -1
  148. data/rbi/anthropic/internal/type/boolean.rbi +2 -0
  149. data/rbi/anthropic/internal/type/converter.rbi +69 -15
  150. data/rbi/anthropic/internal/type/union.rbi +14 -2
  151. data/rbi/anthropic/internal/type/unknown.rbi +2 -0
  152. data/rbi/anthropic/internal/util.rbi +2 -0
  153. data/rbi/anthropic/models/anthropic_beta.rbi +2 -0
  154. data/rbi/anthropic/models/beta/beta_base64_pdf_block.rbi +1 -128
  155. data/rbi/anthropic/models/beta/beta_bash_code_execution_output_block.rbi +33 -0
  156. data/rbi/anthropic/models/beta/beta_bash_code_execution_output_block_param.rbi +34 -0
  157. data/rbi/anthropic/models/beta/beta_bash_code_execution_result_block.rbi +72 -0
  158. data/rbi/anthropic/models/beta/beta_bash_code_execution_result_block_param.rbi +77 -0
  159. data/rbi/anthropic/models/beta/beta_bash_code_execution_tool_result_block.rbi +86 -0
  160. data/rbi/anthropic/models/beta/beta_bash_code_execution_tool_result_block_param.rbi +110 -0
  161. data/rbi/anthropic/models/beta/beta_bash_code_execution_tool_result_error.rbi +101 -0
  162. data/rbi/anthropic/models/beta/beta_bash_code_execution_tool_result_error_param.rbi +101 -0
  163. data/rbi/anthropic/models/beta/beta_citation_char_location.rbi +6 -0
  164. data/rbi/anthropic/models/beta/beta_citation_config.rbi +30 -0
  165. data/rbi/anthropic/models/beta/beta_citation_content_block_location.rbi +6 -0
  166. data/rbi/anthropic/models/beta/beta_citation_page_location.rbi +6 -0
  167. data/rbi/anthropic/models/beta/beta_citation_search_result_location.rbi +78 -0
  168. data/rbi/anthropic/models/beta/beta_citation_search_result_location_param.rbi +79 -0
  169. data/rbi/anthropic/models/beta/beta_citations_delta.rbi +4 -2
  170. data/rbi/anthropic/models/beta/beta_code_execution_tool_20250825.rbi +72 -0
  171. data/rbi/anthropic/models/beta/beta_content_block.rbi +6 -3
  172. data/rbi/anthropic/models/beta/beta_content_block_param.rbi +11 -7
  173. data/rbi/anthropic/models/beta/beta_document_block.rbi +95 -0
  174. data/rbi/anthropic/models/beta/beta_message.rbi +14 -3
  175. data/rbi/anthropic/models/beta/beta_raw_content_block_start_event.rbi +12 -6
  176. data/rbi/anthropic/models/beta/beta_request_document_block.rbi +142 -0
  177. data/rbi/anthropic/models/beta/beta_search_result_block_param.rbi +91 -0
  178. data/rbi/anthropic/models/beta/beta_server_tool_usage.rbi +17 -2
  179. data/rbi/anthropic/models/beta/beta_server_tool_use_block.rbi +15 -0
  180. data/rbi/anthropic/models/beta/beta_server_tool_use_block_param.rbi +15 -0
  181. data/rbi/anthropic/models/beta/beta_text_block.rbi +2 -1
  182. data/rbi/anthropic/models/beta/beta_text_block_param.rbi +6 -3
  183. data/rbi/anthropic/models/beta/beta_text_citation.rbi +2 -1
  184. data/rbi/anthropic/models/beta/beta_text_citation_param.rbi +2 -1
  185. data/rbi/anthropic/models/beta/beta_text_editor_code_execution_create_result_block.rbi +41 -0
  186. data/rbi/anthropic/models/beta/beta_text_editor_code_execution_create_result_block_param.rbi +41 -0
  187. data/rbi/anthropic/models/beta/beta_text_editor_code_execution_str_replace_result_block.rbi +73 -0
  188. data/rbi/anthropic/models/beta/beta_text_editor_code_execution_str_replace_result_block_param.rbi +73 -0
  189. data/rbi/anthropic/models/beta/beta_text_editor_code_execution_tool_result_block.rbi +90 -0
  190. data/rbi/anthropic/models/beta/beta_text_editor_code_execution_tool_result_block_param.rbi +118 -0
  191. data/rbi/anthropic/models/beta/beta_text_editor_code_execution_tool_result_error.rbi +110 -0
  192. data/rbi/anthropic/models/beta/beta_text_editor_code_execution_tool_result_error_param.rbi +110 -0
  193. data/rbi/anthropic/models/beta/beta_text_editor_code_execution_view_result_block.rbi +118 -0
  194. data/rbi/anthropic/models/beta/beta_text_editor_code_execution_view_result_block_param.rbi +118 -0
  195. data/rbi/anthropic/models/beta/beta_tool.rbi +14 -5
  196. data/rbi/anthropic/models/beta/beta_tool_result_block_param.rbi +3 -1
  197. data/rbi/anthropic/models/beta/beta_tool_text_editor_20250728.rbi +82 -0
  198. data/rbi/anthropic/models/beta/beta_tool_union.rbi +7 -4
  199. data/rbi/anthropic/models/beta/beta_web_fetch_block.rbi +67 -0
  200. data/rbi/anthropic/models/beta/beta_web_fetch_block_param.rbi +71 -0
  201. data/rbi/anthropic/models/beta/beta_web_fetch_tool_20250910.rbi +125 -0
  202. data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_block.rbi +81 -0
  203. data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rbi +109 -0
  204. data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_error_block.rbi +51 -0
  205. data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_error_block_param.rbi +50 -0
  206. data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_error_code.rbi +70 -0
  207. data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +51 -70
  208. data/rbi/anthropic/models/beta/message_create_params.rbi +44 -66
  209. data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +44 -66
  210. data/rbi/anthropic/models/beta_error_response.rbi +10 -2
  211. data/rbi/anthropic/models/cache_control_ephemeral.rbi +68 -3
  212. data/rbi/anthropic/models/cache_creation.rbi +45 -0
  213. data/rbi/anthropic/models/citation_char_location.rbi +6 -0
  214. data/rbi/anthropic/models/citation_content_block_location.rbi +6 -0
  215. data/rbi/anthropic/models/citation_page_location.rbi +6 -0
  216. data/rbi/anthropic/models/citation_search_result_location_param.rbi +74 -0
  217. data/rbi/anthropic/models/citations_delta.rbi +4 -2
  218. data/rbi/anthropic/models/citations_search_result_location.rbi +74 -0
  219. data/rbi/anthropic/models/content_block.rbi +3 -3
  220. data/rbi/anthropic/models/content_block_param.rbi +6 -5
  221. data/rbi/anthropic/models/document_block_param.rbi +7 -3
  222. data/rbi/anthropic/models/error_response.rbi +10 -2
  223. data/rbi/anthropic/models/message.rbi +11 -3
  224. data/rbi/anthropic/models/message_count_tokens_params.rbi +24 -50
  225. data/rbi/anthropic/models/message_count_tokens_tool.rbi +2 -0
  226. data/rbi/anthropic/models/message_create_params.rbi +24 -50
  227. data/rbi/anthropic/models/messages/batch_create_params.rbi +24 -50
  228. data/rbi/anthropic/models/model.rbi +4 -8
  229. data/rbi/anthropic/models/raw_content_block_start_event.rbi +6 -6
  230. data/rbi/anthropic/models/search_result_block_param.rbi +77 -0
  231. data/rbi/anthropic/models/text_block.rbi +2 -1
  232. data/rbi/anthropic/models/text_block_param.rbi +6 -3
  233. data/rbi/anthropic/models/text_citation.rbi +2 -1
  234. data/rbi/anthropic/models/text_citation_param.rbi +2 -1
  235. data/rbi/anthropic/models/tool.rbi +16 -5
  236. data/rbi/anthropic/models/tool_result_block_param.rbi +6 -1
  237. data/rbi/anthropic/models/tool_text_editor_20250429.rbi +62 -0
  238. data/rbi/anthropic/models/tool_text_editor_20250728.rbi +72 -0
  239. data/rbi/anthropic/models/tool_union.rbi +2 -0
  240. data/rbi/anthropic/models/usage.rbi +13 -0
  241. data/rbi/anthropic/models.rbi +14 -0
  242. data/rbi/anthropic/resources/beta/messages.rbi +45 -87
  243. data/rbi/anthropic/resources/messages.rbi +315 -69
  244. data/rbi/anthropic/streaming.rbi +5 -0
  245. data/sig/anthropic/errors.rbs +9 -0
  246. data/sig/anthropic/helpers/streaming/events.rbs +117 -0
  247. data/sig/anthropic/helpers/streaming/message_stream.rbs +57 -0
  248. data/sig/anthropic/internal/transport/base_client.rbs +1 -1
  249. data/sig/anthropic/internal/type/base_stream.rbs +4 -0
  250. data/sig/anthropic/internal/type/converter.rbs +24 -1
  251. data/sig/anthropic/internal/type/union.rbs +2 -2
  252. data/sig/anthropic/models/anthropic_beta.rbs +2 -0
  253. data/sig/anthropic/models/beta/beta_base64_pdf_block.rbs +1 -58
  254. data/sig/anthropic/models/beta/beta_bash_code_execution_output_block.rbs +23 -0
  255. data/sig/anthropic/models/beta/beta_bash_code_execution_output_block_param.rbs +23 -0
  256. data/sig/anthropic/models/beta/beta_bash_code_execution_result_block.rbs +44 -0
  257. data/sig/anthropic/models/beta/beta_bash_code_execution_result_block_param.rbs +44 -0
  258. data/sig/anthropic/models/beta/beta_bash_code_execution_tool_result_block.rbs +44 -0
  259. data/sig/anthropic/models/beta/beta_bash_code_execution_tool_result_block_param.rbs +49 -0
  260. data/sig/anthropic/models/beta/beta_bash_code_execution_tool_result_error.rbs +48 -0
  261. data/sig/anthropic/models/beta/beta_bash_code_execution_tool_result_error_param.rbs +48 -0
  262. data/sig/anthropic/models/beta/beta_citation_char_location.rbs +5 -0
  263. data/sig/anthropic/models/beta/beta_citation_config.rbs +17 -0
  264. data/sig/anthropic/models/beta/beta_citation_content_block_location.rbs +5 -0
  265. data/sig/anthropic/models/beta/beta_citation_page_location.rbs +5 -0
  266. data/sig/anthropic/models/beta/beta_citation_search_result_location.rbs +54 -0
  267. data/sig/anthropic/models/beta/beta_citation_search_result_location_param.rbs +54 -0
  268. data/sig/anthropic/models/beta/beta_citations_delta.rbs +1 -0
  269. data/sig/anthropic/models/beta/beta_code_execution_tool_20250825.rbs +34 -0
  270. data/sig/anthropic/models/beta/beta_content_block.rbs +5 -2
  271. data/sig/anthropic/models/beta/beta_content_block_param.rbs +12 -8
  272. data/sig/anthropic/models/beta/beta_document_block.rbs +49 -0
  273. data/sig/anthropic/models/beta/beta_raw_content_block_start_event.rbs +5 -2
  274. data/sig/anthropic/models/beta/beta_request_document_block.rbs +62 -0
  275. data/sig/anthropic/models/beta/beta_search_result_block_param.rbs +53 -0
  276. data/sig/anthropic/models/beta/beta_server_tool_usage.rbs +12 -3
  277. data/sig/anthropic/models/beta/beta_server_tool_use_block.rbs +9 -1
  278. data/sig/anthropic/models/beta/beta_server_tool_use_block_param.rbs +9 -1
  279. data/sig/anthropic/models/beta/beta_text_citation.rbs +1 -0
  280. data/sig/anthropic/models/beta/beta_text_citation_param.rbs +1 -0
  281. data/sig/anthropic/models/beta/beta_text_editor_code_execution_create_result_block.rbs +29 -0
  282. data/sig/anthropic/models/beta/beta_text_editor_code_execution_create_result_block_param.rbs +29 -0
  283. data/sig/anthropic/models/beta/beta_text_editor_code_execution_str_replace_result_block.rbs +49 -0
  284. data/sig/anthropic/models/beta/beta_text_editor_code_execution_str_replace_result_block_param.rbs +49 -0
  285. data/sig/anthropic/models/beta/beta_text_editor_code_execution_tool_result_block.rbs +46 -0
  286. data/sig/anthropic/models/beta/beta_text_editor_code_execution_tool_result_block_param.rbs +51 -0
  287. data/sig/anthropic/models/beta/beta_text_editor_code_execution_tool_result_error.rbs +53 -0
  288. data/sig/anthropic/models/beta/beta_text_editor_code_execution_tool_result_error_param.rbs +53 -0
  289. data/sig/anthropic/models/beta/beta_text_editor_code_execution_view_result_block.rbs +61 -0
  290. data/sig/anthropic/models/beta/beta_text_editor_code_execution_view_result_block_param.rbs +61 -0
  291. data/sig/anthropic/models/beta/beta_tool.rbs +14 -3
  292. data/sig/anthropic/models/beta/beta_tool_result_block_param.rbs +2 -0
  293. data/sig/anthropic/models/beta/beta_tool_text_editor_20250728.rbs +39 -0
  294. data/sig/anthropic/models/beta/beta_tool_union.rbs +7 -4
  295. data/sig/anthropic/models/beta/beta_web_fetch_block.rbs +39 -0
  296. data/sig/anthropic/models/beta/beta_web_fetch_block_param.rbs +39 -0
  297. data/sig/anthropic/models/beta/beta_web_fetch_tool_20250910.rbs +59 -0
  298. data/sig/anthropic/models/beta/beta_web_fetch_tool_result_block.rbs +44 -0
  299. data/sig/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rbs +49 -0
  300. data/sig/anthropic/models/beta/beta_web_fetch_tool_result_error_block.rbs +29 -0
  301. data/sig/anthropic/models/beta/beta_web_fetch_tool_result_error_block_param.rbs +29 -0
  302. data/sig/anthropic/models/beta/beta_web_fetch_tool_result_error_code.rbs +32 -0
  303. data/sig/anthropic/models/beta/message_count_tokens_params.rbs +7 -4
  304. data/sig/anthropic/models/beta_error_response.rbs +13 -2
  305. data/sig/anthropic/models/cache_control_ephemeral.rbs +27 -3
  306. data/sig/anthropic/models/cache_creation.rbs +25 -0
  307. data/sig/anthropic/models/citation_char_location.rbs +5 -0
  308. data/sig/anthropic/models/citation_content_block_location.rbs +5 -0
  309. data/sig/anthropic/models/citation_page_location.rbs +5 -0
  310. data/sig/anthropic/models/citation_search_result_location_param.rbs +50 -0
  311. data/sig/anthropic/models/citations_delta.rbs +1 -0
  312. data/sig/anthropic/models/citations_search_result_location.rbs +50 -0
  313. data/sig/anthropic/models/content_block.rbs +2 -2
  314. data/sig/anthropic/models/content_block_param.rbs +6 -5
  315. data/sig/anthropic/models/document_block_param.rbs +4 -8
  316. data/sig/anthropic/models/error_response.rbs +13 -2
  317. data/sig/anthropic/models/message_count_tokens_tool.rbs +2 -0
  318. data/sig/anthropic/models/model.rbs +4 -10
  319. data/sig/anthropic/models/raw_content_block_start_event.rbs +2 -2
  320. data/sig/anthropic/models/search_result_block_param.rbs +49 -0
  321. data/sig/anthropic/models/text_citation.rbs +1 -0
  322. data/sig/anthropic/models/text_citation_param.rbs +1 -0
  323. data/sig/anthropic/models/tool.rbs +14 -3
  324. data/sig/anthropic/models/tool_result_block_param.rbs +5 -1
  325. data/sig/anthropic/models/tool_text_editor_20250429.rbs +30 -0
  326. data/sig/anthropic/models/tool_text_editor_20250728.rbs +35 -0
  327. data/sig/anthropic/models/tool_union.rbs +2 -0
  328. data/sig/anthropic/models/usage.rbs +5 -0
  329. data/sig/anthropic/models.rbs +12 -0
  330. data/sig/anthropic/streaming.rbs +3 -0
  331. metadata +152 -3
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaBashCodeExecutionOutputBlockParam < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute file_id
8
+ #
9
+ # @return [String]
10
+ required :file_id, String
11
+
12
+ # @!attribute type
13
+ #
14
+ # @return [Symbol, :bash_code_execution_output]
15
+ required :type, const: :bash_code_execution_output
16
+
17
+ # @!method initialize(file_id:, type: :bash_code_execution_output)
18
+ # @param file_id [String]
19
+ # @param type [Symbol, :bash_code_execution_output]
20
+ end
21
+ end
22
+
23
+ BetaBashCodeExecutionOutputBlockParam = Beta::BetaBashCodeExecutionOutputBlockParam
24
+ end
25
+ end
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaBashCodeExecutionResultBlock < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute content
8
+ #
9
+ # @return [Array<Anthropic::Models::Beta::BetaBashCodeExecutionOutputBlock>]
10
+ required :content,
11
+ -> { Anthropic::Internal::Type::ArrayOf[Anthropic::Beta::BetaBashCodeExecutionOutputBlock] }
12
+
13
+ # @!attribute return_code
14
+ #
15
+ # @return [Integer]
16
+ required :return_code, Integer
17
+
18
+ # @!attribute stderr
19
+ #
20
+ # @return [String]
21
+ required :stderr, String
22
+
23
+ # @!attribute stdout
24
+ #
25
+ # @return [String]
26
+ required :stdout, String
27
+
28
+ # @!attribute type
29
+ #
30
+ # @return [Symbol, :bash_code_execution_result]
31
+ required :type, const: :bash_code_execution_result
32
+
33
+ # @!method initialize(content:, return_code:, stderr:, stdout:, type: :bash_code_execution_result)
34
+ # @param content [Array<Anthropic::Models::Beta::BetaBashCodeExecutionOutputBlock>]
35
+ # @param return_code [Integer]
36
+ # @param stderr [String]
37
+ # @param stdout [String]
38
+ # @param type [Symbol, :bash_code_execution_result]
39
+ end
40
+ end
41
+
42
+ BetaBashCodeExecutionResultBlock = Beta::BetaBashCodeExecutionResultBlock
43
+ end
44
+ end
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaBashCodeExecutionResultBlockParam < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute content
8
+ #
9
+ # @return [Array<Anthropic::Models::Beta::BetaBashCodeExecutionOutputBlockParam>]
10
+ required :content,
11
+ -> { Anthropic::Internal::Type::ArrayOf[Anthropic::Beta::BetaBashCodeExecutionOutputBlockParam] }
12
+
13
+ # @!attribute return_code
14
+ #
15
+ # @return [Integer]
16
+ required :return_code, Integer
17
+
18
+ # @!attribute stderr
19
+ #
20
+ # @return [String]
21
+ required :stderr, String
22
+
23
+ # @!attribute stdout
24
+ #
25
+ # @return [String]
26
+ required :stdout, String
27
+
28
+ # @!attribute type
29
+ #
30
+ # @return [Symbol, :bash_code_execution_result]
31
+ required :type, const: :bash_code_execution_result
32
+
33
+ # @!method initialize(content:, return_code:, stderr:, stdout:, type: :bash_code_execution_result)
34
+ # @param content [Array<Anthropic::Models::Beta::BetaBashCodeExecutionOutputBlockParam>]
35
+ # @param return_code [Integer]
36
+ # @param stderr [String]
37
+ # @param stdout [String]
38
+ # @param type [Symbol, :bash_code_execution_result]
39
+ end
40
+ end
41
+
42
+ BetaBashCodeExecutionResultBlockParam = Beta::BetaBashCodeExecutionResultBlockParam
43
+ end
44
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaBashCodeExecutionToolResultBlock < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute content
8
+ #
9
+ # @return [Anthropic::Models::Beta::BetaBashCodeExecutionToolResultError, Anthropic::Models::Beta::BetaBashCodeExecutionResultBlock]
10
+ required :content, union: -> { Anthropic::Beta::BetaBashCodeExecutionToolResultBlock::Content }
11
+
12
+ # @!attribute tool_use_id
13
+ #
14
+ # @return [String]
15
+ required :tool_use_id, String
16
+
17
+ # @!attribute type
18
+ #
19
+ # @return [Symbol, :bash_code_execution_tool_result]
20
+ required :type, const: :bash_code_execution_tool_result
21
+
22
+ # @!method initialize(content:, tool_use_id:, type: :bash_code_execution_tool_result)
23
+ # @param content [Anthropic::Models::Beta::BetaBashCodeExecutionToolResultError, Anthropic::Models::Beta::BetaBashCodeExecutionResultBlock]
24
+ # @param tool_use_id [String]
25
+ # @param type [Symbol, :bash_code_execution_tool_result]
26
+
27
+ # @see Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlock#content
28
+ module Content
29
+ extend Anthropic::Internal::Type::Union
30
+
31
+ variant -> { Anthropic::Beta::BetaBashCodeExecutionToolResultError }
32
+
33
+ variant -> { Anthropic::Beta::BetaBashCodeExecutionResultBlock }
34
+
35
+ # @!method self.variants
36
+ # @return [Array(Anthropic::Models::Beta::BetaBashCodeExecutionToolResultError, Anthropic::Models::Beta::BetaBashCodeExecutionResultBlock)]
37
+ end
38
+ end
39
+ end
40
+
41
+ BetaBashCodeExecutionToolResultBlock = Beta::BetaBashCodeExecutionToolResultBlock
42
+ end
43
+ end
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaBashCodeExecutionToolResultBlockParam < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute content
8
+ #
9
+ # @return [Anthropic::Models::Beta::BetaBashCodeExecutionToolResultErrorParam, Anthropic::Models::Beta::BetaBashCodeExecutionResultBlockParam]
10
+ required :content, union: -> { Anthropic::Beta::BetaBashCodeExecutionToolResultBlockParam::Content }
11
+
12
+ # @!attribute tool_use_id
13
+ #
14
+ # @return [String]
15
+ required :tool_use_id, String
16
+
17
+ # @!attribute type
18
+ #
19
+ # @return [Symbol, :bash_code_execution_tool_result]
20
+ required :type, const: :bash_code_execution_tool_result
21
+
22
+ # @!attribute cache_control
23
+ # Create a cache control breakpoint at this content block.
24
+ #
25
+ # @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
26
+ optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
27
+
28
+ # @!method initialize(content:, tool_use_id:, cache_control: nil, type: :bash_code_execution_tool_result)
29
+ # @param content [Anthropic::Models::Beta::BetaBashCodeExecutionToolResultErrorParam, Anthropic::Models::Beta::BetaBashCodeExecutionResultBlockParam]
30
+ #
31
+ # @param tool_use_id [String]
32
+ #
33
+ # @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
34
+ #
35
+ # @param type [Symbol, :bash_code_execution_tool_result]
36
+
37
+ # @see Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlockParam#content
38
+ module Content
39
+ extend Anthropic::Internal::Type::Union
40
+
41
+ variant -> { Anthropic::Beta::BetaBashCodeExecutionToolResultErrorParam }
42
+
43
+ variant -> { Anthropic::Beta::BetaBashCodeExecutionResultBlockParam }
44
+
45
+ # @!method self.variants
46
+ # @return [Array(Anthropic::Models::Beta::BetaBashCodeExecutionToolResultErrorParam, Anthropic::Models::Beta::BetaBashCodeExecutionResultBlockParam)]
47
+ end
48
+ end
49
+ end
50
+
51
+ BetaBashCodeExecutionToolResultBlockParam = Beta::BetaBashCodeExecutionToolResultBlockParam
52
+ end
53
+ end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaBashCodeExecutionToolResultError < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute error_code
8
+ #
9
+ # @return [Symbol, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultError::ErrorCode]
10
+ required :error_code, enum: -> { Anthropic::Beta::BetaBashCodeExecutionToolResultError::ErrorCode }
11
+
12
+ # @!attribute type
13
+ #
14
+ # @return [Symbol, :bash_code_execution_tool_result_error]
15
+ required :type, const: :bash_code_execution_tool_result_error
16
+
17
+ # @!method initialize(error_code:, type: :bash_code_execution_tool_result_error)
18
+ # @param error_code [Symbol, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultError::ErrorCode]
19
+ # @param type [Symbol, :bash_code_execution_tool_result_error]
20
+
21
+ # @see Anthropic::Models::Beta::BetaBashCodeExecutionToolResultError#error_code
22
+ module ErrorCode
23
+ extend Anthropic::Internal::Type::Enum
24
+
25
+ INVALID_TOOL_INPUT = :invalid_tool_input
26
+ UNAVAILABLE = :unavailable
27
+ TOO_MANY_REQUESTS = :too_many_requests
28
+ EXECUTION_TIME_EXCEEDED = :execution_time_exceeded
29
+ OUTPUT_FILE_TOO_LARGE = :output_file_too_large
30
+
31
+ # @!method self.values
32
+ # @return [Array<Symbol>]
33
+ end
34
+ end
35
+ end
36
+
37
+ BetaBashCodeExecutionToolResultError = Beta::BetaBashCodeExecutionToolResultError
38
+ end
39
+ end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaBashCodeExecutionToolResultErrorParam < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute error_code
8
+ #
9
+ # @return [Symbol, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultErrorParam::ErrorCode]
10
+ required :error_code, enum: -> { Anthropic::Beta::BetaBashCodeExecutionToolResultErrorParam::ErrorCode }
11
+
12
+ # @!attribute type
13
+ #
14
+ # @return [Symbol, :bash_code_execution_tool_result_error]
15
+ required :type, const: :bash_code_execution_tool_result_error
16
+
17
+ # @!method initialize(error_code:, type: :bash_code_execution_tool_result_error)
18
+ # @param error_code [Symbol, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultErrorParam::ErrorCode]
19
+ # @param type [Symbol, :bash_code_execution_tool_result_error]
20
+
21
+ # @see Anthropic::Models::Beta::BetaBashCodeExecutionToolResultErrorParam#error_code
22
+ module ErrorCode
23
+ extend Anthropic::Internal::Type::Enum
24
+
25
+ INVALID_TOOL_INPUT = :invalid_tool_input
26
+ UNAVAILABLE = :unavailable
27
+ TOO_MANY_REQUESTS = :too_many_requests
28
+ EXECUTION_TIME_EXCEEDED = :execution_time_exceeded
29
+ OUTPUT_FILE_TOO_LARGE = :output_file_too_large
30
+
31
+ # @!method self.values
32
+ # @return [Array<Symbol>]
33
+ end
34
+ end
35
+ end
36
+
37
+ BetaBashCodeExecutionToolResultErrorParam = Beta::BetaBashCodeExecutionToolResultErrorParam
38
+ end
39
+ end
@@ -24,6 +24,11 @@ module Anthropic
24
24
  # @return [Integer]
25
25
  required :end_char_index, Integer
26
26
 
27
+ # @!attribute file_id
28
+ #
29
+ # @return [String, nil]
30
+ required :file_id, String, nil?: true
31
+
27
32
  # @!attribute start_char_index
28
33
  #
29
34
  # @return [Integer]
@@ -34,11 +39,12 @@ module Anthropic
34
39
  # @return [Symbol, :char_location]
35
40
  required :type, const: :char_location
36
41
 
37
- # @!method initialize(cited_text:, document_index:, document_title:, end_char_index:, start_char_index:, type: :char_location)
42
+ # @!method initialize(cited_text:, document_index:, document_title:, end_char_index:, file_id:, start_char_index:, type: :char_location)
38
43
  # @param cited_text [String]
39
44
  # @param document_index [Integer]
40
45
  # @param document_title [String, nil]
41
46
  # @param end_char_index [Integer]
47
+ # @param file_id [String, nil]
42
48
  # @param start_char_index [Integer]
43
49
  # @param type [Symbol, :char_location]
44
50
  end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaCitationConfig < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute enabled
8
+ #
9
+ # @return [Boolean]
10
+ required :enabled, Anthropic::Internal::Type::Boolean
11
+
12
+ # @!method initialize(enabled:)
13
+ # @param enabled [Boolean]
14
+ end
15
+ end
16
+
17
+ BetaCitationConfig = Beta::BetaCitationConfig
18
+ end
19
+ end
@@ -24,6 +24,11 @@ module Anthropic
24
24
  # @return [Integer]
25
25
  required :end_block_index, Integer
26
26
 
27
+ # @!attribute file_id
28
+ #
29
+ # @return [String, nil]
30
+ required :file_id, String, nil?: true
31
+
27
32
  # @!attribute start_block_index
28
33
  #
29
34
  # @return [Integer]
@@ -34,11 +39,12 @@ module Anthropic
34
39
  # @return [Symbol, :content_block_location]
35
40
  required :type, const: :content_block_location
36
41
 
37
- # @!method initialize(cited_text:, document_index:, document_title:, end_block_index:, start_block_index:, type: :content_block_location)
42
+ # @!method initialize(cited_text:, document_index:, document_title:, end_block_index:, file_id:, start_block_index:, type: :content_block_location)
38
43
  # @param cited_text [String]
39
44
  # @param document_index [Integer]
40
45
  # @param document_title [String, nil]
41
46
  # @param end_block_index [Integer]
47
+ # @param file_id [String, nil]
42
48
  # @param start_block_index [Integer]
43
49
  # @param type [Symbol, :content_block_location]
44
50
  end
@@ -24,6 +24,11 @@ module Anthropic
24
24
  # @return [Integer]
25
25
  required :end_page_number, Integer
26
26
 
27
+ # @!attribute file_id
28
+ #
29
+ # @return [String, nil]
30
+ required :file_id, String, nil?: true
31
+
27
32
  # @!attribute start_page_number
28
33
  #
29
34
  # @return [Integer]
@@ -34,11 +39,12 @@ module Anthropic
34
39
  # @return [Symbol, :page_location]
35
40
  required :type, const: :page_location
36
41
 
37
- # @!method initialize(cited_text:, document_index:, document_title:, end_page_number:, start_page_number:, type: :page_location)
42
+ # @!method initialize(cited_text:, document_index:, document_title:, end_page_number:, file_id:, start_page_number:, type: :page_location)
38
43
  # @param cited_text [String]
39
44
  # @param document_index [Integer]
40
45
  # @param document_title [String, nil]
41
46
  # @param end_page_number [Integer]
47
+ # @param file_id [String, nil]
42
48
  # @param start_page_number [Integer]
43
49
  # @param type [Symbol, :page_location]
44
50
  end
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaCitationSearchResultLocation < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute cited_text
8
+ #
9
+ # @return [String]
10
+ required :cited_text, String
11
+
12
+ # @!attribute end_block_index
13
+ #
14
+ # @return [Integer]
15
+ required :end_block_index, Integer
16
+
17
+ # @!attribute search_result_index
18
+ #
19
+ # @return [Integer]
20
+ required :search_result_index, Integer
21
+
22
+ # @!attribute source
23
+ #
24
+ # @return [String]
25
+ required :source, String
26
+
27
+ # @!attribute start_block_index
28
+ #
29
+ # @return [Integer]
30
+ required :start_block_index, Integer
31
+
32
+ # @!attribute title
33
+ #
34
+ # @return [String, nil]
35
+ required :title, String, nil?: true
36
+
37
+ # @!attribute type
38
+ #
39
+ # @return [Symbol, :search_result_location]
40
+ required :type, const: :search_result_location
41
+
42
+ # @!method initialize(cited_text:, end_block_index:, search_result_index:, source:, start_block_index:, title:, type: :search_result_location)
43
+ # @param cited_text [String]
44
+ # @param end_block_index [Integer]
45
+ # @param search_result_index [Integer]
46
+ # @param source [String]
47
+ # @param start_block_index [Integer]
48
+ # @param title [String, nil]
49
+ # @param type [Symbol, :search_result_location]
50
+ end
51
+ end
52
+
53
+ BetaCitationSearchResultLocation = Beta::BetaCitationSearchResultLocation
54
+ end
55
+ end
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaCitationSearchResultLocationParam < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute cited_text
8
+ #
9
+ # @return [String]
10
+ required :cited_text, String
11
+
12
+ # @!attribute end_block_index
13
+ #
14
+ # @return [Integer]
15
+ required :end_block_index, Integer
16
+
17
+ # @!attribute search_result_index
18
+ #
19
+ # @return [Integer]
20
+ required :search_result_index, Integer
21
+
22
+ # @!attribute source
23
+ #
24
+ # @return [String]
25
+ required :source, String
26
+
27
+ # @!attribute start_block_index
28
+ #
29
+ # @return [Integer]
30
+ required :start_block_index, Integer
31
+
32
+ # @!attribute title
33
+ #
34
+ # @return [String, nil]
35
+ required :title, String, nil?: true
36
+
37
+ # @!attribute type
38
+ #
39
+ # @return [Symbol, :search_result_location]
40
+ required :type, const: :search_result_location
41
+
42
+ # @!method initialize(cited_text:, end_block_index:, search_result_index:, source:, start_block_index:, title:, type: :search_result_location)
43
+ # @param cited_text [String]
44
+ # @param end_block_index [Integer]
45
+ # @param search_result_index [Integer]
46
+ # @param source [String]
47
+ # @param start_block_index [Integer]
48
+ # @param title [String, nil]
49
+ # @param type [Symbol, :search_result_location]
50
+ end
51
+ end
52
+
53
+ BetaCitationSearchResultLocationParam = Beta::BetaCitationSearchResultLocationParam
54
+ end
55
+ end
@@ -6,7 +6,7 @@ module Anthropic
6
6
  class BetaCitationsDelta < Anthropic::Internal::Type::BaseModel
7
7
  # @!attribute citation
8
8
  #
9
- # @return [Anthropic::Models::Beta::BetaCitationCharLocation, Anthropic::Models::Beta::BetaCitationPageLocation, Anthropic::Models::Beta::BetaCitationContentBlockLocation, Anthropic::Models::Beta::BetaCitationsWebSearchResultLocation]
9
+ # @return [Anthropic::Models::Beta::BetaCitationCharLocation, Anthropic::Models::Beta::BetaCitationPageLocation, Anthropic::Models::Beta::BetaCitationContentBlockLocation, Anthropic::Models::Beta::BetaCitationsWebSearchResultLocation, Anthropic::Models::Beta::BetaCitationSearchResultLocation]
10
10
  required :citation, union: -> { Anthropic::Beta::BetaCitationsDelta::Citation }
11
11
 
12
12
  # @!attribute type
@@ -15,7 +15,7 @@ module Anthropic
15
15
  required :type, const: :citations_delta
16
16
 
17
17
  # @!method initialize(citation:, type: :citations_delta)
18
- # @param citation [Anthropic::Models::Beta::BetaCitationCharLocation, Anthropic::Models::Beta::BetaCitationPageLocation, Anthropic::Models::Beta::BetaCitationContentBlockLocation, Anthropic::Models::Beta::BetaCitationsWebSearchResultLocation]
18
+ # @param citation [Anthropic::Models::Beta::BetaCitationCharLocation, Anthropic::Models::Beta::BetaCitationPageLocation, Anthropic::Models::Beta::BetaCitationContentBlockLocation, Anthropic::Models::Beta::BetaCitationsWebSearchResultLocation, Anthropic::Models::Beta::BetaCitationSearchResultLocation]
19
19
  # @param type [Symbol, :citations_delta]
20
20
 
21
21
  # @see Anthropic::Models::Beta::BetaCitationsDelta#citation
@@ -32,8 +32,10 @@ module Anthropic
32
32
 
33
33
  variant :web_search_result_location, -> { Anthropic::Beta::BetaCitationsWebSearchResultLocation }
34
34
 
35
+ variant :search_result_location, -> { Anthropic::Beta::BetaCitationSearchResultLocation }
36
+
35
37
  # @!method self.variants
36
- # @return [Array(Anthropic::Models::Beta::BetaCitationCharLocation, Anthropic::Models::Beta::BetaCitationPageLocation, Anthropic::Models::Beta::BetaCitationContentBlockLocation, Anthropic::Models::Beta::BetaCitationsWebSearchResultLocation)]
38
+ # @return [Array(Anthropic::Models::Beta::BetaCitationCharLocation, Anthropic::Models::Beta::BetaCitationPageLocation, Anthropic::Models::Beta::BetaCitationContentBlockLocation, Anthropic::Models::Beta::BetaCitationsWebSearchResultLocation, Anthropic::Models::Beta::BetaCitationSearchResultLocation)]
37
39
  end
38
40
  end
39
41
  end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaCodeExecutionTool20250825 < 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_20250825]
18
+ required :type, const: :code_execution_20250825
19
+
20
+ # @!attribute cache_control
21
+ # Create a cache control breakpoint at this content block.
22
+ #
23
+ # @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
24
+ optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
25
+
26
+ # @!method initialize(cache_control: nil, name: :code_execution, type: :code_execution_20250825)
27
+ # Some parameter documentations has been truncated, see
28
+ # {Anthropic::Models::Beta::BetaCodeExecutionTool20250825} for more details.
29
+ #
30
+ # @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
31
+ #
32
+ # @param name [Symbol, :code_execution] Name of the tool.
33
+ #
34
+ # @param type [Symbol, :code_execution_20250825]
35
+ end
36
+ end
37
+
38
+ BetaCodeExecutionTool20250825 = Beta::BetaCodeExecutionTool20250825
39
+ end
40
+ end
@@ -11,14 +11,25 @@ module Anthropic
11
11
 
12
12
  variant :text, -> { Anthropic::Beta::BetaTextBlock }
13
13
 
14
+ variant :thinking, -> { Anthropic::Beta::BetaThinkingBlock }
15
+
16
+ variant :redacted_thinking, -> { Anthropic::Beta::BetaRedactedThinkingBlock }
17
+
14
18
  variant :tool_use, -> { Anthropic::Beta::BetaToolUseBlock }
15
19
 
16
20
  variant :server_tool_use, -> { Anthropic::Beta::BetaServerToolUseBlock }
17
21
 
18
22
  variant :web_search_tool_result, -> { Anthropic::Beta::BetaWebSearchToolResultBlock }
19
23
 
24
+ variant :web_fetch_tool_result, -> { Anthropic::Beta::BetaWebFetchToolResultBlock }
25
+
20
26
  variant :code_execution_tool_result, -> { Anthropic::Beta::BetaCodeExecutionToolResultBlock }
21
27
 
28
+ variant :bash_code_execution_tool_result, -> { Anthropic::Beta::BetaBashCodeExecutionToolResultBlock }
29
+
30
+ variant :text_editor_code_execution_tool_result,
31
+ -> { Anthropic::Beta::BetaTextEditorCodeExecutionToolResultBlock }
32
+
22
33
  variant :mcp_tool_use, -> { Anthropic::Beta::BetaMCPToolUseBlock }
23
34
 
24
35
  variant :mcp_tool_result, -> { Anthropic::Beta::BetaMCPToolResultBlock }
@@ -26,12 +37,8 @@ module Anthropic
26
37
  # Response model for a file uploaded to the container.
27
38
  variant :container_upload, -> { Anthropic::Beta::BetaContainerUploadBlock }
28
39
 
29
- variant :thinking, -> { Anthropic::Beta::BetaThinkingBlock }
30
-
31
- variant :redacted_thinking, -> { Anthropic::Beta::BetaRedactedThinkingBlock }
32
-
33
40
  # @!method self.variants
34
- # @return [Array(Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock)]
41
+ # @return [Array(Anthropic::Models::Beta::BetaTextBlock, Anthropic::Models::Beta::BetaThinkingBlock, Anthropic::Models::Beta::BetaRedactedThinkingBlock, Anthropic::Models::Beta::BetaToolUseBlock, Anthropic::Models::Beta::BetaServerToolUseBlock, Anthropic::Models::Beta::BetaWebSearchToolResultBlock, Anthropic::Models::Beta::BetaWebFetchToolResultBlock, Anthropic::Models::Beta::BetaCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaBashCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaTextEditorCodeExecutionToolResultBlock, Anthropic::Models::Beta::BetaMCPToolUseBlock, Anthropic::Models::Beta::BetaMCPToolResultBlock, Anthropic::Models::Beta::BetaContainerUploadBlock)]
35
42
  end
36
43
  end
37
44