anthropic-sdk-beta 0.1.0.pre.beta.6 → 0.1.0.pre.beta.7

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 (918) hide show
  1. checksums.yaml +4 -4
  2. data/.ignore +2 -0
  3. data/CHANGELOG.md +88 -0
  4. data/README.md +171 -126
  5. data/lib/anthropic/bedrock.rb +5 -0
  6. data/lib/anthropic/client.rb +7 -6
  7. data/lib/anthropic/errors.rb +10 -10
  8. data/lib/anthropic/file_part.rb +55 -0
  9. data/lib/anthropic/helpers/bedrock/client.rb +259 -0
  10. data/lib/anthropic/helpers/vertex/client.rb +218 -0
  11. data/lib/anthropic/internal/page.rb +28 -38
  12. data/lib/anthropic/internal/transport/base_client.rb +104 -19
  13. data/lib/anthropic/internal/transport/pooled_net_requester.rb +20 -4
  14. data/lib/anthropic/internal/type/array_of.rb +28 -2
  15. data/lib/anthropic/internal/type/base_model.rb +125 -31
  16. data/lib/anthropic/internal/type/base_page.rb +10 -1
  17. data/lib/anthropic/internal/type/base_stream.rb +19 -2
  18. data/lib/anthropic/internal/type/boolean.rb +16 -11
  19. data/lib/anthropic/internal/type/converter.rb +46 -1
  20. data/lib/anthropic/internal/type/enum.rb +43 -23
  21. data/lib/anthropic/internal/type/{io_like.rb → file_input.rb} +36 -15
  22. data/lib/anthropic/internal/type/hash_of.rb +28 -2
  23. data/lib/anthropic/internal/type/request_parameters.rb +7 -14
  24. data/lib/anthropic/internal/type/union.rb +32 -8
  25. data/lib/anthropic/internal/type/unknown.rb +16 -11
  26. data/lib/anthropic/internal/util.rb +180 -73
  27. data/lib/anthropic/internal.rb +11 -2
  28. data/lib/anthropic/models/anthropic_beta.rb +14 -11
  29. data/lib/anthropic/models/api_error_object.rb +3 -7
  30. data/lib/anthropic/models/authentication_error.rb +3 -7
  31. data/lib/anthropic/models/base64_image_source.rb +9 -16
  32. data/lib/anthropic/models/base64_pdf_source.rb +4 -8
  33. data/lib/anthropic/models/beta/beta_base64_image_source.rb +9 -16
  34. data/lib/anthropic/models/beta/beta_base64_pdf_block.rb +38 -30
  35. data/lib/anthropic/models/beta/beta_base64_pdf_source.rb +4 -8
  36. data/lib/anthropic/models/beta/beta_cache_control_ephemeral.rb +2 -6
  37. data/lib/anthropic/models/beta/beta_citation_char_location.rb +7 -21
  38. data/lib/anthropic/models/beta/beta_citation_char_location_param.rb +7 -21
  39. data/lib/anthropic/models/beta/beta_citation_content_block_location.rb +7 -21
  40. data/lib/anthropic/models/beta/beta_citation_content_block_location_param.rb +7 -21
  41. data/lib/anthropic/models/beta/beta_citation_page_location.rb +7 -21
  42. data/lib/anthropic/models/beta/beta_citation_page_location_param.rb +7 -21
  43. data/lib/anthropic/models/beta/beta_citation_web_search_result_location_param.rb +43 -0
  44. data/lib/anthropic/models/beta/beta_citations_config_param.rb +3 -11
  45. data/lib/anthropic/models/beta/beta_citations_delta.rb +24 -16
  46. data/lib/anthropic/models/beta/beta_citations_web_search_result_location.rb +43 -0
  47. data/lib/anthropic/models/beta/beta_content_block.rb +23 -7
  48. data/lib/anthropic/models/beta/beta_content_block_param.rb +29 -10
  49. data/lib/anthropic/models/beta/beta_content_block_source.rb +23 -15
  50. data/lib/anthropic/models/beta/beta_content_block_source_content.rb +8 -5
  51. data/lib/anthropic/models/beta/beta_image_block_param.rb +22 -18
  52. data/lib/anthropic/models/beta/beta_input_json_delta.rb +3 -7
  53. data/lib/anthropic/models/beta/beta_message.rb +27 -22
  54. data/lib/anthropic/models/beta/beta_message_delta_usage.rb +33 -5
  55. data/lib/anthropic/models/beta/beta_message_param.rb +37 -23
  56. data/lib/anthropic/models/beta/beta_message_tokens_count.rb +5 -6
  57. data/lib/anthropic/models/beta/beta_metadata.rb +5 -6
  58. data/lib/anthropic/models/beta/beta_model_info.rb +11 -9
  59. data/lib/anthropic/models/beta/beta_plain_text_source.rb +4 -8
  60. data/lib/anthropic/models/beta/beta_raw_content_block_delta.rb +19 -8
  61. data/lib/anthropic/models/beta/beta_raw_content_block_delta_event.rb +6 -10
  62. data/lib/anthropic/models/beta/beta_raw_content_block_start_event.rb +30 -19
  63. data/lib/anthropic/models/beta/beta_raw_content_block_stop_event.rb +3 -7
  64. data/lib/anthropic/models/beta/beta_raw_message_delta_event.rb +19 -22
  65. data/lib/anthropic/models/beta/beta_raw_message_start_event.rb +5 -9
  66. data/lib/anthropic/models/beta/beta_raw_message_stop_event.rb +2 -6
  67. data/lib/anthropic/models/beta/beta_raw_message_stream_event.rb +21 -9
  68. data/lib/anthropic/models/beta/beta_redacted_thinking_block.rb +3 -7
  69. data/lib/anthropic/models/beta/beta_redacted_thinking_block_param.rb +3 -7
  70. data/lib/anthropic/models/beta/beta_server_tool_usage.rb +20 -0
  71. data/lib/anthropic/models/beta/beta_server_tool_use_block.rb +37 -0
  72. data/lib/anthropic/models/beta/beta_server_tool_use_block_param.rb +48 -0
  73. data/lib/anthropic/models/beta/beta_signature_delta.rb +3 -7
  74. data/lib/anthropic/models/beta/beta_stop_reason.rb +4 -5
  75. data/lib/anthropic/models/beta/beta_text_block.rb +11 -10
  76. data/lib/anthropic/models/beta/beta_text_block_param.rb +13 -13
  77. data/lib/anthropic/models/beta/beta_text_citation.rb +18 -6
  78. data/lib/anthropic/models/beta/beta_text_citation_param.rb +18 -6
  79. data/lib/anthropic/models/beta/beta_text_delta.rb +3 -7
  80. data/lib/anthropic/models/beta/beta_thinking_block.rb +4 -8
  81. data/lib/anthropic/models/beta/beta_thinking_block_param.rb +4 -8
  82. data/lib/anthropic/models/beta/beta_thinking_config_disabled.rb +2 -6
  83. data/lib/anthropic/models/beta/beta_thinking_config_enabled.rb +7 -7
  84. data/lib/anthropic/models/beta/beta_thinking_config_param.rb +10 -5
  85. data/lib/anthropic/models/beta/beta_thinking_delta.rb +3 -7
  86. data/lib/anthropic/models/beta/beta_tool.rb +34 -41
  87. data/lib/anthropic/models/beta/beta_tool_bash_20241022.rb +13 -11
  88. data/lib/anthropic/models/beta/beta_tool_bash_20250124.rb +13 -11
  89. data/lib/anthropic/models/beta/beta_tool_choice.rb +18 -8
  90. data/lib/anthropic/models/beta/beta_tool_choice_any.rb +10 -14
  91. data/lib/anthropic/models/beta/beta_tool_choice_auto.rb +10 -14
  92. data/lib/anthropic/models/beta/beta_tool_choice_none.rb +4 -8
  93. data/lib/anthropic/models/beta/beta_tool_choice_tool.rb +12 -15
  94. data/lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb +19 -24
  95. data/lib/anthropic/models/beta/beta_tool_computer_use_20250124.rb +19 -24
  96. data/lib/anthropic/models/beta/beta_tool_result_block_param.rb +47 -35
  97. data/lib/anthropic/models/beta/beta_tool_text_editor_20241022.rb +13 -11
  98. data/lib/anthropic/models/beta/beta_tool_text_editor_20250124.rb +13 -11
  99. data/lib/anthropic/models/beta/beta_tool_union.rb +26 -10
  100. data/lib/anthropic/models/beta/beta_tool_use_block.rb +5 -9
  101. data/lib/anthropic/models/beta/beta_tool_use_block_param.rb +13 -12
  102. data/lib/anthropic/models/beta/beta_url_image_source.rb +3 -7
  103. data/lib/anthropic/models/beta/beta_url_pdf_source.rb +3 -7
  104. data/lib/anthropic/models/beta/beta_usage.rb +15 -8
  105. data/lib/anthropic/models/beta/beta_web_search_result_block.rb +43 -0
  106. data/lib/anthropic/models/beta/beta_web_search_result_block_param.rb +43 -0
  107. data/lib/anthropic/models/beta/beta_web_search_tool_20250305.rb +126 -0
  108. data/lib/anthropic/models/beta/beta_web_search_tool_request_error.rb +39 -0
  109. data/lib/anthropic/models/beta/beta_web_search_tool_result_block.rb +31 -0
  110. data/lib/anthropic/models/beta/beta_web_search_tool_result_block_content.rb +33 -0
  111. data/lib/anthropic/models/beta/beta_web_search_tool_result_block_param.rb +41 -0
  112. data/lib/anthropic/models/beta/beta_web_search_tool_result_block_param_content.rb +35 -0
  113. data/lib/anthropic/models/beta/beta_web_search_tool_result_error.rb +39 -0
  114. data/lib/anthropic/models/beta/message_count_tokens_params.rb +80 -84
  115. data/lib/anthropic/models/beta/message_create_params.rb +71 -111
  116. data/lib/anthropic/models/beta/messages/batch_cancel_params.rb +8 -16
  117. data/lib/anthropic/models/beta/messages/batch_create_params.rb +105 -140
  118. data/lib/anthropic/models/beta/messages/batch_delete_params.rb +8 -16
  119. data/lib/anthropic/models/beta/messages/batch_list_params.rb +20 -34
  120. data/lib/anthropic/models/beta/messages/batch_results_params.rb +8 -16
  121. data/lib/anthropic/models/beta/messages/batch_retrieve_params.rb +8 -16
  122. data/lib/anthropic/models/beta/messages/beta_deleted_message_batch.rb +7 -7
  123. data/lib/anthropic/models/beta/messages/beta_message_batch.rb +32 -39
  124. data/lib/anthropic/models/beta/messages/beta_message_batch_canceled_result.rb +2 -6
  125. data/lib/anthropic/models/beta/messages/beta_message_batch_errored_result.rb +5 -9
  126. data/lib/anthropic/models/beta/messages/beta_message_batch_expired_result.rb +2 -6
  127. data/lib/anthropic/models/beta/messages/beta_message_batch_individual_response.rb +13 -12
  128. data/lib/anthropic/models/beta/messages/beta_message_batch_request_counts.rb +13 -10
  129. data/lib/anthropic/models/beta/messages/beta_message_batch_result.rb +17 -7
  130. data/lib/anthropic/models/beta/messages/beta_message_batch_succeeded_result.rb +5 -9
  131. data/lib/anthropic/models/beta/model_list_params.rb +22 -25
  132. data/lib/anthropic/models/beta/model_retrieve_params.rb +10 -7
  133. data/lib/anthropic/models/beta_api_error.rb +3 -7
  134. data/lib/anthropic/models/beta_authentication_error.rb +3 -7
  135. data/lib/anthropic/models/beta_billing_error.rb +3 -7
  136. data/lib/anthropic/models/beta_error.rb +27 -12
  137. data/lib/anthropic/models/beta_error_response.rb +5 -9
  138. data/lib/anthropic/models/beta_gateway_timeout_error.rb +3 -7
  139. data/lib/anthropic/models/beta_invalid_request_error.rb +3 -7
  140. data/lib/anthropic/models/beta_not_found_error.rb +3 -7
  141. data/lib/anthropic/models/beta_overloaded_error.rb +3 -7
  142. data/lib/anthropic/models/beta_permission_error.rb +3 -7
  143. data/lib/anthropic/models/beta_rate_limit_error.rb +3 -7
  144. data/lib/anthropic/models/billing_error.rb +3 -7
  145. data/lib/anthropic/models/cache_control_ephemeral.rb +2 -6
  146. data/lib/anthropic/models/citation_char_location.rb +7 -21
  147. data/lib/anthropic/models/citation_char_location_param.rb +7 -21
  148. data/lib/anthropic/models/citation_content_block_location.rb +7 -21
  149. data/lib/anthropic/models/citation_content_block_location_param.rb +7 -21
  150. data/lib/anthropic/models/citation_page_location.rb +7 -21
  151. data/lib/anthropic/models/citation_page_location_param.rb +7 -21
  152. data/lib/anthropic/models/citation_web_search_result_location_param.rb +39 -0
  153. data/lib/anthropic/models/citations_config_param.rb +3 -11
  154. data/lib/anthropic/models/citations_delta.rb +24 -16
  155. data/lib/anthropic/models/citations_web_search_result_location.rb +39 -0
  156. data/lib/anthropic/models/completion.rb +15 -12
  157. data/lib/anthropic/models/completion_create_params.rb +38 -57
  158. data/lib/anthropic/models/content_block.rb +23 -7
  159. data/lib/anthropic/models/content_block_param.rb +29 -10
  160. data/lib/anthropic/models/content_block_source.rb +17 -15
  161. data/lib/anthropic/models/content_block_source_content.rb +8 -5
  162. data/lib/anthropic/models/document_block_param.rb +38 -30
  163. data/lib/anthropic/models/error_object.rb +27 -12
  164. data/lib/anthropic/models/error_response.rb +5 -9
  165. data/lib/anthropic/models/gateway_timeout_error.rb +3 -7
  166. data/lib/anthropic/models/image_block_param.rb +20 -18
  167. data/lib/anthropic/models/input_json_delta.rb +3 -7
  168. data/lib/anthropic/models/invalid_request_error.rb +3 -7
  169. data/lib/anthropic/models/message.rb +27 -21
  170. data/lib/anthropic/models/message_count_tokens_params.rb +45 -52
  171. data/lib/anthropic/models/message_count_tokens_tool.rb +18 -6
  172. data/lib/anthropic/models/message_create_params.rb +64 -101
  173. data/lib/anthropic/models/message_delta_usage.rb +33 -5
  174. data/lib/anthropic/models/message_param.rb +39 -24
  175. data/lib/anthropic/models/message_tokens_count.rb +5 -6
  176. data/lib/anthropic/models/messages/batch_cancel_params.rb +3 -8
  177. data/lib/anthropic/models/messages/batch_create_params.rb +92 -131
  178. data/lib/anthropic/models/messages/batch_delete_params.rb +3 -8
  179. data/lib/anthropic/models/messages/batch_list_params.rb +15 -26
  180. data/lib/anthropic/models/messages/batch_results_params.rb +3 -8
  181. data/lib/anthropic/models/messages/batch_retrieve_params.rb +3 -8
  182. data/lib/anthropic/models/messages/deleted_message_batch.rb +7 -7
  183. data/lib/anthropic/models/messages/message_batch.rb +30 -39
  184. data/lib/anthropic/models/messages/message_batch_canceled_result.rb +2 -6
  185. data/lib/anthropic/models/messages/message_batch_errored_result.rb +5 -9
  186. data/lib/anthropic/models/messages/message_batch_expired_result.rb +2 -6
  187. data/lib/anthropic/models/messages/message_batch_individual_response.rb +12 -12
  188. data/lib/anthropic/models/messages/message_batch_request_counts.rb +13 -10
  189. data/lib/anthropic/models/messages/message_batch_result.rb +17 -7
  190. data/lib/anthropic/models/messages/message_batch_succeeded_result.rb +5 -9
  191. data/lib/anthropic/models/metadata.rb +5 -6
  192. data/lib/anthropic/models/model.rb +19 -16
  193. data/lib/anthropic/models/model_info.rb +11 -9
  194. data/lib/anthropic/models/model_list_params.rb +22 -25
  195. data/lib/anthropic/models/model_retrieve_params.rb +10 -7
  196. data/lib/anthropic/models/not_found_error.rb +3 -7
  197. data/lib/anthropic/models/overloaded_error.rb +3 -7
  198. data/lib/anthropic/models/permission_error.rb +3 -7
  199. data/lib/anthropic/models/plain_text_source.rb +4 -8
  200. data/lib/anthropic/models/rate_limit_error.rb +3 -7
  201. data/lib/anthropic/models/raw_content_block_delta.rb +19 -8
  202. data/lib/anthropic/models/raw_content_block_delta_event.rb +6 -10
  203. data/lib/anthropic/models/raw_content_block_start_event.rb +30 -18
  204. data/lib/anthropic/models/raw_content_block_stop_event.rb +3 -7
  205. data/lib/anthropic/models/raw_message_delta_event.rb +19 -22
  206. data/lib/anthropic/models/raw_message_start_event.rb +5 -9
  207. data/lib/anthropic/models/raw_message_stop_event.rb +2 -6
  208. data/lib/anthropic/models/raw_message_stream_event.rb +21 -9
  209. data/lib/anthropic/models/redacted_thinking_block.rb +3 -7
  210. data/lib/anthropic/models/redacted_thinking_block_param.rb +3 -7
  211. data/lib/anthropic/models/server_tool_usage.rb +16 -0
  212. data/lib/anthropic/models/server_tool_use_block.rb +33 -0
  213. data/lib/anthropic/models/server_tool_use_block_param.rb +44 -0
  214. data/lib/anthropic/models/signature_delta.rb +3 -7
  215. data/lib/anthropic/models/stop_reason.rb +4 -5
  216. data/lib/anthropic/models/text_block.rb +13 -10
  217. data/lib/anthropic/models/text_block_param.rb +13 -13
  218. data/lib/anthropic/models/text_citation.rb +18 -6
  219. data/lib/anthropic/models/text_citation_param.rb +18 -6
  220. data/lib/anthropic/models/text_delta.rb +3 -7
  221. data/lib/anthropic/models/thinking_block.rb +4 -8
  222. data/lib/anthropic/models/thinking_block_param.rb +4 -8
  223. data/lib/anthropic/models/thinking_config_disabled.rb +2 -6
  224. data/lib/anthropic/models/thinking_config_enabled.rb +7 -7
  225. data/lib/anthropic/models/thinking_config_param.rb +8 -5
  226. data/lib/anthropic/models/thinking_delta.rb +3 -7
  227. data/lib/anthropic/models/tool.rb +42 -30
  228. data/lib/anthropic/models/tool_bash_20250124.rb +13 -11
  229. data/lib/anthropic/models/tool_choice.rb +17 -7
  230. data/lib/anthropic/models/tool_choice_any.rb +10 -14
  231. data/lib/anthropic/models/tool_choice_auto.rb +10 -14
  232. data/lib/anthropic/models/tool_choice_none.rb +4 -8
  233. data/lib/anthropic/models/tool_choice_tool.rb +12 -15
  234. data/lib/anthropic/models/tool_result_block_param.rb +37 -35
  235. data/lib/anthropic/models/tool_text_editor_20250124.rb +13 -11
  236. data/lib/anthropic/models/tool_union.rb +18 -6
  237. data/lib/anthropic/models/tool_use_block.rb +5 -9
  238. data/lib/anthropic/models/tool_use_block_param.rb +13 -12
  239. data/lib/anthropic/models/url_image_source.rb +3 -7
  240. data/lib/anthropic/models/url_pdf_source.rb +3 -7
  241. data/lib/anthropic/models/usage.rb +15 -8
  242. data/lib/anthropic/models/web_search_result_block.rb +39 -0
  243. data/lib/anthropic/models/web_search_result_block_param.rb +39 -0
  244. data/lib/anthropic/models/web_search_tool_20250305.rb +122 -0
  245. data/lib/anthropic/models/web_search_tool_request_error.rb +35 -0
  246. data/lib/anthropic/models/web_search_tool_result_block.rb +27 -0
  247. data/lib/anthropic/models/web_search_tool_result_block_content.rb +23 -0
  248. data/lib/anthropic/models/web_search_tool_result_block_param.rb +37 -0
  249. data/lib/anthropic/models/web_search_tool_result_block_param_content.rb +26 -0
  250. data/lib/anthropic/models/web_search_tool_result_error.rb +35 -0
  251. data/lib/anthropic/models.rb +250 -0
  252. data/lib/anthropic/request_options.rb +8 -6
  253. data/lib/anthropic/resources/beta/messages/batches.rb +58 -38
  254. data/lib/anthropic/resources/beta/messages.rb +86 -44
  255. data/lib/anthropic/resources/beta/models.rb +28 -13
  256. data/lib/anthropic/resources/completions.rb +61 -29
  257. data/lib/anthropic/resources/messages/batches.rb +36 -22
  258. data/lib/anthropic/resources/messages.rb +80 -41
  259. data/lib/anthropic/resources/models.rb +28 -13
  260. data/lib/anthropic/version.rb +1 -1
  261. data/lib/anthropic/vertex.rb +5 -0
  262. data/lib/anthropic.rb +37 -12
  263. data/rbi/anthropic/bedrock.rbi +5 -0
  264. data/rbi/{lib/anthropic → anthropic}/client.rbi +16 -12
  265. data/rbi/{lib/anthropic → anthropic}/errors.rbi +34 -15
  266. data/rbi/anthropic/file_part.rbi +37 -0
  267. data/rbi/anthropic/helpers/bedrock/client.rbi +82 -0
  268. data/rbi/anthropic/helpers/vertex/client.rbi +58 -0
  269. data/rbi/{lib/anthropic → anthropic}/internal/jsonl_stream.rbi +3 -2
  270. data/rbi/{lib/anthropic → anthropic}/internal/page.rbi +3 -1
  271. data/rbi/{lib/anthropic → anthropic}/internal/stream.rbi +6 -2
  272. data/rbi/anthropic/internal/transport/base_client.rbi +310 -0
  273. data/rbi/{lib/anthropic → anthropic}/internal/transport/pooled_net_requester.rbi +32 -13
  274. data/rbi/anthropic/internal/type/array_of.rbi +98 -0
  275. data/rbi/anthropic/internal/type/base_model.rbi +299 -0
  276. data/rbi/{lib/anthropic → anthropic}/internal/type/base_page.rbi +14 -8
  277. data/rbi/{lib/anthropic → anthropic}/internal/type/base_stream.rbi +27 -10
  278. data/rbi/anthropic/internal/type/boolean.rbi +50 -0
  279. data/rbi/{lib/anthropic → anthropic}/internal/type/converter.rbi +76 -26
  280. data/rbi/{lib/anthropic → anthropic}/internal/type/enum.rbi +33 -19
  281. data/rbi/{lib/anthropic/internal/type/io_like.rbi → anthropic/internal/type/file_input.rbi} +18 -11
  282. data/rbi/anthropic/internal/type/hash_of.rbi +98 -0
  283. data/rbi/anthropic/internal/type/request_parameters.rbi +29 -0
  284. data/rbi/anthropic/internal/type/union.rbi +111 -0
  285. data/rbi/anthropic/internal/type/unknown.rbi +50 -0
  286. data/rbi/anthropic/internal/util.rbi +451 -0
  287. data/rbi/{lib/anthropic → anthropic}/internal.rbi +3 -2
  288. data/rbi/anthropic/models/anthropic_beta.rbi +54 -0
  289. data/rbi/{lib/anthropic → anthropic}/models/api_error_object.rbi +10 -3
  290. data/rbi/{lib/anthropic → anthropic}/models/authentication_error.rbi +10 -3
  291. data/rbi/anthropic/models/base64_image_source.rbi +82 -0
  292. data/rbi/anthropic/models/base64_pdf_source.rbi +35 -0
  293. data/rbi/anthropic/models/beta/beta_base64_image_source.rbi +95 -0
  294. data/rbi/anthropic/models/beta/beta_base64_pdf_block.rbi +134 -0
  295. data/rbi/anthropic/models/beta/beta_base64_pdf_source.rbi +42 -0
  296. data/rbi/{lib/anthropic → anthropic}/models/beta/beta_cache_control_ephemeral.rbi +15 -5
  297. data/rbi/{lib/anthropic → anthropic}/models/beta/beta_citation_char_location.rbi +23 -16
  298. data/rbi/{lib/anthropic → anthropic}/models/beta/beta_citation_char_location_param.rbi +23 -16
  299. data/rbi/{lib/anthropic → anthropic}/models/beta/beta_citation_content_block_location.rbi +26 -17
  300. data/rbi/{lib/anthropic → anthropic}/models/beta/beta_citation_content_block_location_param.rbi +27 -17
  301. data/rbi/{lib/anthropic → anthropic}/models/beta/beta_citation_page_location.rbi +23 -16
  302. data/rbi/{lib/anthropic → anthropic}/models/beta/beta_citation_page_location_param.rbi +23 -16
  303. data/rbi/anthropic/models/beta/beta_citation_web_search_result_location_param.rbi +67 -0
  304. data/rbi/{lib/anthropic → anthropic}/models/beta/beta_citations_config_param.rbi +15 -5
  305. data/rbi/anthropic/models/beta/beta_citations_delta.rbi +88 -0
  306. data/rbi/anthropic/models/beta/beta_citations_web_search_result_location.rbi +67 -0
  307. data/rbi/anthropic/models/beta/beta_content_block.rbi +33 -0
  308. data/rbi/anthropic/models/beta/beta_content_block_param.rbi +36 -0
  309. data/rbi/anthropic/models/beta/beta_content_block_source.rbi +110 -0
  310. data/rbi/anthropic/models/beta/beta_content_block_source_content.rbi +29 -0
  311. data/rbi/anthropic/models/beta/beta_image_block_param.rbi +101 -0
  312. data/rbi/anthropic/models/beta/beta_input_json_delta.rbi +35 -0
  313. data/rbi/anthropic/models/beta/beta_message.rbi +268 -0
  314. data/rbi/anthropic/models/beta/beta_message_delta_usage.rbi +85 -0
  315. data/rbi/anthropic/models/beta/beta_message_param.rbi +162 -0
  316. data/rbi/{lib/anthropic → anthropic}/models/beta/beta_message_tokens_count.rbi +19 -5
  317. data/rbi/{lib/anthropic → anthropic}/models/beta/beta_metadata.rbi +19 -5
  318. data/rbi/anthropic/models/beta/beta_model_info.rbi +66 -0
  319. data/rbi/anthropic/models/beta/beta_plain_text_source.rbi +42 -0
  320. data/rbi/anthropic/models/beta/beta_raw_content_block_delta.rbi +32 -0
  321. data/rbi/anthropic/models/beta/beta_raw_content_block_delta_event.rbi +74 -0
  322. data/rbi/anthropic/models/beta/beta_raw_content_block_start_event.rbi +103 -0
  323. data/rbi/{lib/anthropic → anthropic}/models/beta/beta_raw_content_block_stop_event.rbi +15 -5
  324. data/rbi/anthropic/models/beta/beta_raw_message_delta_event.rbi +135 -0
  325. data/rbi/anthropic/models/beta/beta_raw_message_start_event.rbi +45 -0
  326. data/rbi/{lib/anthropic → anthropic}/models/beta/beta_raw_message_stop_event.rbi +15 -5
  327. data/rbi/anthropic/models/beta/beta_raw_message_stream_event.rbi +33 -0
  328. data/rbi/{lib/anthropic → anthropic}/models/beta/beta_redacted_thinking_block.rbi +15 -5
  329. data/rbi/{lib/anthropic → anthropic}/models/beta/beta_redacted_thinking_block_param.rbi +15 -5
  330. data/rbi/anthropic/models/beta/beta_server_tool_usage.rbi +34 -0
  331. data/rbi/anthropic/models/beta/beta_server_tool_use_block.rbi +50 -0
  332. data/rbi/anthropic/models/beta/beta_server_tool_use_block_param.rbi +78 -0
  333. data/rbi/anthropic/models/beta/beta_signature_delta.rbi +35 -0
  334. data/rbi/anthropic/models/beta/beta_stop_reason.rbi +37 -0
  335. data/rbi/anthropic/models/beta/beta_text_block.rbi +94 -0
  336. data/rbi/anthropic/models/beta/beta_text_block_param.rbi +105 -0
  337. data/rbi/anthropic/models/beta/beta_text_citation.rbi +31 -0
  338. data/rbi/anthropic/models/beta/beta_text_citation_param.rbi +31 -0
  339. data/rbi/{lib/anthropic → anthropic}/models/beta/beta_text_delta.rbi +12 -5
  340. data/rbi/anthropic/models/beta/beta_thinking_block.rbi +44 -0
  341. data/rbi/anthropic/models/beta/beta_thinking_block_param.rbi +44 -0
  342. data/rbi/{lib/anthropic → anthropic}/models/beta/beta_thinking_config_disabled.rbi +15 -5
  343. data/rbi/anthropic/models/beta/beta_thinking_config_enabled.rbi +56 -0
  344. data/rbi/{lib/anthropic → anthropic}/models/beta/beta_thinking_config_param.rbi +15 -7
  345. data/rbi/{lib/anthropic → anthropic}/models/beta/beta_thinking_delta.rbi +15 -5
  346. data/rbi/anthropic/models/beta/beta_tool.rbi +165 -0
  347. data/rbi/anthropic/models/beta/beta_tool_bash_20241022.rbi +72 -0
  348. data/rbi/anthropic/models/beta/beta_tool_bash_20250124.rbi +72 -0
  349. data/rbi/{lib/anthropic → anthropic}/models/beta/beta_tool_choice.rbi +15 -7
  350. data/rbi/anthropic/models/beta/beta_tool_choice_any.rbi +56 -0
  351. data/rbi/anthropic/models/beta/beta_tool_choice_auto.rbi +56 -0
  352. data/rbi/{lib/anthropic → anthropic}/models/beta/beta_tool_choice_none.rbi +15 -5
  353. data/rbi/anthropic/models/beta/beta_tool_choice_tool.rbi +68 -0
  354. data/rbi/{lib/anthropic → anthropic}/models/beta/beta_tool_computer_use_20241022.rbi +42 -23
  355. data/rbi/{lib/anthropic → anthropic}/models/beta/beta_tool_computer_use_20250124.rbi +42 -23
  356. data/rbi/anthropic/models/beta/beta_tool_result_block_param.rbi +187 -0
  357. data/rbi/anthropic/models/beta/beta_tool_text_editor_20241022.rbi +72 -0
  358. data/rbi/anthropic/models/beta/beta_tool_text_editor_20250124.rbi +72 -0
  359. data/rbi/anthropic/models/beta/beta_tool_union.rbi +33 -0
  360. data/rbi/anthropic/models/beta/beta_tool_use_block.rbi +50 -0
  361. data/rbi/anthropic/models/beta/beta_tool_use_block_param.rbi +78 -0
  362. data/rbi/{lib/anthropic → anthropic}/models/beta/beta_url_image_source.rbi +15 -5
  363. data/rbi/{lib/anthropic → anthropic}/models/beta/beta_url_pdf_source.rbi +15 -5
  364. data/rbi/anthropic/models/beta/beta_usage.rbi +82 -0
  365. data/rbi/anthropic/models/beta/beta_web_search_result_block.rbi +66 -0
  366. data/rbi/anthropic/models/beta/beta_web_search_result_block_param.rbi +66 -0
  367. data/rbi/anthropic/models/beta/beta_web_search_tool_20250305.rbi +201 -0
  368. data/rbi/anthropic/models/beta/beta_web_search_tool_request_error.rbi +100 -0
  369. data/rbi/anthropic/models/beta/beta_web_search_tool_result_block.rbi +65 -0
  370. data/rbi/anthropic/models/beta/beta_web_search_tool_result_block_content.rbi +40 -0
  371. data/rbi/anthropic/models/beta/beta_web_search_tool_result_block_param.rbi +89 -0
  372. data/rbi/anthropic/models/beta/beta_web_search_tool_result_block_param_content.rbi +40 -0
  373. data/rbi/anthropic/models/beta/beta_web_search_tool_result_error.rbi +100 -0
  374. data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +656 -0
  375. data/rbi/anthropic/models/beta/message_create_params.rbi +759 -0
  376. data/rbi/anthropic/models/beta/messages/batch_cancel_params.rbi +65 -0
  377. data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +906 -0
  378. data/rbi/anthropic/models/beta/messages/batch_delete_params.rbi +65 -0
  379. data/rbi/anthropic/models/beta/messages/batch_list_params.rbi +106 -0
  380. data/rbi/anthropic/models/beta/messages/batch_results_params.rbi +65 -0
  381. data/rbi/anthropic/models/beta/messages/batch_retrieve_params.rbi +65 -0
  382. data/rbi/anthropic/models/beta/messages/beta_deleted_message_batch.rbi +44 -0
  383. data/rbi/anthropic/models/beta/messages/beta_message_batch.rbi +214 -0
  384. data/rbi/anthropic/models/beta/messages/beta_message_batch_canceled_result.rbi +30 -0
  385. data/rbi/anthropic/models/beta/messages/beta_message_batch_errored_result.rbi +45 -0
  386. data/rbi/anthropic/models/beta/messages/beta_message_batch_expired_result.rbi +30 -0
  387. data/rbi/anthropic/models/beta/messages/beta_message_batch_individual_response.rbi +89 -0
  388. data/rbi/{lib/anthropic → anthropic}/models/beta/messages/beta_message_batch_request_counts.rbi +41 -12
  389. data/rbi/anthropic/models/beta/messages/beta_message_batch_result.rbi +38 -0
  390. data/rbi/anthropic/models/beta/messages/beta_message_batch_succeeded_result.rbi +45 -0
  391. data/rbi/anthropic/models/beta/model_list_params.rbi +103 -0
  392. data/rbi/anthropic/models/beta/model_retrieve_params.rbi +62 -0
  393. data/rbi/{lib/anthropic → anthropic}/models/beta_api_error.rbi +10 -3
  394. data/rbi/{lib/anthropic → anthropic}/models/beta_authentication_error.rbi +13 -3
  395. data/rbi/{lib/anthropic → anthropic}/models/beta_billing_error.rbi +10 -3
  396. data/rbi/anthropic/models/beta_error.rbi +28 -0
  397. data/rbi/anthropic/models/beta_error_response.rbi +74 -0
  398. data/rbi/{lib/anthropic → anthropic}/models/beta_gateway_timeout_error.rbi +13 -3
  399. data/rbi/{lib/anthropic → anthropic}/models/beta_invalid_request_error.rbi +13 -3
  400. data/rbi/{lib/anthropic → anthropic}/models/beta_not_found_error.rbi +10 -3
  401. data/rbi/{lib/anthropic → anthropic}/models/beta_overloaded_error.rbi +10 -3
  402. data/rbi/{lib/anthropic → anthropic}/models/beta_permission_error.rbi +10 -3
  403. data/rbi/{lib/anthropic → anthropic}/models/beta_rate_limit_error.rbi +10 -3
  404. data/rbi/{lib/anthropic → anthropic}/models/billing_error.rbi +10 -3
  405. data/rbi/{lib/anthropic → anthropic}/models/cache_control_ephemeral.rbi +10 -3
  406. data/rbi/{lib/anthropic → anthropic}/models/citation_char_location.rbi +18 -14
  407. data/rbi/{lib/anthropic → anthropic}/models/citation_char_location_param.rbi +21 -14
  408. data/rbi/{lib/anthropic → anthropic}/models/citation_content_block_location.rbi +24 -15
  409. data/rbi/{lib/anthropic → anthropic}/models/citation_content_block_location_param.rbi +24 -15
  410. data/rbi/{lib/anthropic → anthropic}/models/citation_page_location.rbi +18 -14
  411. data/rbi/{lib/anthropic → anthropic}/models/citation_page_location_param.rbi +21 -14
  412. data/rbi/anthropic/models/citation_web_search_result_location_param.rbi +62 -0
  413. data/rbi/{lib/anthropic → anthropic}/models/citations_config_param.rbi +10 -3
  414. data/rbi/anthropic/models/citations_delta.rbi +81 -0
  415. data/rbi/anthropic/models/citations_web_search_result_location.rbi +62 -0
  416. data/rbi/anthropic/models/completion.rbi +93 -0
  417. data/rbi/anthropic/models/completion_create_params.rbi +217 -0
  418. data/rbi/anthropic/models/content_block.rbi +25 -0
  419. data/rbi/anthropic/models/content_block_param.rbi +28 -0
  420. data/rbi/anthropic/models/content_block_source.rbi +92 -0
  421. data/rbi/anthropic/models/content_block_source_content.rbi +22 -0
  422. data/rbi/anthropic/models/document_block_param.rbi +120 -0
  423. data/rbi/anthropic/models/error_object.rbi +28 -0
  424. data/rbi/anthropic/models/error_response.rbi +74 -0
  425. data/rbi/{lib/anthropic → anthropic}/models/gateway_timeout_error.rbi +10 -3
  426. data/rbi/anthropic/models/image_block_param.rbi +80 -0
  427. data/rbi/anthropic/models/input_json_delta.rbi +28 -0
  428. data/rbi/{lib/anthropic → anthropic}/models/invalid_request_error.rbi +10 -3
  429. data/rbi/anthropic/models/message.rbi +259 -0
  430. data/rbi/anthropic/models/message_count_tokens_params.rbi +569 -0
  431. data/rbi/anthropic/models/message_count_tokens_tool.rbi +25 -0
  432. data/rbi/anthropic/models/message_create_params.rbi +699 -0
  433. data/rbi/anthropic/models/message_delta_usage.rbi +76 -0
  434. data/rbi/anthropic/models/message_param.rbi +147 -0
  435. data/rbi/anthropic/models/message_tokens_count.rbi +29 -0
  436. data/rbi/anthropic/models/messages/batch_cancel_params.rbi +32 -0
  437. data/rbi/anthropic/models/messages/batch_create_params.rbi +840 -0
  438. data/rbi/anthropic/models/messages/batch_delete_params.rbi +32 -0
  439. data/rbi/{lib/anthropic → anthropic}/models/messages/batch_list_params.rbi +34 -12
  440. data/rbi/anthropic/models/messages/batch_results_params.rbi +32 -0
  441. data/rbi/anthropic/models/messages/batch_retrieve_params.rbi +32 -0
  442. data/rbi/anthropic/models/messages/deleted_message_batch.rbi +42 -0
  443. data/rbi/anthropic/models/messages/message_batch.rbi +208 -0
  444. data/rbi/{lib/anthropic → anthropic}/models/messages/message_batch_canceled_result.rbi +15 -5
  445. data/rbi/anthropic/models/messages/message_batch_errored_result.rbi +42 -0
  446. data/rbi/{lib/anthropic → anthropic}/models/messages/message_batch_expired_result.rbi +15 -5
  447. data/rbi/anthropic/models/messages/message_batch_individual_response.rbi +89 -0
  448. data/rbi/{lib/anthropic → anthropic}/models/messages/message_batch_request_counts.rbi +43 -14
  449. data/rbi/{lib/anthropic → anthropic}/models/messages/message_batch_result.rbi +17 -7
  450. data/rbi/anthropic/models/messages/message_batch_succeeded_result.rbi +40 -0
  451. data/rbi/anthropic/models/metadata.rbi +35 -0
  452. data/rbi/anthropic/models/model.rbi +68 -0
  453. data/rbi/anthropic/models/model_info.rbi +62 -0
  454. data/rbi/anthropic/models/model_list_params.rbi +95 -0
  455. data/rbi/anthropic/models/model_retrieve_params.rbi +54 -0
  456. data/rbi/{lib/anthropic → anthropic}/models/not_found_error.rbi +10 -3
  457. data/rbi/{lib/anthropic → anthropic}/models/overloaded_error.rbi +10 -3
  458. data/rbi/{lib/anthropic → anthropic}/models/permission_error.rbi +10 -3
  459. data/rbi/anthropic/models/plain_text_source.rbi +35 -0
  460. data/rbi/{lib/anthropic → anthropic}/models/rate_limit_error.rbi +10 -3
  461. data/rbi/anthropic/models/raw_content_block_delta.rbi +26 -0
  462. data/rbi/anthropic/models/raw_content_block_delta_event.rbi +70 -0
  463. data/rbi/anthropic/models/raw_content_block_start_event.rbi +99 -0
  464. data/rbi/{lib/anthropic → anthropic}/models/raw_content_block_stop_event.rbi +13 -3
  465. data/rbi/anthropic/models/raw_message_delta_event.rbi +119 -0
  466. data/rbi/anthropic/models/raw_message_start_event.rbi +33 -0
  467. data/rbi/anthropic/models/raw_message_stop_event.rbi +23 -0
  468. data/rbi/anthropic/models/raw_message_stream_event.rbi +27 -0
  469. data/rbi/{lib/anthropic → anthropic}/models/redacted_thinking_block.rbi +10 -3
  470. data/rbi/{lib/anthropic → anthropic}/models/redacted_thinking_block_param.rbi +13 -3
  471. data/rbi/anthropic/models/server_tool_usage.rbi +27 -0
  472. data/rbi/anthropic/models/server_tool_use_block.rbi +43 -0
  473. data/rbi/anthropic/models/server_tool_use_block_param.rbi +71 -0
  474. data/rbi/{lib/anthropic → anthropic}/models/signature_delta.rbi +10 -3
  475. data/rbi/anthropic/models/stop_reason.rbi +23 -0
  476. data/rbi/anthropic/models/text_block.rbi +90 -0
  477. data/rbi/anthropic/models/text_block_param.rbi +95 -0
  478. data/rbi/anthropic/models/text_citation.rbi +23 -0
  479. data/rbi/anthropic/models/text_citation_param.rbi +23 -0
  480. data/rbi/{lib/anthropic → anthropic}/models/text_delta.rbi +10 -3
  481. data/rbi/anthropic/models/thinking_block.rbi +35 -0
  482. data/rbi/anthropic/models/thinking_block_param.rbi +35 -0
  483. data/rbi/{lib/anthropic → anthropic}/models/thinking_config_disabled.rbi +10 -3
  484. data/rbi/anthropic/models/thinking_config_enabled.rbi +49 -0
  485. data/rbi/{lib/anthropic → anthropic}/models/thinking_config_param.rbi +13 -2
  486. data/rbi/{lib/anthropic → anthropic}/models/thinking_delta.rbi +10 -3
  487. data/rbi/anthropic/models/tool.rbi +142 -0
  488. data/rbi/anthropic/models/tool_bash_20250124.rbi +62 -0
  489. data/rbi/anthropic/models/tool_choice.rbi +25 -0
  490. data/rbi/anthropic/models/tool_choice_any.rbi +49 -0
  491. data/rbi/anthropic/models/tool_choice_auto.rbi +49 -0
  492. data/rbi/{lib/anthropic → anthropic}/models/tool_choice_none.rbi +10 -3
  493. data/rbi/anthropic/models/tool_choice_tool.rbi +57 -0
  494. data/rbi/anthropic/models/tool_result_block_param.rbi +162 -0
  495. data/rbi/anthropic/models/tool_text_editor_20250124.rbi +62 -0
  496. data/rbi/anthropic/models/tool_union.rbi +23 -0
  497. data/rbi/anthropic/models/tool_use_block.rbi +43 -0
  498. data/rbi/anthropic/models/tool_use_block_param.rbi +68 -0
  499. data/rbi/{lib/anthropic → anthropic}/models/url_image_source.rbi +10 -3
  500. data/rbi/{lib/anthropic → anthropic}/models/url_pdf_source.rbi +10 -3
  501. data/rbi/anthropic/models/usage.rbi +74 -0
  502. data/rbi/anthropic/models/web_search_result_block.rbi +59 -0
  503. data/rbi/anthropic/models/web_search_result_block_param.rbi +62 -0
  504. data/rbi/anthropic/models/web_search_tool_20250305.rbi +181 -0
  505. data/rbi/anthropic/models/web_search_tool_request_error.rbi +88 -0
  506. data/rbi/anthropic/models/web_search_tool_result_block.rbi +61 -0
  507. data/rbi/anthropic/models/web_search_tool_result_block_content.rbi +31 -0
  508. data/rbi/anthropic/models/web_search_tool_result_block_param.rbi +80 -0
  509. data/rbi/anthropic/models/web_search_tool_result_block_param_content.rbi +33 -0
  510. data/rbi/anthropic/models/web_search_tool_result_error.rbi +90 -0
  511. data/rbi/anthropic/models.rbi +229 -0
  512. data/rbi/{lib/anthropic → anthropic}/request_options.rbi +18 -5
  513. data/rbi/{lib/anthropic → anthropic}/resources/beta/messages/batches.rbi +54 -32
  514. data/rbi/{lib/anthropic → anthropic}/resources/beta/messages.rbi +131 -106
  515. data/rbi/{lib/anthropic → anthropic}/resources/beta/models.rbi +23 -14
  516. data/rbi/{lib/anthropic → anthropic}/resources/beta.rbi +2 -1
  517. data/rbi/{lib/anthropic → anthropic}/resources/completions.rbi +38 -29
  518. data/rbi/{lib/anthropic → anthropic}/resources/messages/batches.rbi +38 -24
  519. data/rbi/{lib/anthropic → anthropic}/resources/messages.rbi +104 -91
  520. data/rbi/anthropic/resources/models.rbi +62 -0
  521. data/rbi/anthropic/vertex.rbi +5 -0
  522. data/sig/anthropic/bedrock.rbs +3 -0
  523. data/sig/anthropic/file_part.rbs +21 -0
  524. data/sig/anthropic/helpers/bedrock/client.rbs +43 -0
  525. data/sig/anthropic/helpers/vertex/client.rbs +36 -0
  526. data/sig/anthropic/internal/transport/base_client.rbs +25 -4
  527. data/sig/anthropic/internal/transport/pooled_net_requester.rbs +4 -0
  528. data/sig/anthropic/internal/type/array_of.rbs +4 -0
  529. data/sig/anthropic/internal/type/base_model.rbs +19 -1
  530. data/sig/anthropic/internal/type/base_page.rbs +1 -1
  531. data/sig/anthropic/internal/type/base_stream.rbs +2 -0
  532. data/sig/anthropic/internal/type/converter.rbs +6 -0
  533. data/sig/anthropic/internal/type/enum.rbs +5 -2
  534. data/sig/anthropic/internal/type/{io_like.rbs → file_input.rbs} +1 -1
  535. data/sig/anthropic/internal/type/hash_of.rbs +4 -0
  536. data/sig/anthropic/internal/type/request_parameters.rbs +5 -1
  537. data/sig/anthropic/internal/type/union.rbs +5 -0
  538. data/sig/anthropic/internal/util.rbs +31 -12
  539. data/sig/anthropic/internal.rbs +3 -1
  540. data/sig/anthropic/models/anthropic_beta.rbs +1 -8
  541. data/sig/anthropic/models/api_error_object.rbs +0 -2
  542. data/sig/anthropic/models/authentication_error.rbs +0 -2
  543. data/sig/anthropic/models/base64_image_source.rbs +4 -6
  544. data/sig/anthropic/models/base64_pdf_source.rbs +0 -2
  545. data/sig/anthropic/models/beta/beta_base64_image_source.rbs +4 -6
  546. data/sig/anthropic/models/beta/beta_base64_pdf_block.rbs +16 -18
  547. data/sig/anthropic/models/beta/beta_base64_pdf_source.rbs +0 -2
  548. data/sig/anthropic/models/beta/beta_cache_control_ephemeral.rbs +0 -2
  549. data/sig/anthropic/models/beta/beta_citation_char_location.rbs +0 -2
  550. data/sig/anthropic/models/beta/beta_citation_char_location_param.rbs +0 -2
  551. data/sig/anthropic/models/beta/beta_citation_content_block_location.rbs +0 -2
  552. data/sig/anthropic/models/beta/beta_citation_content_block_location_param.rbs +0 -2
  553. data/sig/anthropic/models/beta/beta_citation_page_location.rbs +0 -2
  554. data/sig/anthropic/models/beta/beta_citation_page_location_param.rbs +0 -2
  555. data/sig/anthropic/models/beta/beta_citation_web_search_result_location_param.rbs +36 -0
  556. data/sig/anthropic/models/beta/beta_citations_config_param.rbs +0 -2
  557. data/sig/anthropic/models/beta/beta_citations_delta.rbs +8 -9
  558. data/sig/anthropic/models/beta/beta_citations_web_search_result_location.rbs +36 -0
  559. data/sig/anthropic/models/beta/beta_content_block.rbs +7 -5
  560. data/sig/anthropic/models/beta/beta_content_block_param.rbs +10 -8
  561. data/sig/anthropic/models/beta/beta_content_block_source.rbs +5 -10
  562. data/sig/anthropic/models/beta/beta_content_block_source_content.rbs +3 -3
  563. data/sig/anthropic/models/beta/beta_image_block_param.rbs +9 -11
  564. data/sig/anthropic/models/beta/beta_input_json_delta.rbs +0 -2
  565. data/sig/anthropic/models/beta/beta_message.rbs +3 -5
  566. data/sig/anthropic/models/beta/beta_message_delta_usage.rbs +22 -3
  567. data/sig/anthropic/models/beta/beta_message_param.rbs +9 -14
  568. data/sig/anthropic/models/beta/beta_message_tokens_count.rbs +0 -2
  569. data/sig/anthropic/models/beta/beta_metadata.rbs +0 -2
  570. data/sig/anthropic/models/beta/beta_model_info.rbs +0 -2
  571. data/sig/anthropic/models/beta/beta_plain_text_source.rbs +0 -2
  572. data/sig/anthropic/models/beta/beta_raw_content_block_delta.rbs +6 -6
  573. data/sig/anthropic/models/beta/beta_raw_content_block_delta_event.rbs +0 -2
  574. data/sig/anthropic/models/beta/beta_raw_content_block_start_event.rbs +10 -10
  575. data/sig/anthropic/models/beta/beta_raw_content_block_stop_event.rbs +0 -2
  576. data/sig/anthropic/models/beta/beta_raw_message_delta_event.rbs +6 -10
  577. data/sig/anthropic/models/beta/beta_raw_message_start_event.rbs +3 -5
  578. data/sig/anthropic/models/beta/beta_raw_message_stop_event.rbs +0 -2
  579. data/sig/anthropic/models/beta/beta_raw_message_stream_event.rbs +7 -7
  580. data/sig/anthropic/models/beta/beta_redacted_thinking_block.rbs +0 -2
  581. data/sig/anthropic/models/beta/beta_redacted_thinking_block_param.rbs +0 -2
  582. data/sig/anthropic/models/beta/beta_server_tool_usage.rbs +15 -0
  583. data/sig/anthropic/models/beta/beta_server_tool_use_block.rbs +27 -0
  584. data/sig/anthropic/models/beta/beta_server_tool_use_block_param.rbs +36 -0
  585. data/sig/anthropic/models/beta/beta_signature_delta.rbs +0 -2
  586. data/sig/anthropic/models/beta/beta_stop_reason.rbs +8 -1
  587. data/sig/anthropic/models/beta/beta_text_block.rbs +0 -2
  588. data/sig/anthropic/models/beta/beta_text_block_param.rbs +3 -5
  589. data/sig/anthropic/models/beta/beta_text_citation.rbs +5 -4
  590. data/sig/anthropic/models/beta/beta_text_citation_param.rbs +5 -4
  591. data/sig/anthropic/models/beta/beta_text_delta.rbs +0 -2
  592. data/sig/anthropic/models/beta/beta_thinking_block.rbs +0 -2
  593. data/sig/anthropic/models/beta/beta_thinking_block_param.rbs +0 -2
  594. data/sig/anthropic/models/beta/beta_thinking_config_disabled.rbs +0 -2
  595. data/sig/anthropic/models/beta/beta_thinking_config_enabled.rbs +0 -2
  596. data/sig/anthropic/models/beta/beta_thinking_config_param.rbs +3 -3
  597. data/sig/anthropic/models/beta/beta_thinking_delta.rbs +0 -2
  598. data/sig/anthropic/models/beta/beta_tool.rbs +10 -14
  599. data/sig/anthropic/models/beta/beta_tool_bash_20241022.rbs +3 -5
  600. data/sig/anthropic/models/beta/beta_tool_bash_20250124.rbs +3 -5
  601. data/sig/anthropic/models/beta/beta_tool_choice.rbs +5 -5
  602. data/sig/anthropic/models/beta/beta_tool_choice_any.rbs +0 -2
  603. data/sig/anthropic/models/beta/beta_tool_choice_auto.rbs +0 -2
  604. data/sig/anthropic/models/beta/beta_tool_choice_none.rbs +0 -2
  605. data/sig/anthropic/models/beta/beta_tool_choice_tool.rbs +0 -2
  606. data/sig/anthropic/models/beta/beta_tool_computer_use_20241022.rbs +3 -5
  607. data/sig/anthropic/models/beta/beta_tool_computer_use_20250124.rbs +3 -5
  608. data/sig/anthropic/models/beta/beta_tool_result_block_param.rbs +14 -19
  609. data/sig/anthropic/models/beta/beta_tool_text_editor_20241022.rbs +3 -5
  610. data/sig/anthropic/models/beta/beta_tool_text_editor_20250124.rbs +3 -5
  611. data/sig/anthropic/models/beta/beta_tool_union.rbs +9 -8
  612. data/sig/anthropic/models/beta/beta_tool_use_block.rbs +0 -2
  613. data/sig/anthropic/models/beta/beta_tool_use_block_param.rbs +3 -5
  614. data/sig/anthropic/models/beta/beta_url_image_source.rbs +0 -2
  615. data/sig/anthropic/models/beta/beta_url_pdf_source.rbs +0 -2
  616. data/sig/anthropic/models/beta/beta_usage.rbs +6 -4
  617. data/sig/anthropic/models/beta/beta_web_search_result_block.rbs +36 -0
  618. data/sig/anthropic/models/beta/beta_web_search_result_block_param.rbs +36 -0
  619. data/sig/anthropic/models/beta/beta_web_search_tool_20250305.rbs +73 -0
  620. data/sig/anthropic/models/beta/beta_web_search_tool_request_error.rbs +43 -0
  621. data/sig/anthropic/models/beta/beta_web_search_tool_result_block.rbs +28 -0
  622. data/sig/anthropic/models/beta/beta_web_search_tool_result_block_content.rbs +19 -0
  623. data/sig/anthropic/models/beta/beta_web_search_tool_result_block_param.rbs +32 -0
  624. data/sig/anthropic/models/beta/beta_web_search_tool_result_block_param_content.rbs +19 -0
  625. data/sig/anthropic/models/beta/beta_web_search_tool_result_error.rbs +43 -0
  626. data/sig/anthropic/models/beta/message_count_tokens_params.rbs +20 -25
  627. data/sig/anthropic/models/beta/message_create_params.rbs +11 -17
  628. data/sig/anthropic/models/beta/messages/batch_cancel_params.rbs +0 -2
  629. data/sig/anthropic/models/beta/messages/batch_create_params.rbs +22 -31
  630. data/sig/anthropic/models/beta/messages/batch_delete_params.rbs +0 -2
  631. data/sig/anthropic/models/beta/messages/batch_list_params.rbs +0 -2
  632. data/sig/anthropic/models/beta/messages/batch_results_params.rbs +0 -2
  633. data/sig/anthropic/models/beta/messages/batch_retrieve_params.rbs +0 -2
  634. data/sig/anthropic/models/beta/messages/beta_deleted_message_batch.rbs +0 -2
  635. data/sig/anthropic/models/beta/messages/beta_message_batch.rbs +7 -9
  636. data/sig/anthropic/models/beta/messages/beta_message_batch_canceled_result.rbs +0 -2
  637. data/sig/anthropic/models/beta/messages/beta_message_batch_errored_result.rbs +3 -5
  638. data/sig/anthropic/models/beta/messages/beta_message_batch_expired_result.rbs +0 -2
  639. data/sig/anthropic/models/beta/messages/beta_message_batch_individual_response.rbs +0 -2
  640. data/sig/anthropic/models/beta/messages/beta_message_batch_request_counts.rbs +0 -2
  641. data/sig/anthropic/models/beta/messages/beta_message_batch_result.rbs +5 -5
  642. data/sig/anthropic/models/beta/messages/beta_message_batch_succeeded_result.rbs +3 -5
  643. data/sig/anthropic/models/beta/model_list_params.rbs +13 -3
  644. data/sig/anthropic/models/beta/model_retrieve_params.rbs +11 -3
  645. data/sig/anthropic/models/beta_api_error.rbs +0 -2
  646. data/sig/anthropic/models/beta_authentication_error.rbs +0 -2
  647. data/sig/anthropic/models/beta_billing_error.rbs +0 -2
  648. data/sig/anthropic/models/beta_error.rbs +10 -10
  649. data/sig/anthropic/models/beta_error_response.rbs +0 -2
  650. data/sig/anthropic/models/beta_gateway_timeout_error.rbs +0 -2
  651. data/sig/anthropic/models/beta_invalid_request_error.rbs +0 -2
  652. data/sig/anthropic/models/beta_not_found_error.rbs +0 -2
  653. data/sig/anthropic/models/beta_overloaded_error.rbs +0 -2
  654. data/sig/anthropic/models/beta_permission_error.rbs +0 -2
  655. data/sig/anthropic/models/beta_rate_limit_error.rbs +0 -2
  656. data/sig/anthropic/models/billing_error.rbs +0 -2
  657. data/sig/anthropic/models/cache_control_ephemeral.rbs +0 -2
  658. data/sig/anthropic/models/citation_char_location.rbs +0 -2
  659. data/sig/anthropic/models/citation_char_location_param.rbs +0 -2
  660. data/sig/anthropic/models/citation_content_block_location.rbs +0 -2
  661. data/sig/anthropic/models/citation_content_block_location_param.rbs +0 -2
  662. data/sig/anthropic/models/citation_page_location.rbs +0 -2
  663. data/sig/anthropic/models/citation_page_location_param.rbs +0 -2
  664. data/sig/anthropic/models/citation_web_search_result_location_param.rbs +32 -0
  665. data/sig/anthropic/models/citations_config_param.rbs +0 -2
  666. data/sig/anthropic/models/citations_delta.rbs +8 -12
  667. data/sig/anthropic/models/citations_web_search_result_location.rbs +32 -0
  668. data/sig/anthropic/models/completion.rbs +0 -2
  669. data/sig/anthropic/models/completion_create_params.rbs +13 -9
  670. data/sig/anthropic/models/content_block.rbs +7 -5
  671. data/sig/anthropic/models/content_block_param.rbs +10 -8
  672. data/sig/anthropic/models/content_block_source.rbs +5 -13
  673. data/sig/anthropic/models/content_block_source_content.rbs +2 -2
  674. data/sig/anthropic/models/document_block_param.rbs +16 -18
  675. data/sig/anthropic/models/error_object.rbs +10 -10
  676. data/sig/anthropic/models/error_response.rbs +0 -2
  677. data/sig/anthropic/models/gateway_timeout_error.rbs +0 -2
  678. data/sig/anthropic/models/image_block_param.rbs +8 -11
  679. data/sig/anthropic/models/input_json_delta.rbs +0 -2
  680. data/sig/anthropic/models/invalid_request_error.rbs +0 -2
  681. data/sig/anthropic/models/message.rbs +3 -5
  682. data/sig/anthropic/models/message_count_tokens_params.rbs +6 -10
  683. data/sig/anthropic/models/message_count_tokens_tool.rbs +5 -4
  684. data/sig/anthropic/models/message_create_params.rbs +10 -16
  685. data/sig/anthropic/models/message_delta_usage.rbs +22 -3
  686. data/sig/anthropic/models/message_param.rbs +9 -14
  687. data/sig/anthropic/models/message_tokens_count.rbs +0 -2
  688. data/sig/anthropic/models/messages/batch_cancel_params.rbs +0 -2
  689. data/sig/anthropic/models/messages/batch_create_params.rbs +21 -34
  690. data/sig/anthropic/models/messages/batch_delete_params.rbs +0 -2
  691. data/sig/anthropic/models/messages/batch_list_params.rbs +0 -2
  692. data/sig/anthropic/models/messages/batch_results_params.rbs +0 -2
  693. data/sig/anthropic/models/messages/batch_retrieve_params.rbs +0 -2
  694. data/sig/anthropic/models/messages/deleted_message_batch.rbs +0 -2
  695. data/sig/anthropic/models/messages/message_batch.rbs +7 -9
  696. data/sig/anthropic/models/messages/message_batch_canceled_result.rbs +0 -2
  697. data/sig/anthropic/models/messages/message_batch_errored_result.rbs +3 -5
  698. data/sig/anthropic/models/messages/message_batch_expired_result.rbs +0 -2
  699. data/sig/anthropic/models/messages/message_batch_individual_response.rbs +0 -2
  700. data/sig/anthropic/models/messages/message_batch_request_counts.rbs +0 -2
  701. data/sig/anthropic/models/messages/message_batch_result.rbs +5 -5
  702. data/sig/anthropic/models/messages/message_batch_succeeded_result.rbs +3 -8
  703. data/sig/anthropic/models/metadata.rbs +0 -2
  704. data/sig/anthropic/models/model.rbs +1 -13
  705. data/sig/anthropic/models/model_info.rbs +0 -2
  706. data/sig/anthropic/models/model_list_params.rbs +13 -3
  707. data/sig/anthropic/models/model_retrieve_params.rbs +11 -3
  708. data/sig/anthropic/models/not_found_error.rbs +0 -2
  709. data/sig/anthropic/models/overloaded_error.rbs +0 -2
  710. data/sig/anthropic/models/permission_error.rbs +0 -2
  711. data/sig/anthropic/models/plain_text_source.rbs +0 -2
  712. data/sig/anthropic/models/rate_limit_error.rbs +0 -2
  713. data/sig/anthropic/models/raw_content_block_delta.rbs +6 -6
  714. data/sig/anthropic/models/raw_content_block_delta_event.rbs +0 -2
  715. data/sig/anthropic/models/raw_content_block_start_event.rbs +10 -10
  716. data/sig/anthropic/models/raw_content_block_stop_event.rbs +0 -2
  717. data/sig/anthropic/models/raw_message_delta_event.rbs +6 -10
  718. data/sig/anthropic/models/raw_message_start_event.rbs +3 -5
  719. data/sig/anthropic/models/raw_message_stop_event.rbs +0 -2
  720. data/sig/anthropic/models/raw_message_stream_event.rbs +7 -7
  721. data/sig/anthropic/models/redacted_thinking_block.rbs +0 -2
  722. data/sig/anthropic/models/redacted_thinking_block_param.rbs +0 -2
  723. data/sig/anthropic/models/server_tool_usage.rbs +11 -0
  724. data/sig/anthropic/models/server_tool_use_block.rbs +23 -0
  725. data/sig/anthropic/models/server_tool_use_block_param.rbs +32 -0
  726. data/sig/anthropic/models/signature_delta.rbs +0 -2
  727. data/sig/anthropic/models/stop_reason.rbs +9 -1
  728. data/sig/anthropic/models/text_block.rbs +0 -2
  729. data/sig/anthropic/models/text_block_param.rbs +3 -5
  730. data/sig/anthropic/models/text_citation.rbs +5 -4
  731. data/sig/anthropic/models/text_citation_param.rbs +5 -4
  732. data/sig/anthropic/models/text_delta.rbs +0 -2
  733. data/sig/anthropic/models/thinking_block.rbs +0 -2
  734. data/sig/anthropic/models/thinking_block_param.rbs +0 -2
  735. data/sig/anthropic/models/thinking_config_disabled.rbs +0 -2
  736. data/sig/anthropic/models/thinking_config_enabled.rbs +0 -2
  737. data/sig/anthropic/models/thinking_config_param.rbs +2 -3
  738. data/sig/anthropic/models/thinking_delta.rbs +0 -2
  739. data/sig/anthropic/models/tool.rbs +21 -11
  740. data/sig/anthropic/models/tool_bash_20250124.rbs +3 -5
  741. data/sig/anthropic/models/tool_choice.rbs +5 -5
  742. data/sig/anthropic/models/tool_choice_any.rbs +0 -2
  743. data/sig/anthropic/models/tool_choice_auto.rbs +0 -2
  744. data/sig/anthropic/models/tool_choice_none.rbs +0 -2
  745. data/sig/anthropic/models/tool_choice_tool.rbs +0 -2
  746. data/sig/anthropic/models/tool_result_block_param.rbs +13 -20
  747. data/sig/anthropic/models/tool_text_editor_20250124.rbs +3 -5
  748. data/sig/anthropic/models/tool_union.rbs +5 -4
  749. data/sig/anthropic/models/tool_use_block.rbs +0 -2
  750. data/sig/anthropic/models/tool_use_block_param.rbs +3 -5
  751. data/sig/anthropic/models/url_image_source.rbs +0 -2
  752. data/sig/anthropic/models/url_pdf_source.rbs +0 -2
  753. data/sig/anthropic/models/usage.rbs +6 -4
  754. data/sig/anthropic/models/web_search_result_block.rbs +32 -0
  755. data/sig/anthropic/models/web_search_result_block_param.rbs +32 -0
  756. data/sig/anthropic/models/web_search_tool_20250305.rbs +69 -0
  757. data/sig/anthropic/models/web_search_tool_request_error.rbs +39 -0
  758. data/sig/anthropic/models/web_search_tool_result_block.rbs +24 -0
  759. data/sig/anthropic/models/web_search_tool_result_block_content.rbs +15 -0
  760. data/sig/anthropic/models/web_search_tool_result_block_param.rbs +28 -0
  761. data/sig/anthropic/models/web_search_tool_result_block_param_content.rbs +15 -0
  762. data/sig/anthropic/models/web_search_tool_result_error.rbs +39 -0
  763. data/sig/anthropic/models.rbs +221 -0
  764. data/sig/anthropic/request_options.rbs +1 -1
  765. data/sig/anthropic/resources/beta/messages/batches.rbs +7 -7
  766. data/sig/anthropic/resources/beta/messages.rbs +8 -8
  767. data/sig/anthropic/resources/beta/models.rbs +4 -2
  768. data/sig/anthropic/resources/completions.rbs +6 -4
  769. data/sig/anthropic/resources/messages/batches.rbs +7 -7
  770. data/sig/anthropic/resources/messages.rbs +7 -7
  771. data/sig/anthropic/resources/models.rbs +4 -2
  772. data/sig/anthropic/vertex.rbs +3 -0
  773. metadata +335 -238
  774. data/lib/anthropic/bedrock/client.rb +0 -261
  775. data/lib/anthropic/vertex/client.rb +0 -210
  776. data/rbi/lib/anthropic/bedrock/client.rbi +0 -80
  777. data/rbi/lib/anthropic/internal/transport/base_client.rbi +0 -204
  778. data/rbi/lib/anthropic/internal/type/array_of.rbi +0 -82
  779. data/rbi/lib/anthropic/internal/type/base_model.rbi +0 -197
  780. data/rbi/lib/anthropic/internal/type/boolean.rbi +0 -49
  781. data/rbi/lib/anthropic/internal/type/hash_of.rbi +0 -82
  782. data/rbi/lib/anthropic/internal/type/request_parameters.rbi +0 -21
  783. data/rbi/lib/anthropic/internal/type/union.rbi +0 -68
  784. data/rbi/lib/anthropic/internal/type/unknown.rbi +0 -41
  785. data/rbi/lib/anthropic/internal/util.rbi +0 -282
  786. data/rbi/lib/anthropic/models/anthropic_beta.rbi +0 -30
  787. data/rbi/lib/anthropic/models/base64_image_source.rbi +0 -46
  788. data/rbi/lib/anthropic/models/base64_pdf_source.rbi +0 -22
  789. data/rbi/lib/anthropic/models/beta/beta_base64_image_source.rbi +0 -56
  790. data/rbi/lib/anthropic/models/beta/beta_base64_pdf_block.rbi +0 -104
  791. data/rbi/lib/anthropic/models/beta/beta_base64_pdf_source.rbi +0 -26
  792. data/rbi/lib/anthropic/models/beta/beta_citations_delta.rbi +0 -66
  793. data/rbi/lib/anthropic/models/beta/beta_content_block.rbi +0 -21
  794. data/rbi/lib/anthropic/models/beta/beta_content_block_param.rbi +0 -21
  795. data/rbi/lib/anthropic/models/beta/beta_content_block_source.rbi +0 -74
  796. data/rbi/lib/anthropic/models/beta/beta_content_block_source_content.rbi +0 -19
  797. data/rbi/lib/anthropic/models/beta/beta_image_block_param.rbi +0 -68
  798. data/rbi/lib/anthropic/models/beta/beta_input_json_delta.rbi +0 -23
  799. data/rbi/lib/anthropic/models/beta/beta_message.rbi +0 -180
  800. data/rbi/lib/anthropic/models/beta/beta_message_delta_usage.rbi +0 -21
  801. data/rbi/lib/anthropic/models/beta/beta_message_param.rbi +0 -126
  802. data/rbi/lib/anthropic/models/beta/beta_model_info.rbi +0 -38
  803. data/rbi/lib/anthropic/models/beta/beta_plain_text_source.rbi +0 -26
  804. data/rbi/lib/anthropic/models/beta/beta_raw_content_block_delta.rbi +0 -21
  805. data/rbi/lib/anthropic/models/beta/beta_raw_content_block_delta_event.rbi +0 -65
  806. data/rbi/lib/anthropic/models/beta/beta_raw_content_block_start_event.rbi +0 -74
  807. data/rbi/lib/anthropic/models/beta/beta_raw_message_delta_event.rbi +0 -96
  808. data/rbi/lib/anthropic/models/beta/beta_raw_message_start_event.rbi +0 -29
  809. data/rbi/lib/anthropic/models/beta/beta_raw_message_stream_event.rbi +0 -21
  810. data/rbi/lib/anthropic/models/beta/beta_signature_delta.rbi +0 -23
  811. data/rbi/lib/anthropic/models/beta/beta_stop_reason.rbi +0 -24
  812. data/rbi/lib/anthropic/models/beta/beta_text_block.rbi +0 -76
  813. data/rbi/lib/anthropic/models/beta/beta_text_block_param.rbi +0 -84
  814. data/rbi/lib/anthropic/models/beta/beta_text_citation.rbi +0 -21
  815. data/rbi/lib/anthropic/models/beta/beta_text_citation_param.rbi +0 -21
  816. data/rbi/lib/anthropic/models/beta/beta_thinking_block.rbi +0 -26
  817. data/rbi/lib/anthropic/models/beta/beta_thinking_block_param.rbi +0 -26
  818. data/rbi/lib/anthropic/models/beta/beta_thinking_config_enabled.rbi +0 -32
  819. data/rbi/lib/anthropic/models/beta/beta_tool.rbi +0 -112
  820. data/rbi/lib/anthropic/models/beta/beta_tool_bash_20241022.rbi +0 -49
  821. data/rbi/lib/anthropic/models/beta/beta_tool_bash_20250124.rbi +0 -49
  822. data/rbi/lib/anthropic/models/beta/beta_tool_choice_any.rbi +0 -31
  823. data/rbi/lib/anthropic/models/beta/beta_tool_choice_auto.rbi +0 -31
  824. data/rbi/lib/anthropic/models/beta/beta_tool_choice_tool.rbi +0 -37
  825. data/rbi/lib/anthropic/models/beta/beta_tool_result_block_param.rbi +0 -129
  826. data/rbi/lib/anthropic/models/beta/beta_tool_text_editor_20241022.rbi +0 -49
  827. data/rbi/lib/anthropic/models/beta/beta_tool_text_editor_20250124.rbi +0 -49
  828. data/rbi/lib/anthropic/models/beta/beta_tool_union.rbi +0 -21
  829. data/rbi/lib/anthropic/models/beta/beta_tool_use_block.rbi +0 -29
  830. data/rbi/lib/anthropic/models/beta/beta_tool_use_block_param.rbi +0 -60
  831. data/rbi/lib/anthropic/models/beta/beta_usage.rbi +0 -52
  832. data/rbi/lib/anthropic/models/beta/message_count_tokens_params.rbi +0 -409
  833. data/rbi/lib/anthropic/models/beta/message_create_params.rbi +0 -489
  834. data/rbi/lib/anthropic/models/beta/messages/batch_cancel_params.rbi +0 -41
  835. data/rbi/lib/anthropic/models/beta/messages/batch_create_params.rbi +0 -572
  836. data/rbi/lib/anthropic/models/beta/messages/batch_delete_params.rbi +0 -41
  837. data/rbi/lib/anthropic/models/beta/messages/batch_list_params.rbi +0 -72
  838. data/rbi/lib/anthropic/models/beta/messages/batch_results_params.rbi +0 -41
  839. data/rbi/lib/anthropic/models/beta/messages/batch_retrieve_params.rbi +0 -41
  840. data/rbi/lib/anthropic/models/beta/messages/beta_deleted_message_batch.rbi +0 -27
  841. data/rbi/lib/anthropic/models/beta/messages/beta_message_batch.rbi +0 -148
  842. data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_canceled_result.rbi +0 -20
  843. data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_errored_result.rbi +0 -29
  844. data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_expired_result.rbi +0 -20
  845. data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_individual_response.rbi +0 -68
  846. data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_result.rbi +0 -26
  847. data/rbi/lib/anthropic/models/beta/messages/beta_message_batch_succeeded_result.rbi +0 -29
  848. data/rbi/lib/anthropic/models/beta/model_list_params.rbi +0 -59
  849. data/rbi/lib/anthropic/models/beta/model_retrieve_params.rbi +0 -21
  850. data/rbi/lib/anthropic/models/beta_error.rbi +0 -17
  851. data/rbi/lib/anthropic/models/beta_error_response.rbi +0 -68
  852. data/rbi/lib/anthropic/models/citations_delta.rbi +0 -62
  853. data/rbi/lib/anthropic/models/completion.rbi +0 -65
  854. data/rbi/lib/anthropic/models/completion_create_params.rbi +0 -142
  855. data/rbi/lib/anthropic/models/content_block.rbi +0 -17
  856. data/rbi/lib/anthropic/models/content_block_param.rbi +0 -17
  857. data/rbi/lib/anthropic/models/content_block_source.rbi +0 -56
  858. data/rbi/lib/anthropic/models/content_block_source_content.rbi +0 -12
  859. data/rbi/lib/anthropic/models/document_block_param.rbi +0 -97
  860. data/rbi/lib/anthropic/models/error_object.rbi +0 -17
  861. data/rbi/lib/anthropic/models/error_response.rbi +0 -68
  862. data/rbi/lib/anthropic/models/image_block_param.rbi +0 -57
  863. data/rbi/lib/anthropic/models/input_json_delta.rbi +0 -19
  864. data/rbi/lib/anthropic/models/message.rbi +0 -176
  865. data/rbi/lib/anthropic/models/message_count_tokens_params.rbi +0 -363
  866. data/rbi/lib/anthropic/models/message_count_tokens_tool.rbi +0 -17
  867. data/rbi/lib/anthropic/models/message_create_params.rbi +0 -453
  868. data/rbi/lib/anthropic/models/message_delta_usage.rbi +0 -17
  869. data/rbi/lib/anthropic/models/message_param.rbi +0 -121
  870. data/rbi/lib/anthropic/models/message_tokens_count.rbi +0 -18
  871. data/rbi/lib/anthropic/models/messages/batch_cancel_params.rbi +0 -21
  872. data/rbi/lib/anthropic/models/messages/batch_create_params.rbi +0 -535
  873. data/rbi/lib/anthropic/models/messages/batch_delete_params.rbi +0 -21
  874. data/rbi/lib/anthropic/models/messages/batch_results_params.rbi +0 -21
  875. data/rbi/lib/anthropic/models/messages/batch_retrieve_params.rbi +0 -21
  876. data/rbi/lib/anthropic/models/messages/deleted_message_batch.rbi +0 -25
  877. data/rbi/lib/anthropic/models/messages/message_batch.rbi +0 -143
  878. data/rbi/lib/anthropic/models/messages/message_batch_errored_result.rbi +0 -29
  879. data/rbi/lib/anthropic/models/messages/message_batch_individual_response.rbi +0 -68
  880. data/rbi/lib/anthropic/models/messages/message_batch_succeeded_result.rbi +0 -29
  881. data/rbi/lib/anthropic/models/metadata.rbi +0 -21
  882. data/rbi/lib/anthropic/models/model.rbi +0 -54
  883. data/rbi/lib/anthropic/models/model_info.rbi +0 -34
  884. data/rbi/lib/anthropic/models/model_list_params.rbi +0 -57
  885. data/rbi/lib/anthropic/models/model_retrieve_params.rbi +0 -19
  886. data/rbi/lib/anthropic/models/plain_text_source.rbi +0 -22
  887. data/rbi/lib/anthropic/models/raw_content_block_delta.rbi +0 -17
  888. data/rbi/lib/anthropic/models/raw_content_block_delta_event.rbi +0 -61
  889. data/rbi/lib/anthropic/models/raw_content_block_start_event.rbi +0 -70
  890. data/rbi/lib/anthropic/models/raw_message_delta_event.rbi +0 -81
  891. data/rbi/lib/anthropic/models/raw_message_start_event.rbi +0 -25
  892. data/rbi/lib/anthropic/models/raw_message_stop_event.rbi +0 -16
  893. data/rbi/lib/anthropic/models/raw_message_stream_event.rbi +0 -17
  894. data/rbi/lib/anthropic/models/stop_reason.rbi +0 -20
  895. data/rbi/lib/anthropic/models/text_block.rbi +0 -72
  896. data/rbi/lib/anthropic/models/text_block_param.rbi +0 -80
  897. data/rbi/lib/anthropic/models/text_citation.rbi +0 -17
  898. data/rbi/lib/anthropic/models/text_citation_param.rbi +0 -17
  899. data/rbi/lib/anthropic/models/thinking_block.rbi +0 -22
  900. data/rbi/lib/anthropic/models/thinking_block_param.rbi +0 -22
  901. data/rbi/lib/anthropic/models/thinking_config_enabled.rbi +0 -28
  902. data/rbi/lib/anthropic/models/tool.rbi +0 -88
  903. data/rbi/lib/anthropic/models/tool_bash_20250124.rbi +0 -43
  904. data/rbi/lib/anthropic/models/tool_choice.rbi +0 -19
  905. data/rbi/lib/anthropic/models/tool_choice_any.rbi +0 -27
  906. data/rbi/lib/anthropic/models/tool_choice_auto.rbi +0 -27
  907. data/rbi/lib/anthropic/models/tool_choice_tool.rbi +0 -33
  908. data/rbi/lib/anthropic/models/tool_result_block_param.rbi +0 -102
  909. data/rbi/lib/anthropic/models/tool_text_editor_20250124.rbi +0 -43
  910. data/rbi/lib/anthropic/models/tool_union.rbi +0 -17
  911. data/rbi/lib/anthropic/models/tool_use_block.rbi +0 -25
  912. data/rbi/lib/anthropic/models/tool_use_block_param.rbi +0 -56
  913. data/rbi/lib/anthropic/models/usage.rbi +0 -47
  914. data/rbi/lib/anthropic/resources/models.rbi +0 -53
  915. data/rbi/lib/anthropic/vertex/client.rbi +0 -56
  916. data/sig/anthropic/bedrock/client.rbs +0 -41
  917. data/sig/anthropic/vertex/client.rbs +0 -34
  918. /data/rbi/{lib/anthropic → anthropic}/version.rbi +0 -0
@@ -0,0 +1,906 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ module Messages
7
+ class BatchCreateParams < Anthropic::Internal::Type::BaseModel
8
+ extend Anthropic::Internal::Type::RequestParameters::Converter
9
+ include Anthropic::Internal::Type::RequestParameters
10
+
11
+ OrHash =
12
+ T.type_alias do
13
+ T.any(
14
+ Anthropic::Beta::Messages::BatchCreateParams,
15
+ Anthropic::Internal::AnyHash
16
+ )
17
+ end
18
+
19
+ # List of requests for prompt completion. Each is an individual request to create
20
+ # a Message.
21
+ sig do
22
+ returns(
23
+ T::Array[Anthropic::Beta::Messages::BatchCreateParams::Request]
24
+ )
25
+ end
26
+ attr_accessor :requests
27
+
28
+ # Optional header to specify the beta version(s) you want to use.
29
+ sig do
30
+ returns(
31
+ T.nilable(
32
+ T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)]
33
+ )
34
+ )
35
+ end
36
+ attr_reader :betas
37
+
38
+ sig do
39
+ params(
40
+ betas: T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)]
41
+ ).void
42
+ end
43
+ attr_writer :betas
44
+
45
+ sig do
46
+ params(
47
+ requests:
48
+ T::Array[
49
+ Anthropic::Beta::Messages::BatchCreateParams::Request::OrHash
50
+ ],
51
+ betas:
52
+ T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
53
+ request_options: Anthropic::RequestOptions::OrHash
54
+ ).returns(T.attached_class)
55
+ end
56
+ def self.new(
57
+ # List of requests for prompt completion. Each is an individual request to create
58
+ # a Message.
59
+ requests:,
60
+ # Optional header to specify the beta version(s) you want to use.
61
+ betas: nil,
62
+ request_options: {}
63
+ )
64
+ end
65
+
66
+ sig do
67
+ override.returns(
68
+ {
69
+ requests:
70
+ T::Array[
71
+ Anthropic::Beta::Messages::BatchCreateParams::Request
72
+ ],
73
+ betas:
74
+ T::Array[T.any(String, Anthropic::AnthropicBeta::OrSymbol)],
75
+ request_options: Anthropic::RequestOptions
76
+ }
77
+ )
78
+ end
79
+ def to_hash
80
+ end
81
+
82
+ class Request < Anthropic::Internal::Type::BaseModel
83
+ OrHash =
84
+ T.type_alias do
85
+ T.any(
86
+ Anthropic::Beta::Messages::BatchCreateParams::Request,
87
+ Anthropic::Internal::AnyHash
88
+ )
89
+ end
90
+
91
+ # Developer-provided ID created for each request in a Message Batch. Useful for
92
+ # matching results to requests, as results may be given out of request order.
93
+ #
94
+ # Must be unique for each request within the Message Batch.
95
+ sig { returns(String) }
96
+ attr_accessor :custom_id
97
+
98
+ # Messages API creation parameters for the individual request.
99
+ #
100
+ # See the [Messages API reference](/en/api/messages) for full documentation on
101
+ # available parameters.
102
+ sig do
103
+ returns(
104
+ Anthropic::Beta::Messages::BatchCreateParams::Request::Params
105
+ )
106
+ end
107
+ attr_reader :params
108
+
109
+ sig do
110
+ params(
111
+ params:
112
+ Anthropic::Beta::Messages::BatchCreateParams::Request::Params::OrHash
113
+ ).void
114
+ end
115
+ attr_writer :params
116
+
117
+ sig do
118
+ params(
119
+ custom_id: String,
120
+ params:
121
+ Anthropic::Beta::Messages::BatchCreateParams::Request::Params::OrHash
122
+ ).returns(T.attached_class)
123
+ end
124
+ def self.new(
125
+ # Developer-provided ID created for each request in a Message Batch. Useful for
126
+ # matching results to requests, as results may be given out of request order.
127
+ #
128
+ # Must be unique for each request within the Message Batch.
129
+ custom_id:,
130
+ # Messages API creation parameters for the individual request.
131
+ #
132
+ # See the [Messages API reference](/en/api/messages) for full documentation on
133
+ # available parameters.
134
+ params:
135
+ )
136
+ end
137
+
138
+ sig do
139
+ override.returns(
140
+ {
141
+ custom_id: String,
142
+ params:
143
+ Anthropic::Beta::Messages::BatchCreateParams::Request::Params
144
+ }
145
+ )
146
+ end
147
+ def to_hash
148
+ end
149
+
150
+ class Params < Anthropic::Internal::Type::BaseModel
151
+ OrHash =
152
+ T.type_alias do
153
+ T.any(
154
+ Anthropic::Beta::Messages::BatchCreateParams::Request::Params,
155
+ Anthropic::Internal::AnyHash
156
+ )
157
+ end
158
+
159
+ # The maximum number of tokens to generate before stopping.
160
+ #
161
+ # Note that our models may stop _before_ reaching this maximum. This parameter
162
+ # only specifies the absolute maximum number of tokens to generate.
163
+ #
164
+ # Different models have different maximum values for this parameter. See
165
+ # [models](https://docs.anthropic.com/en/docs/models-overview) for details.
166
+ sig { returns(Integer) }
167
+ attr_accessor :max_tokens
168
+
169
+ # Input messages.
170
+ #
171
+ # Our models are trained to operate on alternating `user` and `assistant`
172
+ # conversational turns. When creating a new `Message`, you specify the prior
173
+ # conversational turns with the `messages` parameter, and the model then generates
174
+ # the next `Message` in the conversation. Consecutive `user` or `assistant` turns
175
+ # in your request will be combined into a single turn.
176
+ #
177
+ # Each input message must be an object with a `role` and `content`. You can
178
+ # specify a single `user`-role message, or you can include multiple `user` and
179
+ # `assistant` messages.
180
+ #
181
+ # If the final message uses the `assistant` role, the response content will
182
+ # continue immediately from the content in that message. This can be used to
183
+ # constrain part of the model's response.
184
+ #
185
+ # Example with a single `user` message:
186
+ #
187
+ # ```json
188
+ # [{ "role": "user", "content": "Hello, Claude" }]
189
+ # ```
190
+ #
191
+ # Example with multiple conversational turns:
192
+ #
193
+ # ```json
194
+ # [
195
+ # { "role": "user", "content": "Hello there." },
196
+ # { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" },
197
+ # { "role": "user", "content": "Can you explain LLMs in plain English?" }
198
+ # ]
199
+ # ```
200
+ #
201
+ # Example with a partially-filled response from Claude:
202
+ #
203
+ # ```json
204
+ # [
205
+ # {
206
+ # "role": "user",
207
+ # "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"
208
+ # },
209
+ # { "role": "assistant", "content": "The best answer is (" }
210
+ # ]
211
+ # ```
212
+ #
213
+ # Each input message `content` may be either a single `string` or an array of
214
+ # content blocks, where each block has a specific `type`. Using a `string` for
215
+ # `content` is shorthand for an array of one content block of type `"text"`. The
216
+ # following input messages are equivalent:
217
+ #
218
+ # ```json
219
+ # { "role": "user", "content": "Hello, Claude" }
220
+ # ```
221
+ #
222
+ # ```json
223
+ # { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
224
+ # ```
225
+ #
226
+ # Starting with Claude 3 models, you can also send image content blocks:
227
+ #
228
+ # ```json
229
+ # {
230
+ # "role": "user",
231
+ # "content": [
232
+ # {
233
+ # "type": "image",
234
+ # "source": {
235
+ # "type": "base64",
236
+ # "media_type": "image/jpeg",
237
+ # "data": "/9j/4AAQSkZJRg..."
238
+ # }
239
+ # },
240
+ # { "type": "text", "text": "What is in this image?" }
241
+ # ]
242
+ # }
243
+ # ```
244
+ #
245
+ # We currently support the `base64` source type for images, and the `image/jpeg`,
246
+ # `image/png`, `image/gif`, and `image/webp` media types.
247
+ #
248
+ # See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for
249
+ # more input examples.
250
+ #
251
+ # Note that if you want to include a
252
+ # [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
253
+ # the top-level `system` parameter — there is no `"system"` role for input
254
+ # messages in the Messages API.
255
+ #
256
+ # There is a limit of 100000 messages in a single request.
257
+ sig { returns(T::Array[Anthropic::Beta::BetaMessageParam]) }
258
+ attr_accessor :messages
259
+
260
+ # The model that will complete your prompt.\n\nSee
261
+ # [models](https://docs.anthropic.com/en/docs/models-overview) for additional
262
+ # details and options.
263
+ sig { returns(T.any(Anthropic::Model::OrSymbol, String)) }
264
+ attr_accessor :model
265
+
266
+ # An object describing metadata about the request.
267
+ sig { returns(T.nilable(Anthropic::Beta::BetaMetadata)) }
268
+ attr_reader :metadata
269
+
270
+ sig do
271
+ params(metadata: Anthropic::Beta::BetaMetadata::OrHash).void
272
+ end
273
+ attr_writer :metadata
274
+
275
+ # Custom text sequences that will cause the model to stop generating.
276
+ #
277
+ # Our models will normally stop when they have naturally completed their turn,
278
+ # which will result in a response `stop_reason` of `"end_turn"`.
279
+ #
280
+ # If you want the model to stop generating when it encounters custom strings of
281
+ # text, you can use the `stop_sequences` parameter. If the model encounters one of
282
+ # the custom sequences, the response `stop_reason` value will be `"stop_sequence"`
283
+ # and the response `stop_sequence` value will contain the matched stop sequence.
284
+ sig { returns(T.nilable(T::Array[String])) }
285
+ attr_reader :stop_sequences
286
+
287
+ sig { params(stop_sequences: T::Array[String]).void }
288
+ attr_writer :stop_sequences
289
+
290
+ # Whether to incrementally stream the response using server-sent events.
291
+ #
292
+ # See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for
293
+ # details.
294
+ sig { returns(T.nilable(T::Boolean)) }
295
+ attr_reader :stream
296
+
297
+ sig { params(stream: T::Boolean).void }
298
+ attr_writer :stream
299
+
300
+ # System prompt.
301
+ #
302
+ # A system prompt is a way of providing context and instructions to Claude, such
303
+ # as specifying a particular goal or role. See our
304
+ # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
305
+ sig do
306
+ returns(
307
+ T.nilable(
308
+ T.any(String, T::Array[Anthropic::Beta::BetaTextBlockParam])
309
+ )
310
+ )
311
+ end
312
+ attr_reader :system_
313
+
314
+ sig do
315
+ params(
316
+ system_:
317
+ T.any(
318
+ String,
319
+ T::Array[Anthropic::Beta::BetaTextBlockParam::OrHash]
320
+ )
321
+ ).void
322
+ end
323
+ attr_writer :system_
324
+
325
+ # Amount of randomness injected into the response.
326
+ #
327
+ # Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0`
328
+ # for analytical / multiple choice, and closer to `1.0` for creative and
329
+ # generative tasks.
330
+ #
331
+ # Note that even with `temperature` of `0.0`, the results will not be fully
332
+ # deterministic.
333
+ sig { returns(T.nilable(Float)) }
334
+ attr_reader :temperature
335
+
336
+ sig { params(temperature: Float).void }
337
+ attr_writer :temperature
338
+
339
+ # Configuration for enabling Claude's extended thinking.
340
+ #
341
+ # When enabled, responses include `thinking` content blocks showing Claude's
342
+ # thinking process before the final answer. Requires a minimum budget of 1,024
343
+ # tokens and counts towards your `max_tokens` limit.
344
+ #
345
+ # See
346
+ # [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
347
+ # for details.
348
+ sig do
349
+ returns(
350
+ T.nilable(
351
+ T.any(
352
+ Anthropic::Beta::BetaThinkingConfigEnabled,
353
+ Anthropic::Beta::BetaThinkingConfigDisabled
354
+ )
355
+ )
356
+ )
357
+ end
358
+ attr_reader :thinking
359
+
360
+ sig do
361
+ params(
362
+ thinking:
363
+ T.any(
364
+ Anthropic::Beta::BetaThinkingConfigEnabled::OrHash,
365
+ Anthropic::Beta::BetaThinkingConfigDisabled::OrHash
366
+ )
367
+ ).void
368
+ end
369
+ attr_writer :thinking
370
+
371
+ # How the model should use the provided tools. The model can use a specific tool,
372
+ # any available tool, decide by itself, or not use tools at all.
373
+ sig do
374
+ returns(
375
+ T.nilable(
376
+ T.any(
377
+ Anthropic::Beta::BetaToolChoiceAuto,
378
+ Anthropic::Beta::BetaToolChoiceAny,
379
+ Anthropic::Beta::BetaToolChoiceTool,
380
+ Anthropic::Beta::BetaToolChoiceNone
381
+ )
382
+ )
383
+ )
384
+ end
385
+ attr_reader :tool_choice
386
+
387
+ sig do
388
+ params(
389
+ tool_choice:
390
+ T.any(
391
+ Anthropic::Beta::BetaToolChoiceAuto::OrHash,
392
+ Anthropic::Beta::BetaToolChoiceAny::OrHash,
393
+ Anthropic::Beta::BetaToolChoiceTool::OrHash,
394
+ Anthropic::Beta::BetaToolChoiceNone::OrHash
395
+ )
396
+ ).void
397
+ end
398
+ attr_writer :tool_choice
399
+
400
+ # Definitions of tools that the model may use.
401
+ #
402
+ # If you include `tools` in your API request, the model may return `tool_use`
403
+ # content blocks that represent the model's use of those tools. You can then run
404
+ # those tools using the tool input generated by the model and then optionally
405
+ # return results back to the model using `tool_result` content blocks.
406
+ #
407
+ # Each tool definition includes:
408
+ #
409
+ # - `name`: Name of the tool.
410
+ # - `description`: Optional, but strongly-recommended description of the tool.
411
+ # - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the
412
+ # tool `input` shape that the model will produce in `tool_use` output content
413
+ # blocks.
414
+ #
415
+ # For example, if you defined `tools` as:
416
+ #
417
+ # ```json
418
+ # [
419
+ # {
420
+ # "name": "get_stock_price",
421
+ # "description": "Get the current stock price for a given ticker symbol.",
422
+ # "input_schema": {
423
+ # "type": "object",
424
+ # "properties": {
425
+ # "ticker": {
426
+ # "type": "string",
427
+ # "description": "The stock ticker symbol, e.g. AAPL for Apple Inc."
428
+ # }
429
+ # },
430
+ # "required": ["ticker"]
431
+ # }
432
+ # }
433
+ # ]
434
+ # ```
435
+ #
436
+ # And then asked the model "What's the S&P 500 at today?", the model might produce
437
+ # `tool_use` content blocks in the response like this:
438
+ #
439
+ # ```json
440
+ # [
441
+ # {
442
+ # "type": "tool_use",
443
+ # "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
444
+ # "name": "get_stock_price",
445
+ # "input": { "ticker": "^GSPC" }
446
+ # }
447
+ # ]
448
+ # ```
449
+ #
450
+ # You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an
451
+ # input, and return the following back to the model in a subsequent `user`
452
+ # message:
453
+ #
454
+ # ```json
455
+ # [
456
+ # {
457
+ # "type": "tool_result",
458
+ # "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
459
+ # "content": "259.75 USD"
460
+ # }
461
+ # ]
462
+ # ```
463
+ #
464
+ # Tools can be used for workflows that include running client-side tools and
465
+ # functions, or more generally whenever you want the model to produce a particular
466
+ # JSON structure of output.
467
+ #
468
+ # See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
469
+ sig do
470
+ returns(
471
+ T.nilable(
472
+ T::Array[
473
+ T.any(
474
+ Anthropic::Beta::BetaTool,
475
+ Anthropic::Beta::BetaToolComputerUse20241022,
476
+ Anthropic::Beta::BetaToolBash20241022,
477
+ Anthropic::Beta::BetaToolTextEditor20241022,
478
+ Anthropic::Beta::BetaToolComputerUse20250124,
479
+ Anthropic::Beta::BetaToolBash20250124,
480
+ Anthropic::Beta::BetaToolTextEditor20250124,
481
+ Anthropic::Beta::BetaWebSearchTool20250305
482
+ )
483
+ ]
484
+ )
485
+ )
486
+ end
487
+ attr_reader :tools
488
+
489
+ sig do
490
+ params(
491
+ tools:
492
+ T::Array[
493
+ T.any(
494
+ Anthropic::Beta::BetaTool::OrHash,
495
+ Anthropic::Beta::BetaToolComputerUse20241022::OrHash,
496
+ Anthropic::Beta::BetaToolBash20241022::OrHash,
497
+ Anthropic::Beta::BetaToolTextEditor20241022::OrHash,
498
+ Anthropic::Beta::BetaToolComputerUse20250124::OrHash,
499
+ Anthropic::Beta::BetaToolBash20250124::OrHash,
500
+ Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
501
+ Anthropic::Beta::BetaWebSearchTool20250305::OrHash
502
+ )
503
+ ]
504
+ ).void
505
+ end
506
+ attr_writer :tools
507
+
508
+ # Only sample from the top K options for each subsequent token.
509
+ #
510
+ # Used to remove "long tail" low probability responses.
511
+ # [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).
512
+ #
513
+ # Recommended for advanced use cases only. You usually only need to use
514
+ # `temperature`.
515
+ sig { returns(T.nilable(Integer)) }
516
+ attr_reader :top_k
517
+
518
+ sig { params(top_k: Integer).void }
519
+ attr_writer :top_k
520
+
521
+ # Use nucleus sampling.
522
+ #
523
+ # In nucleus sampling, we compute the cumulative distribution over all the options
524
+ # for each subsequent token in decreasing probability order and cut it off once it
525
+ # reaches a particular probability specified by `top_p`. You should either alter
526
+ # `temperature` or `top_p`, but not both.
527
+ #
528
+ # Recommended for advanced use cases only. You usually only need to use
529
+ # `temperature`.
530
+ sig { returns(T.nilable(Float)) }
531
+ attr_reader :top_p
532
+
533
+ sig { params(top_p: Float).void }
534
+ attr_writer :top_p
535
+
536
+ # Messages API creation parameters for the individual request.
537
+ #
538
+ # See the [Messages API reference](/en/api/messages) for full documentation on
539
+ # available parameters.
540
+ sig do
541
+ params(
542
+ max_tokens: Integer,
543
+ messages: T::Array[Anthropic::Beta::BetaMessageParam::OrHash],
544
+ model: T.any(Anthropic::Model::OrSymbol, String),
545
+ metadata: Anthropic::Beta::BetaMetadata::OrHash,
546
+ stop_sequences: T::Array[String],
547
+ stream: T::Boolean,
548
+ system_:
549
+ T.any(
550
+ String,
551
+ T::Array[Anthropic::Beta::BetaTextBlockParam::OrHash]
552
+ ),
553
+ temperature: Float,
554
+ thinking:
555
+ T.any(
556
+ Anthropic::Beta::BetaThinkingConfigEnabled::OrHash,
557
+ Anthropic::Beta::BetaThinkingConfigDisabled::OrHash
558
+ ),
559
+ tool_choice:
560
+ T.any(
561
+ Anthropic::Beta::BetaToolChoiceAuto::OrHash,
562
+ Anthropic::Beta::BetaToolChoiceAny::OrHash,
563
+ Anthropic::Beta::BetaToolChoiceTool::OrHash,
564
+ Anthropic::Beta::BetaToolChoiceNone::OrHash
565
+ ),
566
+ tools:
567
+ T::Array[
568
+ T.any(
569
+ Anthropic::Beta::BetaTool::OrHash,
570
+ Anthropic::Beta::BetaToolComputerUse20241022::OrHash,
571
+ Anthropic::Beta::BetaToolBash20241022::OrHash,
572
+ Anthropic::Beta::BetaToolTextEditor20241022::OrHash,
573
+ Anthropic::Beta::BetaToolComputerUse20250124::OrHash,
574
+ Anthropic::Beta::BetaToolBash20250124::OrHash,
575
+ Anthropic::Beta::BetaToolTextEditor20250124::OrHash,
576
+ Anthropic::Beta::BetaWebSearchTool20250305::OrHash
577
+ )
578
+ ],
579
+ top_k: Integer,
580
+ top_p: Float
581
+ ).returns(T.attached_class)
582
+ end
583
+ def self.new(
584
+ # The maximum number of tokens to generate before stopping.
585
+ #
586
+ # Note that our models may stop _before_ reaching this maximum. This parameter
587
+ # only specifies the absolute maximum number of tokens to generate.
588
+ #
589
+ # Different models have different maximum values for this parameter. See
590
+ # [models](https://docs.anthropic.com/en/docs/models-overview) for details.
591
+ max_tokens:,
592
+ # Input messages.
593
+ #
594
+ # Our models are trained to operate on alternating `user` and `assistant`
595
+ # conversational turns. When creating a new `Message`, you specify the prior
596
+ # conversational turns with the `messages` parameter, and the model then generates
597
+ # the next `Message` in the conversation. Consecutive `user` or `assistant` turns
598
+ # in your request will be combined into a single turn.
599
+ #
600
+ # Each input message must be an object with a `role` and `content`. You can
601
+ # specify a single `user`-role message, or you can include multiple `user` and
602
+ # `assistant` messages.
603
+ #
604
+ # If the final message uses the `assistant` role, the response content will
605
+ # continue immediately from the content in that message. This can be used to
606
+ # constrain part of the model's response.
607
+ #
608
+ # Example with a single `user` message:
609
+ #
610
+ # ```json
611
+ # [{ "role": "user", "content": "Hello, Claude" }]
612
+ # ```
613
+ #
614
+ # Example with multiple conversational turns:
615
+ #
616
+ # ```json
617
+ # [
618
+ # { "role": "user", "content": "Hello there." },
619
+ # { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" },
620
+ # { "role": "user", "content": "Can you explain LLMs in plain English?" }
621
+ # ]
622
+ # ```
623
+ #
624
+ # Example with a partially-filled response from Claude:
625
+ #
626
+ # ```json
627
+ # [
628
+ # {
629
+ # "role": "user",
630
+ # "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"
631
+ # },
632
+ # { "role": "assistant", "content": "The best answer is (" }
633
+ # ]
634
+ # ```
635
+ #
636
+ # Each input message `content` may be either a single `string` or an array of
637
+ # content blocks, where each block has a specific `type`. Using a `string` for
638
+ # `content` is shorthand for an array of one content block of type `"text"`. The
639
+ # following input messages are equivalent:
640
+ #
641
+ # ```json
642
+ # { "role": "user", "content": "Hello, Claude" }
643
+ # ```
644
+ #
645
+ # ```json
646
+ # { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
647
+ # ```
648
+ #
649
+ # Starting with Claude 3 models, you can also send image content blocks:
650
+ #
651
+ # ```json
652
+ # {
653
+ # "role": "user",
654
+ # "content": [
655
+ # {
656
+ # "type": "image",
657
+ # "source": {
658
+ # "type": "base64",
659
+ # "media_type": "image/jpeg",
660
+ # "data": "/9j/4AAQSkZJRg..."
661
+ # }
662
+ # },
663
+ # { "type": "text", "text": "What is in this image?" }
664
+ # ]
665
+ # }
666
+ # ```
667
+ #
668
+ # We currently support the `base64` source type for images, and the `image/jpeg`,
669
+ # `image/png`, `image/gif`, and `image/webp` media types.
670
+ #
671
+ # See [examples](https://docs.anthropic.com/en/api/messages-examples#vision) for
672
+ # more input examples.
673
+ #
674
+ # Note that if you want to include a
675
+ # [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
676
+ # the top-level `system` parameter — there is no `"system"` role for input
677
+ # messages in the Messages API.
678
+ #
679
+ # There is a limit of 100000 messages in a single request.
680
+ messages:,
681
+ # The model that will complete your prompt.\n\nSee
682
+ # [models](https://docs.anthropic.com/en/docs/models-overview) for additional
683
+ # details and options.
684
+ model:,
685
+ # An object describing metadata about the request.
686
+ metadata: nil,
687
+ # Custom text sequences that will cause the model to stop generating.
688
+ #
689
+ # Our models will normally stop when they have naturally completed their turn,
690
+ # which will result in a response `stop_reason` of `"end_turn"`.
691
+ #
692
+ # If you want the model to stop generating when it encounters custom strings of
693
+ # text, you can use the `stop_sequences` parameter. If the model encounters one of
694
+ # the custom sequences, the response `stop_reason` value will be `"stop_sequence"`
695
+ # and the response `stop_sequence` value will contain the matched stop sequence.
696
+ stop_sequences: nil,
697
+ # Whether to incrementally stream the response using server-sent events.
698
+ #
699
+ # See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for
700
+ # details.
701
+ stream: nil,
702
+ # System prompt.
703
+ #
704
+ # A system prompt is a way of providing context and instructions to Claude, such
705
+ # as specifying a particular goal or role. See our
706
+ # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
707
+ system_: nil,
708
+ # Amount of randomness injected into the response.
709
+ #
710
+ # Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0`
711
+ # for analytical / multiple choice, and closer to `1.0` for creative and
712
+ # generative tasks.
713
+ #
714
+ # Note that even with `temperature` of `0.0`, the results will not be fully
715
+ # deterministic.
716
+ temperature: nil,
717
+ # Configuration for enabling Claude's extended thinking.
718
+ #
719
+ # When enabled, responses include `thinking` content blocks showing Claude's
720
+ # thinking process before the final answer. Requires a minimum budget of 1,024
721
+ # tokens and counts towards your `max_tokens` limit.
722
+ #
723
+ # See
724
+ # [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
725
+ # for details.
726
+ thinking: nil,
727
+ # How the model should use the provided tools. The model can use a specific tool,
728
+ # any available tool, decide by itself, or not use tools at all.
729
+ tool_choice: nil,
730
+ # Definitions of tools that the model may use.
731
+ #
732
+ # If you include `tools` in your API request, the model may return `tool_use`
733
+ # content blocks that represent the model's use of those tools. You can then run
734
+ # those tools using the tool input generated by the model and then optionally
735
+ # return results back to the model using `tool_result` content blocks.
736
+ #
737
+ # Each tool definition includes:
738
+ #
739
+ # - `name`: Name of the tool.
740
+ # - `description`: Optional, but strongly-recommended description of the tool.
741
+ # - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the
742
+ # tool `input` shape that the model will produce in `tool_use` output content
743
+ # blocks.
744
+ #
745
+ # For example, if you defined `tools` as:
746
+ #
747
+ # ```json
748
+ # [
749
+ # {
750
+ # "name": "get_stock_price",
751
+ # "description": "Get the current stock price for a given ticker symbol.",
752
+ # "input_schema": {
753
+ # "type": "object",
754
+ # "properties": {
755
+ # "ticker": {
756
+ # "type": "string",
757
+ # "description": "The stock ticker symbol, e.g. AAPL for Apple Inc."
758
+ # }
759
+ # },
760
+ # "required": ["ticker"]
761
+ # }
762
+ # }
763
+ # ]
764
+ # ```
765
+ #
766
+ # And then asked the model "What's the S&P 500 at today?", the model might produce
767
+ # `tool_use` content blocks in the response like this:
768
+ #
769
+ # ```json
770
+ # [
771
+ # {
772
+ # "type": "tool_use",
773
+ # "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
774
+ # "name": "get_stock_price",
775
+ # "input": { "ticker": "^GSPC" }
776
+ # }
777
+ # ]
778
+ # ```
779
+ #
780
+ # You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an
781
+ # input, and return the following back to the model in a subsequent `user`
782
+ # message:
783
+ #
784
+ # ```json
785
+ # [
786
+ # {
787
+ # "type": "tool_result",
788
+ # "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV",
789
+ # "content": "259.75 USD"
790
+ # }
791
+ # ]
792
+ # ```
793
+ #
794
+ # Tools can be used for workflows that include running client-side tools and
795
+ # functions, or more generally whenever you want the model to produce a particular
796
+ # JSON structure of output.
797
+ #
798
+ # See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
799
+ tools: nil,
800
+ # Only sample from the top K options for each subsequent token.
801
+ #
802
+ # Used to remove "long tail" low probability responses.
803
+ # [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277).
804
+ #
805
+ # Recommended for advanced use cases only. You usually only need to use
806
+ # `temperature`.
807
+ top_k: nil,
808
+ # Use nucleus sampling.
809
+ #
810
+ # In nucleus sampling, we compute the cumulative distribution over all the options
811
+ # for each subsequent token in decreasing probability order and cut it off once it
812
+ # reaches a particular probability specified by `top_p`. You should either alter
813
+ # `temperature` or `top_p`, but not both.
814
+ #
815
+ # Recommended for advanced use cases only. You usually only need to use
816
+ # `temperature`.
817
+ top_p: nil
818
+ )
819
+ end
820
+
821
+ sig do
822
+ override.returns(
823
+ {
824
+ max_tokens: Integer,
825
+ messages: T::Array[Anthropic::Beta::BetaMessageParam],
826
+ model: T.any(Anthropic::Model::OrSymbol, String),
827
+ metadata: Anthropic::Beta::BetaMetadata,
828
+ stop_sequences: T::Array[String],
829
+ stream: T::Boolean,
830
+ system_:
831
+ T.any(
832
+ String,
833
+ T::Array[Anthropic::Beta::BetaTextBlockParam]
834
+ ),
835
+ temperature: Float,
836
+ thinking:
837
+ T.any(
838
+ Anthropic::Beta::BetaThinkingConfigEnabled,
839
+ Anthropic::Beta::BetaThinkingConfigDisabled
840
+ ),
841
+ tool_choice:
842
+ T.any(
843
+ Anthropic::Beta::BetaToolChoiceAuto,
844
+ Anthropic::Beta::BetaToolChoiceAny,
845
+ Anthropic::Beta::BetaToolChoiceTool,
846
+ Anthropic::Beta::BetaToolChoiceNone
847
+ ),
848
+ tools:
849
+ T::Array[
850
+ T.any(
851
+ Anthropic::Beta::BetaTool,
852
+ Anthropic::Beta::BetaToolComputerUse20241022,
853
+ Anthropic::Beta::BetaToolBash20241022,
854
+ Anthropic::Beta::BetaToolTextEditor20241022,
855
+ Anthropic::Beta::BetaToolComputerUse20250124,
856
+ Anthropic::Beta::BetaToolBash20250124,
857
+ Anthropic::Beta::BetaToolTextEditor20250124,
858
+ Anthropic::Beta::BetaWebSearchTool20250305
859
+ )
860
+ ],
861
+ top_k: Integer,
862
+ top_p: Float
863
+ }
864
+ )
865
+ end
866
+ def to_hash
867
+ end
868
+
869
+ # System prompt.
870
+ #
871
+ # A system prompt is a way of providing context and instructions to Claude, such
872
+ # as specifying a particular goal or role. See our
873
+ # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
874
+ module System
875
+ extend Anthropic::Internal::Type::Union
876
+
877
+ Variants =
878
+ T.type_alias do
879
+ T.any(String, T::Array[Anthropic::Beta::BetaTextBlockParam])
880
+ end
881
+
882
+ sig do
883
+ override.returns(
884
+ T::Array[
885
+ Anthropic::Beta::Messages::BatchCreateParams::Request::Params::System::Variants
886
+ ]
887
+ )
888
+ end
889
+ def self.variants
890
+ end
891
+
892
+ BetaTextBlockParamArray =
893
+ T.let(
894
+ Anthropic::Internal::Type::ArrayOf[
895
+ Anthropic::Beta::BetaTextBlockParam
896
+ ],
897
+ Anthropic::Internal::Type::Converter
898
+ )
899
+ end
900
+ end
901
+ end
902
+ end
903
+ end
904
+ end
905
+ end
906
+ end