anthropic 1.66.0 → 1.68.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +69 -0
  3. data/README.md +1 -1
  4. data/lib/anthropic/file_part.rb +1 -1
  5. data/lib/anthropic/helpers/refusal_fallback.rb +40 -17
  6. data/lib/anthropic/helpers/streaming/message_stream.rb +9 -4
  7. data/lib/anthropic/helpers/tools/runner.rb +9 -1
  8. data/lib/anthropic/internal/page.rb +5 -5
  9. data/lib/anthropic/internal/token_page.rb +3 -1
  10. data/lib/anthropic/models/anthropic_beta.rb +9 -0
  11. data/lib/anthropic/models/beta/beta_browser_toolset_20260801.rb +1 -28
  12. data/lib/anthropic/models/beta/beta_computer_toolset_20260801.rb +1 -28
  13. data/lib/anthropic/models/beta/beta_container.rb +5 -3
  14. data/lib/anthropic/models/beta/beta_container_skill.rb +51 -0
  15. data/lib/anthropic/models/beta/{skill_delete_response.rb → beta_deleted_skill.rb} +8 -6
  16. data/lib/anthropic/models/beta/beta_dreaming_error.rb +105 -0
  17. data/lib/anthropic/models/beta/beta_fallback_param.rb +2 -0
  18. data/lib/anthropic/models/beta/beta_file_metadata.rb +11 -1
  19. data/lib/anthropic/models/beta/beta_managed_agents_deployment_run.rb +3 -3
  20. data/lib/anthropic/models/beta/beta_managed_agents_model.rb +5 -0
  21. data/lib/anthropic/models/beta/beta_managed_agents_outcome_evaluation_resource.rb +5 -5
  22. data/lib/anthropic/models/beta/beta_managed_agents_session.rb +2 -2
  23. data/lib/anthropic/models/beta/beta_managed_agents_session_stats.rb +2 -2
  24. data/lib/anthropic/models/beta/beta_message.rb +27 -1
  25. data/lib/anthropic/models/beta/beta_message_param.rb +48 -1
  26. data/lib/anthropic/models/beta/beta_raw_message_delta_event.rb +27 -1
  27. data/lib/anthropic/models/beta/beta_raw_message_stream_event.rb +2 -0
  28. data/lib/anthropic/models/beta/beta_skill.rb +59 -24
  29. data/lib/anthropic/models/beta/beta_skill_source.rb +52 -0
  30. data/lib/anthropic/models/beta/beta_system_message_output_config.rb +42 -0
  31. data/lib/anthropic/models/beta/beta_target_store_held_error.rb +39 -0
  32. data/lib/anthropic/models/beta/beta_thinking_block_binding.rb +33 -0
  33. data/lib/anthropic/models/beta/beta_thinking_config_adaptive.rb +11 -1
  34. data/lib/anthropic/models/beta/beta_thinking_config_enabled.rb +11 -1
  35. data/lib/anthropic/models/beta/beta_thinking_config_param.rb +2 -0
  36. data/lib/anthropic/models/beta/beta_thinking_dropped_input_transformation.rb +81 -0
  37. data/lib/anthropic/models/beta/beta_thinking_prefix_mismatch_behavior.rb +24 -0
  38. data/lib/anthropic/models/beta/beta_user_profile.rb +11 -29
  39. data/lib/anthropic/models/beta/deployment_list_params.rb +3 -3
  40. data/lib/anthropic/models/beta/deployment_run_list_params.rb +7 -8
  41. data/lib/anthropic/models/beta/file_list_params.rb +19 -16
  42. data/lib/anthropic/models/beta/file_upload_params.rb +13 -1
  43. data/lib/anthropic/models/beta/memory_stores/memory_create_params.rb +2 -1
  44. data/lib/anthropic/models/beta/memory_stores/memory_update_params.rb +4 -3
  45. data/lib/anthropic/models/beta/organization/beta_aws_external_key_config.rb +8 -5
  46. data/lib/anthropic/models/beta/organization/beta_compliance_settings.rb +74 -0
  47. data/lib/anthropic/models/beta/organization/beta_compliance_settings_state_disabled.rb +19 -0
  48. data/lib/anthropic/models/beta/organization/beta_compliance_settings_state_disabled_param.rb +19 -0
  49. data/lib/anthropic/models/beta/organization/beta_compliance_settings_state_enabled.rb +19 -0
  50. data/lib/anthropic/models/beta/organization/beta_compliance_settings_state_enabled_param.rb +19 -0
  51. data/lib/anthropic/models/beta/organization/beta_external_key.rb +2 -2
  52. data/lib/anthropic/models/beta/organization/beta_workspace.rb +14 -6
  53. data/lib/anthropic/models/beta/organization/compliance_setting_retrieve_params.rb +18 -0
  54. data/lib/anthropic/models/beta/organization/compliance_setting_update_params.rb +76 -0
  55. data/lib/anthropic/models/beta/organization/external_key_create_params.rb +2 -2
  56. data/lib/anthropic/models/beta/organization/external_key_update_params.rb +2 -2
  57. data/lib/anthropic/models/beta/organization/rate_limit_list_params.rb +2 -2
  58. data/lib/anthropic/models/beta/organization/workspace_create_params.rb +8 -4
  59. data/lib/anthropic/models/beta/organization/workspace_update_params.rb +8 -4
  60. data/lib/anthropic/models/beta/organization/workspaces/rate_limit_list_params.rb +2 -2
  61. data/lib/anthropic/models/beta/session_list_params.rb +7 -7
  62. data/lib/anthropic/models/beta/sessions/event_list_params.rb +5 -5
  63. data/lib/anthropic/models/beta/sessions/resource_list_params.rb +2 -2
  64. data/lib/anthropic/models/beta/sessions/thread_list_params.rb +2 -2
  65. data/lib/anthropic/models/beta/skill_create_params.rb +7 -8
  66. data/lib/anthropic/models/beta/skill_list_params.rb +1 -1
  67. data/lib/anthropic/models/beta/skills/beta_deleted_skill_version.rb +35 -0
  68. data/lib/anthropic/models/beta/skills/beta_skill_version.rb +74 -0
  69. data/lib/anthropic/models/beta/skills/version_delete_params.rb +4 -3
  70. data/lib/anthropic/models/beta/skills/version_download_params.rb +4 -3
  71. data/lib/anthropic/models/beta/skills/version_list_params.rb +3 -3
  72. data/lib/anthropic/models/beta/skills/version_retrieve_params.rb +5 -3
  73. data/lib/anthropic/models/beta/unwrap_webhook_event.rb +2 -33
  74. data/lib/anthropic/models/beta/user_profile_create_params.rb +11 -27
  75. data/lib/anthropic/models/beta/user_profile_list_params.rb +20 -1
  76. data/lib/anthropic/models/beta/user_profile_update_params.rb +9 -29
  77. data/lib/anthropic/models/beta/webhook_parse_unverified_params.rb +16 -0
  78. data/lib/anthropic/models/browser_toolset_20260801.rb +1 -28
  79. data/lib/anthropic/models/computer_toolset_20260801.rb +1 -28
  80. data/lib/anthropic/models/model.rb +10 -0
  81. data/lib/anthropic/resources/beta/deployment_runs.rb +2 -2
  82. data/lib/anthropic/resources/beta/deployments.rb +1 -1
  83. data/lib/anthropic/resources/beta/files.rb +18 -13
  84. data/lib/anthropic/resources/beta/organization/compliance_settings.rb +79 -0
  85. data/lib/anthropic/resources/beta/organization/rate_limits.rb +2 -3
  86. data/lib/anthropic/resources/beta/organization/workspaces/rate_limits.rb +2 -3
  87. data/lib/anthropic/resources/beta/organization.rb +4 -0
  88. data/lib/anthropic/resources/beta/sessions/events.rb +1 -1
  89. data/lib/anthropic/resources/beta/sessions/resources.rb +1 -1
  90. data/lib/anthropic/resources/beta/sessions/threads.rb +1 -1
  91. data/lib/anthropic/resources/beta/sessions.rb +3 -3
  92. data/lib/anthropic/resources/beta/skills/versions.rb +17 -17
  93. data/lib/anthropic/resources/beta/skills.rb +14 -14
  94. data/lib/anthropic/resources/beta/user_profiles.rb +10 -8
  95. data/lib/anthropic/resources/beta/webhooks.rb +17 -2
  96. data/lib/anthropic/version.rb +1 -1
  97. data/lib/anthropic.rb +21 -9
  98. data/rbi/anthropic/helpers/tools/runner.rbi +5 -1
  99. data/rbi/anthropic/models/anthropic_beta.rbi +15 -0
  100. data/rbi/anthropic/models/beta/beta_browser_toolset_20260801.rbi +0 -81
  101. data/rbi/anthropic/models/beta/beta_computer_toolset_20260801.rbi +0 -81
  102. data/rbi/anthropic/models/beta/beta_container.rbi +6 -3
  103. data/rbi/anthropic/models/beta/beta_container_skill.rbi +91 -0
  104. data/rbi/anthropic/models/beta/{skill_delete_response.rbi → beta_deleted_skill.rbi} +8 -6
  105. data/rbi/anthropic/models/beta/beta_dreaming_error.rbi +128 -0
  106. data/rbi/anthropic/models/beta/beta_fallback_param.rbi +6 -0
  107. data/rbi/anthropic/models/beta/beta_file_metadata.rbi +12 -0
  108. data/rbi/anthropic/models/beta/beta_managed_agents_deployment_run.rbi +4 -4
  109. data/rbi/anthropic/models/beta/beta_managed_agents_model.rbi +7 -0
  110. data/rbi/anthropic/models/beta/beta_managed_agents_outcome_evaluation_resource.rbi +7 -7
  111. data/rbi/anthropic/models/beta/beta_managed_agents_session.rbi +2 -2
  112. data/rbi/anthropic/models/beta/beta_managed_agents_session_stats.rbi +2 -2
  113. data/rbi/anthropic/models/beta/beta_message.rbi +53 -1
  114. data/rbi/anthropic/models/beta/beta_message_param.rbi +93 -3
  115. data/rbi/anthropic/models/beta/beta_raw_message_delta_event.rbi +53 -1
  116. data/rbi/anthropic/models/beta/beta_raw_message_stream_event.rbi +22 -0
  117. data/rbi/anthropic/models/beta/beta_skill.rbi +82 -42
  118. data/rbi/anthropic/models/beta/beta_skill_source.rbi +97 -0
  119. data/rbi/anthropic/models/beta/beta_system_message_output_config.rbi +111 -0
  120. data/rbi/anthropic/models/beta/beta_target_store_held_error.rbi +50 -0
  121. data/rbi/anthropic/models/beta/beta_thinking_block_binding.rbi +67 -0
  122. data/rbi/anthropic/models/beta/beta_thinking_config_adaptive.rbi +22 -0
  123. data/rbi/anthropic/models/beta/beta_thinking_config_enabled.rbi +22 -0
  124. data/rbi/anthropic/models/beta/beta_thinking_config_param.rbi +6 -0
  125. data/rbi/anthropic/models/beta/beta_thinking_dropped_input_transformation.rbi +152 -0
  126. data/rbi/anthropic/models/beta/beta_thinking_prefix_mismatch_behavior.rbi +46 -0
  127. data/rbi/anthropic/models/beta/beta_user_profile.rbi +15 -74
  128. data/rbi/anthropic/models/beta/beta_webhook_event.rbi +2 -97
  129. data/rbi/anthropic/models/beta/deployment_list_params.rbi +4 -4
  130. data/rbi/anthropic/models/beta/deployment_run_list_params.rbi +10 -10
  131. data/rbi/anthropic/models/beta/file_list_params.rbi +25 -25
  132. data/rbi/anthropic/models/beta/file_upload_params.rbi +13 -0
  133. data/rbi/anthropic/models/beta/memory_stores/memory_create_params.rbi +4 -2
  134. data/rbi/anthropic/models/beta/memory_stores/memory_update_params.rbi +8 -6
  135. data/rbi/anthropic/models/beta/organization/beta_aws_external_key_config.rbi +12 -6
  136. data/rbi/anthropic/models/beta/organization/beta_compliance_settings.rbi +126 -0
  137. data/rbi/anthropic/models/beta/organization/beta_compliance_settings_state_disabled.rbi +30 -0
  138. data/rbi/anthropic/models/beta/organization/beta_compliance_settings_state_disabled_param.rbi +30 -0
  139. data/rbi/anthropic/models/beta/organization/beta_compliance_settings_state_enabled.rbi +30 -0
  140. data/rbi/anthropic/models/beta/organization/beta_compliance_settings_state_enabled_param.rbi +30 -0
  141. data/rbi/anthropic/models/beta/organization/beta_external_key.rbi +6 -3
  142. data/rbi/anthropic/models/beta/organization/beta_workspace.rbi +28 -12
  143. data/rbi/anthropic/models/beta/organization/compliance_setting_retrieve_params.rbi +36 -0
  144. data/rbi/anthropic/models/beta/organization/compliance_setting_update_params.rbi +135 -0
  145. data/rbi/anthropic/models/beta/organization/external_key_create_params.rbi +6 -3
  146. data/rbi/anthropic/models/beta/organization/external_key_update_params.rbi +6 -3
  147. data/rbi/anthropic/models/beta/organization/rate_limit_list_params.rbi +4 -4
  148. data/rbi/anthropic/models/beta/organization/workspace_create_params.rbi +16 -8
  149. data/rbi/anthropic/models/beta/organization/workspace_update_params.rbi +16 -8
  150. data/rbi/anthropic/models/beta/organization/workspaces/rate_limit_list_params.rbi +4 -4
  151. data/rbi/anthropic/models/beta/session_list_params.rbi +7 -7
  152. data/rbi/anthropic/models/beta/sessions/event_list_params.rbi +5 -5
  153. data/rbi/anthropic/models/beta/sessions/resource_list_params.rbi +2 -2
  154. data/rbi/anthropic/models/beta/sessions/thread_list_params.rbi +2 -2
  155. data/rbi/anthropic/models/beta/skill_create_params.rbi +10 -12
  156. data/rbi/anthropic/models/beta/skill_list_params.rbi +2 -2
  157. data/rbi/anthropic/models/beta/skills/{version_delete_response.rbi → beta_deleted_skill_version.rbi} +10 -12
  158. data/rbi/anthropic/models/beta/skills/beta_skill_version.rbi +104 -0
  159. data/rbi/anthropic/models/beta/skills/version_delete_params.rbi +6 -4
  160. data/rbi/anthropic/models/beta/skills/version_download_params.rbi +6 -4
  161. data/rbi/anthropic/models/beta/skills/version_list_params.rbi +4 -4
  162. data/rbi/anthropic/models/beta/skills/version_retrieve_params.rbi +8 -4
  163. data/rbi/anthropic/models/beta/unwrap_webhook_event.rbi +1 -102
  164. data/rbi/anthropic/models/beta/user_profile_create_params.rbi +15 -74
  165. data/rbi/anthropic/models/beta/user_profile_list_params.rbi +52 -0
  166. data/rbi/anthropic/models/beta/user_profile_update_params.rbi +11 -66
  167. data/rbi/anthropic/models/beta/webhook_parse_unverified_params.rbi +32 -0
  168. data/rbi/anthropic/models/browser_toolset_20260801.rbi +0 -74
  169. data/rbi/anthropic/models/computer_toolset_20260801.rbi +0 -78
  170. data/rbi/anthropic/models/model.rbi +8 -0
  171. data/rbi/anthropic/resources/beta/deployment_runs.rbi +5 -5
  172. data/rbi/anthropic/resources/beta/deployments.rbi +3 -2
  173. data/rbi/anthropic/resources/beta/files.rbi +17 -9
  174. data/rbi/anthropic/resources/beta/memory_stores/memories.rbi +6 -4
  175. data/rbi/anthropic/resources/beta/organization/compliance_settings.rbi +61 -0
  176. data/rbi/anthropic/resources/beta/organization/rate_limits.rbi +4 -5
  177. data/rbi/anthropic/resources/beta/organization/workspaces/rate_limits.rbi +4 -5
  178. data/rbi/anthropic/resources/beta/organization/workspaces.rbi +14 -6
  179. data/rbi/anthropic/resources/beta/organization.rbi +5 -0
  180. data/rbi/anthropic/resources/beta/sessions/events.rbi +2 -2
  181. data/rbi/anthropic/resources/beta/sessions/resources.rbi +1 -1
  182. data/rbi/anthropic/resources/beta/sessions/threads.rbi +1 -1
  183. data/rbi/anthropic/resources/beta/sessions.rbi +4 -4
  184. data/rbi/anthropic/resources/beta/skills/versions.rbi +16 -12
  185. data/rbi/anthropic/resources/beta/skills.rbi +10 -15
  186. data/rbi/anthropic/resources/beta/user_profiles.rbi +12 -19
  187. data/rbi/anthropic/resources/beta/webhooks.rbi +15 -1
  188. data/sig/anthropic/models/anthropic_beta.rbs +6 -0
  189. data/sig/anthropic/models/beta/beta_browser_toolset_20260801.rbs +0 -26
  190. data/sig/anthropic/models/beta/beta_computer_toolset_20260801.rbs +0 -26
  191. data/sig/anthropic/models/beta/beta_container.rbs +4 -4
  192. data/sig/anthropic/models/beta/beta_container_skill.rbs +45 -0
  193. data/sig/anthropic/models/beta/beta_deleted_skill.rbs +19 -0
  194. data/sig/anthropic/models/beta/beta_dreaming_error.rbs +100 -0
  195. data/sig/anthropic/models/beta/beta_fallback_param.rbs +3 -0
  196. data/sig/anthropic/models/beta/beta_file_metadata.rbs +5 -0
  197. data/sig/anthropic/models/beta/beta_managed_agents_model.rbs +5 -1
  198. data/sig/anthropic/models/beta/beta_message.rbs +7 -2
  199. data/sig/anthropic/models/beta/beta_message_param.rbs +24 -3
  200. data/sig/anthropic/models/beta/beta_raw_message_delta_event.rbs +7 -2
  201. data/sig/anthropic/models/beta/beta_raw_message_stream_event.rbs +3 -1
  202. data/sig/anthropic/models/beta/beta_skill.rbs +32 -23
  203. data/sig/anthropic/models/beta/beta_skill_source.rbs +35 -0
  204. data/sig/anthropic/models/beta/beta_system_message_output_config.rbs +38 -0
  205. data/sig/anthropic/models/beta/beta_target_store_held_error.rbs +22 -0
  206. data/sig/anthropic/models/beta/beta_thinking_block_binding.rbs +24 -0
  207. data/sig/anthropic/models/beta/beta_thinking_config_adaptive.rbs +5 -0
  208. data/sig/anthropic/models/beta/beta_thinking_config_enabled.rbs +5 -0
  209. data/sig/anthropic/models/beta/beta_thinking_config_param.rbs +3 -0
  210. data/sig/anthropic/models/beta/beta_thinking_dropped_input_transformation.rbs +51 -0
  211. data/sig/anthropic/models/beta/beta_thinking_prefix_mismatch_behavior.rbs +18 -0
  212. data/sig/anthropic/models/beta/beta_user_profile.rbs +8 -24
  213. data/sig/anthropic/models/beta/file_list_params.rbs +9 -13
  214. data/sig/anthropic/models/beta/file_upload_params.rbs +7 -0
  215. data/sig/anthropic/models/beta/organization/beta_compliance_settings.rbs +61 -0
  216. data/sig/anthropic/models/beta/organization/beta_compliance_settings_state_disabled.rbs +17 -0
  217. data/sig/anthropic/models/beta/organization/beta_compliance_settings_state_disabled_param.rbs +17 -0
  218. data/sig/anthropic/models/beta/organization/beta_compliance_settings_state_enabled.rbs +17 -0
  219. data/sig/anthropic/models/beta/organization/beta_compliance_settings_state_enabled_param.rbs +17 -0
  220. data/sig/anthropic/models/beta/organization/compliance_setting_retrieve_params.rbs +19 -0
  221. data/sig/anthropic/models/beta/organization/compliance_setting_update_params.rbs +62 -0
  222. data/sig/anthropic/models/beta/skill_create_params.rbs +4 -4
  223. data/sig/anthropic/models/beta/skills/beta_deleted_skill_version.rbs +20 -0
  224. data/sig/anthropic/models/beta/skills/{version_list_response.rbs → beta_skill_version.rbs} +10 -20
  225. data/sig/anthropic/models/beta/unwrap_webhook_event.rbs +1 -31
  226. data/sig/anthropic/models/beta/user_profile_create_params.rbs +7 -21
  227. data/sig/anthropic/models/beta/user_profile_list_params.rbs +20 -0
  228. data/sig/anthropic/models/beta/user_profile_update_params.rbs +7 -17
  229. data/sig/anthropic/models/beta/webhook_parse_unverified_params.rbs +17 -0
  230. data/sig/anthropic/models/browser_toolset_20260801.rbs +0 -26
  231. data/sig/anthropic/models/computer_toolset_20260801.rbs +0 -26
  232. data/sig/anthropic/models/model.rbs +9 -1
  233. data/sig/anthropic/resources/beta/files.rbs +4 -3
  234. data/sig/anthropic/resources/beta/organization/compliance_settings.rbs +20 -0
  235. data/sig/anthropic/resources/beta/organization.rbs +2 -0
  236. data/sig/anthropic/resources/beta/skills/versions.rbs +4 -4
  237. data/sig/anthropic/resources/beta/skills.rbs +5 -5
  238. data/sig/anthropic/resources/beta/user_profiles.rbs +3 -2
  239. data/sig/anthropic/resources/beta/webhooks.rbs +5 -1
  240. metadata +62 -26
  241. data/lib/anthropic/models/beta/skill_create_response.rb +0 -84
  242. data/lib/anthropic/models/beta/skill_list_response.rb +0 -84
  243. data/lib/anthropic/models/beta/skill_retrieve_response.rb +0 -84
  244. data/lib/anthropic/models/beta/skills/version_create_response.rb +0 -92
  245. data/lib/anthropic/models/beta/skills/version_delete_response.rb +0 -36
  246. data/lib/anthropic/models/beta/skills/version_list_response.rb +0 -92
  247. data/lib/anthropic/models/beta/skills/version_retrieve_response.rb +0 -92
  248. data/rbi/anthropic/models/beta/skill_create_response.rbi +0 -118
  249. data/rbi/anthropic/models/beta/skill_list_response.rbi +0 -118
  250. data/rbi/anthropic/models/beta/skill_retrieve_response.rbi +0 -118
  251. data/rbi/anthropic/models/beta/skills/version_create_response.rbi +0 -124
  252. data/rbi/anthropic/models/beta/skills/version_list_response.rbi +0 -124
  253. data/rbi/anthropic/models/beta/skills/version_retrieve_response.rbi +0 -124
  254. data/sig/anthropic/models/beta/skill_create_response.rbs +0 -52
  255. data/sig/anthropic/models/beta/skill_delete_response.rbs +0 -17
  256. data/sig/anthropic/models/beta/skill_list_response.rbs +0 -52
  257. data/sig/anthropic/models/beta/skill_retrieve_response.rbs +0 -52
  258. data/sig/anthropic/models/beta/skills/version_create_response.rbs +0 -59
  259. data/sig/anthropic/models/beta/skills/version_delete_response.rbs +0 -19
  260. data/sig/anthropic/models/beta/skills/version_retrieve_response.rbs +0 -59
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f45a7ee01314d90d9920b9c21551671f671c6e74465bc056767bc699c26bf4bf
4
- data.tar.gz: 0cb4ec43a40c532ff2d39ca8c2ecc22e2ab78fba1f4f1b2b3a1f65d19a3c7488
3
+ metadata.gz: f18393a5346183924cb40cde07ffe456233828d8e35d275a709907f3c4a2a8ca
4
+ data.tar.gz: 5d1456c7ebd607a7e7a938ca104f714e09417668df1275c2ae0d792fda617ac5
5
5
  SHA512:
6
- metadata.gz: 1cc6716a2b71193d96c6233d1dcc196d885e0f1dc535fdec12a2738a5e43d1efd6a95505298fff1de1c0189111b2fc0dd9365ebedae76e95284efd7c691a8246
7
- data.tar.gz: b49310dbf192db9da8323c8ec9a9e25c414e17abcbebcb765bf248ede85327002f41edb51468d13784b94a57acc287cd9da32d03d87775530236898013a147bc
6
+ metadata.gz: 9544c29f75c2d93161e1ef5934ba1861ca537167793393edfe643208cb98a38cdc3f9b390ab5ad3a0d2efa7c4ab3c59b7a7dd159b78a20b5a240e76952530923
7
+ data.tar.gz: 0b8e7fd35dcf7e1c4dd220a21af9acd65eedac541a9ff8e891e776951a4d9af8197cd7904347de33d0d9267b28f95bfe2b8bf16adf8162228518c6999c658372
data/CHANGELOG.md CHANGED
@@ -1,5 +1,74 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.68.0 (2026-09-01)
4
+
5
+ Full Changelog: [v1.67.0...v1.68.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.67.0...v1.68.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** add external_user_onboarded_at to user profiles ([c3d7807](https://github.com/anthropics/anthropic-sdk-ruby/commit/c3d78070359ab01391ec7c2e394ca88ab132f5e1))
10
+ * **api:** add support for claude-fable-5-1 and claude-mythos-5-1 ([de42ce6](https://github.com/anthropics/anthropic-sdk-ruby/commit/de42ce6930c2b9ebd28e4f02c4c67182f9468f83))
11
+ * **api:** add support for organization compliance settings in the Admin API ([3e7aedf](https://github.com/anthropics/anthropic-sdk-ruby/commit/3e7aedf3650f7b866a4c2c84bf886bb89181fbfc))
12
+ * **api:** support pagination on organization rate limit list endpoints ([c3d7807](https://github.com/anthropics/anthropic-sdk-ruby/commit/c3d78070359ab01391ec7c2e394ca88ab132f5e1))
13
+ * **user_profiles:** sort the user profile list by name with order_by=name ([4a84a93](https://github.com/anthropics/anthropic-sdk-ruby/commit/4a84a934d9c94b28fa4dc95e91288eda5c11e0b9))
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * **api:** mark the beta header required on Admin API Tunnel operations ([9fa2c88](https://github.com/anthropics/anthropic-sdk-ruby/commit/9fa2c887f939ef20e227160fa09b1bbae0f8e099))
19
+ * **api:** remove unsupported allowed_callers from the toolset entries ([cda00aa](https://github.com/anthropics/anthropic-sdk-ruby/commit/cda00aad4543f76eb94d5f92412d0f96cfff0046))
20
+ * **client:** resolve custom request paths against the base URL correctly ([032ea6d](https://github.com/anthropics/anthropic-sdk-ruby/commit/032ea6d34c0b60036f2607ce5ed4c933db2c3a85))
21
+ * **client:** send the file's base name when wrapping an opened file in FilePart ([a768bac](https://github.com/anthropics/anthropic-sdk-ruby/commit/a768bacfa2d6a9c57dee2103d5c96d79d6501e52))
22
+
23
+
24
+ ### Chores
25
+
26
+ * **api:** remove unreleased thinking prefix_mismatched_behavior param ([8712e2b](https://github.com/anthropics/anthropic-sdk-ruby/commit/8712e2b22fc4bcdbda9ff9b7fb27d75fabfa8997))
27
+ * **api:** remove user profile relationship in favor of access_type ([8712e2b](https://github.com/anthropics/anthropic-sdk-ruby/commit/8712e2b22fc4bcdbda9ff9b7fb27d75fabfa8997))
28
+ * **ci:** keep the build + gem artifact upload job under stlc ([2aa054d](https://github.com/anthropics/anthropic-sdk-ruby/commit/2aa054daeb9027e8d5d5818050b4ce238c65e2fa))
29
+ * **docs:** clarify disallowed characters in memory paths ([a3be29e](https://github.com/anthropics/anthropic-sdk-ruby/commit/a3be29e12d8492bbcf93f0a9f7b6e16c01136418))
30
+ * **internal:** add browser-stubbed internal/node module and lint rule for Node built-in imports ([c3d7807](https://github.com/anthropics/anthropic-sdk-ruby/commit/c3d78070359ab01391ec7c2e394ca88ab132f5e1))
31
+ * **internal:** add CLAUDE.md contributor notes ([#172](https://github.com/anthropics/anthropic-sdk-ruby/issues/172)) ([eb09f00](https://github.com/anthropics/anthropic-sdk-ruby/commit/eb09f009e76d0da3cef56ee0c9d58d0caee7b3e4))
32
+ * **internal:** pin JAVA_HOME for detekt-rules tests and relax UnusedPrivateProperty for tests/examples ([c3d7807](https://github.com/anthropics/anthropic-sdk-ruby/commit/c3d78070359ab01391ec7c2e394ca88ab132f5e1))
33
+ * **internal:** read the request id shown in Terraform error diagnostics from the response header ([c3d7807](https://github.com/anthropics/anthropic-sdk-ruby/commit/c3d78070359ab01391ec7c2e394ca88ab132f5e1))
34
+ * **internal:** remove discriminator support from PropertyInfo ([3e7aedf](https://github.com/anthropics/anthropic-sdk-ruby/commit/3e7aedf3650f7b866a4c2c84bf886bb89181fbfc))
35
+ * **internal:** remove duplicated platforms from Gemfile.lock ([06b06d3](https://github.com/anthropics/anthropic-sdk-ruby/commit/06b06d3082923adce2ee5617426096e0ef7e1a2b))
36
+
37
+
38
+ ### Documentation
39
+
40
+ * **api:** backtick identifiers in managed-agents API descriptions ([49e29df](https://github.com/anthropics/anthropic-sdk-ruby/commit/49e29df7b9f0cecd1f5b3f93a1b3e24ff7824952))
41
+ * **api:** describe external_key_id and compartment_id behavior on Claude Platform on AWS ([88498ab](https://github.com/anthropics/anthropic-sdk-ruby/commit/88498ab6dd2d08f9f79d1dcb59bfa312de303a81))
42
+ * **changelog:** detail the beta files/skills GA-shape change ([#231](https://github.com/anthropics/anthropic-sdk-ruby/issues/231)) ([ce58f9f](https://github.com/anthropics/anthropic-sdk-ruby/commit/ce58f9fab8eb1ebe7e42151b62a0a55bf8bbeda5))
43
+
44
+ ## 1.67.0 (2026-08-27)
45
+
46
+ Full Changelog: [v1.66.0...v1.67.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.66.0...v1.67.0)
47
+
48
+ ### Features
49
+
50
+ * **api:** beta files/skills namespaces use GA shapes; drop dated beta header pins ([8c60f7a](https://github.com/anthropics/anthropic-sdk-ruby/commit/8c60f7ab13ee7a1c6fc1423a7a2b63d469048589))
51
+
52
+ The beta Files and Skills resources (`client.beta.files`, `client.beta.skills`) no longer send the `files-api-2025-04-14` / `skills-2025-10-02` headers and return the same shapes as `client.files` / `client.skills` (with `Beta`-prefixed model class names under `Anthropic::Beta`). Requests that still send those headers on raw HTTP keep receiving the beta shapes.
53
+
54
+ Changes in the beta resources:
55
+ - `client.beta.skills.delete(skill_id)` now deletes a Skill together with all of its versions (previously refused while any version existed). It returns `Anthropic::Beta::BetaDeletedSkill` (was `Anthropic::Models::Beta::SkillDeleteResponse`).
56
+ - Beta Messages class `Anthropic::Beta::BetaSkill` (container skill reference with `skill_id`, `type`, `version`) is renamed `Anthropic::Beta::BetaContainerSkill`. `Anthropic::Beta::BetaSkill` now names the Skill object returned by `client.beta.skills.create` / `retrieve` / `list` (replacing `SkillCreateResponse` / `SkillRetrieveResponse` / `SkillListResponse`), and skill versions are `Anthropic::Beta::Skills::BetaSkillVersion` / `BetaDeletedSkillVersion` (replacing `Version*Response`).
57
+ - `client.beta.files.list` returns an `Anthropic::Internal::PageCursor` (with `data` / `next_page_`) and paginates with `page:` / `ids:` (was an `Anthropic::Internal::Page` with `data`, `has_more`, `first_id`, `last_id` and `before_id:` / `after_id:`); `auto_paging_each` is unchanged. `BetaSkill` uses `display_name` (was `display_title`, also the `create` keyword) and `latest_version_id` (was `latest_version`), and `BetaSkillVersion` is addressed by its `skver_…` `id` (the Unix-timestamp `version` attribute is gone).
58
+
59
+ Migration guides: [Migrate from `files-api-2025-04-14`](https://platform.claude.com/docs/en/build-with-claude/files#migrate-from-files-api-2025-04-14) · [Migrate from `skills-2025-10-02`](https://platform.claude.com/docs/en/build-with-claude/skills-guide#migrate-from-skills-2025-10-02)
60
+
61
+
62
+ ### Bug Fixes
63
+
64
+ * **client:** follow the request direction and honor has_more when paginating ([8e5690f](https://github.com/anthropics/anthropic-sdk-ruby/commit/8e5690f643a523b4f2821105fd58cb176e5b2031))
65
+ * **webhooks:** require headers to be passed to `unwrap()` ([8b88482](https://github.com/anthropics/anthropic-sdk-ruby/commit/8b8848270ef0f6231a23a06c6df68d3c2014dc49))
66
+
67
+
68
+ ### Documentation
69
+
70
+ * **api:** clarify pagination on the organization rate-limit list endpoints ([fd6a5ad](https://github.com/anthropics/anthropic-sdk-ruby/commit/fd6a5adaa8867bf902e043fb47d8babd313a1a61))
71
+
3
72
  ## 1.66.0 (2026-08-26)
4
73
 
5
74
  Full Changelog: [v1.65.0...v1.66.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.65.0...v1.66.0)
data/README.md CHANGED
@@ -15,7 +15,7 @@ Add to your application's Gemfile:
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "anthropic", "~> 1.66.0"
18
+ gem "anthropic", "~> 1.68.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -52,7 +52,7 @@ module Anthropic
52
52
  in [nil, Pathname]
53
53
  content.basename.to_path
54
54
  in [nil, IO]
55
- content.to_path
55
+ ::File.basename(content.to_path)
56
56
  else
57
57
  filename
58
58
  end
@@ -231,8 +231,9 @@ module Anthropic
231
231
 
232
232
  # Remove `fallback` blocks replayed in history. They only parse under the
233
233
  # server-side fallback beta, which this middleware never sends, so a
234
- # request replaying them would 400. An assistant turn left empty is dropped
235
- # whole.
234
+ # request replaying them would 400. A turn emptied by the stripping is
235
+ # dropped whole; a message that was already empty (e.g. a directive-only
236
+ # `role: :system` message carrying just `output_config`) is left as is.
236
237
  #
237
238
  # @param body [Hash{Symbol=>Object}]
238
239
  # @return [Hash{Symbol=>Object}]
@@ -244,6 +245,7 @@ module Anthropic
244
245
  type = b.is_a?(Hash) ? (b[:type] || b["type"]) : b.type
245
246
  type.to_s == "fallback"
246
247
  end
248
+ next msg if filtered.length == content.length
247
249
  next nil if filtered.empty?
248
250
  msg.merge(content: filtered)
249
251
  end
@@ -375,6 +377,10 @@ module Anthropic
375
377
  from_model = a[:model] || ""
376
378
  last_usage = a.dig(:refused, :usage)
377
379
  refusal_details = a.dig(:refused, :stop_details)
380
+ # `input_transformations` from the last refused fallback's `message_start`; none for the
381
+ # primary, whose message_start was emitted.
382
+ refusal_transformations = nil
383
+ has_refusal_transformations = false
378
384
 
379
385
  iterations = [iteration_usage("message", a[:model] || "", a.dig(:refused, :usage))]
380
386
 
@@ -387,20 +393,19 @@ module Anthropic
387
393
  if failed
388
394
  next if has_next
389
395
  stop_details = refusal_details.merge("recommended_model" => model)
390
- y << emit(
391
- "message_delta",
392
- {
393
- type: "message_delta",
394
- context_management: nil,
395
- delta: {
396
- stop_reason: "refusal",
397
- stop_sequence: nil,
398
- container: nil,
399
- stop_details: stop_details
400
- },
401
- usage: last_usage || {}
402
- }
403
- )
396
+ payload = {
397
+ type: "message_delta",
398
+ context_management: nil,
399
+ delta: {
400
+ stop_reason: "refusal",
401
+ stop_sequence: nil,
402
+ container: nil,
403
+ stop_details: stop_details
404
+ },
405
+ usage: last_usage || {}
406
+ }
407
+ payload[:input_transformations] = refusal_transformations if has_refusal_transformations
408
+ y << emit("message_delta", payload)
404
409
  y << emit("message_stop", {type: "message_stop"})
405
410
  return
406
411
  end
@@ -435,6 +440,8 @@ module Anthropic
435
440
 
436
441
  token = b.dig(:refused, :token)
437
442
  refusal_details = b.dig(:refused, :stop_details)
443
+ refusal_transformations = b.dig(:refused, :input_transformations)
444
+ has_refusal_transformations = b.dig(:refused, :has_input_transformations) == true
438
445
  base = sent
439
446
  partial = b.dig(:refused, :has_prefill_claim) ? to_prefill_blocks(b[:blocks]) : []
440
447
  iterations << iteration_usage("message", model, b.dig(:refused, :usage))
@@ -499,6 +506,8 @@ module Anthropic
499
506
  tracker = BlockTracker.new(index_base)
500
507
  model = nil
501
508
  start_usage = nil
509
+ start_transformations = nil
510
+ has_start_transformations = false
502
511
  accepted = true
503
512
 
504
513
  lines = Anthropic::Internal::Util.decode_lines(upstream)
@@ -510,6 +519,10 @@ module Anthropic
510
519
  when "message_start"
511
520
  model = p.dig("message", "model")
512
521
  start_usage = p.dig("message", "usage")
522
+ if p["message"]&.key?("input_transformations")
523
+ has_start_transformations = true
524
+ start_transformations = p.dig("message", "input_transformations")
525
+ end
513
526
  next if splice
514
527
  when "content_block_start"
515
528
  tracker.start(p)
@@ -534,7 +547,12 @@ module Anthropic
534
547
  token: details["fallback_credit_token"],
535
548
  has_prefill_claim: details["fallback_has_prefill_claim"] == true,
536
549
  usage: usage,
537
- stop_details: details
550
+ stop_details: details,
551
+ # The `input_transformations` from a spliced fallback hop's suppressed
552
+ # `message_start` event. Retained so the field can be forwarded onto the refusal
553
+ # `message_delta` event emitted if the chain degrades.
554
+ input_transformations: start_transformations,
555
+ has_input_transformations: !splice.nil? && has_start_transformations
538
556
  },
539
557
  model: model,
540
558
  blocks: tracker.content_blocks,
@@ -547,6 +565,11 @@ module Anthropic
547
565
  iter_type = refused ? "message" : "fallback_message"
548
566
  usage["iterations"] = splice[:iterations] + [iteration_usage(iter_type, splice[:model], usage)]
549
567
  p["usage"] = usage
568
+ # The spliced fallback's `message_start` was not re-emitted, so copy its
569
+ # `input_transformations` onto this message_delta, as a server-side fallback does.
570
+ if has_start_transformations && !p.key?("input_transformations")
571
+ p["input_transformations"] = start_transformations
572
+ end
550
573
  y << emit("message_delta", p)
551
574
  next
552
575
  end
@@ -104,10 +104,10 @@ module Anthropic
104
104
  end
105
105
 
106
106
  case event
107
- in Anthropic::Models::RawMessageStartEvent # Use the converter to create a new, isolated copy of the message object.
108
- # This ensures proper type validation and prevents shared object references
109
- # that could lead to unintended mutations during streaming accumulation.
110
- # Matches the Python SDK's approach of explicitly constructing Message objects.
107
+ in Anthropic::Models::RawMessageStartEvent
108
+ # `coerce` returns `event.message` itself when it is already a Message (as does the
109
+ # first-event return above), so the snapshot *is* the message_start event's message
110
+ # and the branches below mutate it in place rather than an isolated copy.
111
111
  return Anthropic::Internal::Type::Converter.coerce(Anthropic::Models::Message, event.message)
112
112
  in Anthropic::Models::BetaRawMessageStartEvent
113
113
  return Anthropic::Internal::Type::Converter.coerce(Anthropic::Models::BetaMessage, event.message)
@@ -199,6 +199,11 @@ module Anthropic
199
199
  unless event.context_management.nil?
200
200
  current_snapshot.context_management = event.context_management
201
201
  end
202
+ # A mid-stream model fallback re-reports input transformations on the
203
+ # event; when absent the list from `message_start` stands.
204
+ unless event.input_transformations.nil?
205
+ current_snapshot.input_transformations = event.input_transformations
206
+ end
202
207
  end
203
208
  else
204
209
  end
@@ -272,6 +272,10 @@ module Anthropic
272
272
  #
273
273
  # Reads a field off either a plain hash (symbol or string keys) or a typed model.
274
274
  #
275
+ # A typed reader that cannot coerce its stored value (e.g. `BetaMessageParam#content`
276
+ # on a directive-only message with `content: []`) falls back to the raw value, so the
277
+ # typed form is walked exactly like the equivalent hash.
278
+ #
275
279
  # @param obj [Object]
276
280
  #
277
281
  # @param key [Symbol]
@@ -282,7 +286,11 @@ module Anthropic
282
286
  in Hash
283
287
  obj.fetch(key) { obj[key.to_s] }
284
288
  in Anthropic::Internal::Type::BaseModel
285
- obj.public_send(key) if obj.respond_to?(key)
289
+ begin
290
+ obj.public_send(key) if obj.respond_to?(key)
291
+ rescue Anthropic::Errors::ConversionError
292
+ obj[key]
293
+ end
286
294
  else
287
295
  nil
288
296
  end
@@ -30,7 +30,9 @@ module Anthropic
30
30
 
31
31
  # @return [Boolean]
32
32
  def next_page?
33
- has_more
33
+ return false if has_more == false
34
+
35
+ !data.to_a.empty? && (@req.dig(:query, :before_id) ? !first_id.to_s.empty? : !last_id.to_s.empty?)
34
36
  end
35
37
 
36
38
  # @raise [Anthropic::HTTP::Error]
@@ -41,10 +43,8 @@ module Anthropic
41
43
  raise RuntimeError.new(message)
42
44
  end
43
45
 
44
- req = Anthropic::Internal::Util.deep_merge(
45
- @req,
46
- {query: first_id.nil? ? {after_id: last_id} : {before_id: first_id}}
47
- )
46
+ query = @req.dig(:query, :before_id) ? {before_id: first_id} : {after_id: last_id}
47
+ req = Anthropic::Internal::Util.deep_merge(@req, {query: query})
48
48
  @client.request(req)
49
49
  end
50
50
 
@@ -27,7 +27,9 @@ module Anthropic
27
27
 
28
28
  # @return [Boolean]
29
29
  def next_page?
30
- has_more
30
+ return false if has_more == false
31
+
32
+ !data.to_a.empty? && !next_page_.to_s.empty?
31
33
  end
32
34
 
33
35
  # @raise [Anthropic::HTTP::Error]
@@ -89,6 +89,12 @@ module Anthropic
89
89
 
90
90
  variant const: -> { Anthropic::Models::AnthropicBeta::CE_USER_MANAGEMENT_2026_07_13 }
91
91
 
92
+ variant const: -> { Anthropic::Models::AnthropicBeta::MID_CONVERSATION_OUTPUT_CONFIG_2026_07_01 }
93
+
94
+ variant const: -> { Anthropic::Models::AnthropicBeta::THINKING_BINDING_CONTROLS_2026_08_01 }
95
+
96
+ variant const: -> { Anthropic::Models::AnthropicBeta::MID_CONVERSATION_SYSTEM_CLEAR_AT_2026_08_21 }
97
+
92
98
  # @!method self.variants
93
99
  # @return [Array(String, Symbol)]
94
100
 
@@ -139,6 +145,9 @@ module Anthropic
139
145
  TASK_BUDGETS_2026_03_13 = :"task-budgets-2026-03-13"
140
146
  THINKING_DISPLAY_UPDATES_2026_08_18 = :"thinking-display-updates-2026-08-18"
141
147
  CE_USER_MANAGEMENT_2026_07_13 = :"ce-user-management-2026-07-13"
148
+ MID_CONVERSATION_OUTPUT_CONFIG_2026_07_01 = :"mid-conversation-output-config-2026-07-01"
149
+ THINKING_BINDING_CONTROLS_2026_08_01 = :"thinking-binding-controls-2026-08-01"
150
+ MID_CONVERSATION_SYSTEM_CLEAR_AT_2026_08_21 = :"mid-conversation-system-clear-at-2026-08-21"
142
151
 
143
152
  # @!endgroup
144
153
  end
@@ -9,12 +9,6 @@ module Anthropic
9
9
  # @return [Symbol, :browser_toolset_20260801]
10
10
  required :type, const: :browser_toolset_20260801
11
11
 
12
- # @!attribute allowed_callers
13
- #
14
- # @return [Array<Symbol, Anthropic::Models::Beta::BetaBrowserToolset20260801::AllowedCaller>, nil]
15
- optional :allowed_callers,
16
- -> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::BetaBrowserToolset20260801::AllowedCaller] }
17
-
18
12
  # @!attribute cache_control
19
13
  # Create a cache control breakpoint at this content block.
20
14
  #
@@ -31,7 +25,7 @@ module Anthropic
31
25
  # @return [Anthropic::Models::Beta::BetaBrowserToolsetConfigs, nil]
32
26
  optional :configs, -> { Anthropic::Beta::BetaBrowserToolsetConfigs }, nil?: true
33
27
 
34
- # @!method initialize(allowed_callers: nil, cache_control: nil, configs: nil, type: :browser_toolset_20260801)
28
+ # @!method initialize(cache_control: nil, configs: nil, type: :browser_toolset_20260801)
35
29
  # The browser toolset: a single `tools[]` entry (carrying no `name`) that declares
36
30
  # the browser tool family. The model is served the family's tool with any members
37
31
  # disabled via `configs` removed from its schema.
@@ -39,32 +33,11 @@ module Anthropic
39
33
  # Some parameter documentations has been truncated, see
40
34
  # {Anthropic::Models::Beta::BetaBrowserToolset20260801} for more details.
41
35
  #
42
- # @param allowed_callers [Array<Symbol, Anthropic::Models::Beta::BetaBrowserToolset20260801::AllowedCaller>]
43
- #
44
36
  # @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
45
37
  #
46
38
  # @param configs [Anthropic::Models::Beta::BetaBrowserToolsetConfigs, nil] Per-member configuration for `browser_toolset_20260801`: one
47
39
  #
48
40
  # @param type [Symbol, :browser_toolset_20260801]
49
-
50
- # Specifies who can invoke a tool.
51
- #
52
- # Values: direct: The model can call this tool directly. code_execution_20250825:
53
- # The tool can be called from the code execution environment (v1).
54
- # code_execution_20260120: The tool can be called from the code execution
55
- # environment (v2 with persistence). code_execution_20260521: The tool can be
56
- # called from the code execution environment (v2 with persistence).
57
- module AllowedCaller
58
- extend Anthropic::Internal::Type::Enum
59
-
60
- DIRECT = :direct
61
- CODE_EXECUTION_20250825 = :code_execution_20250825
62
- CODE_EXECUTION_20260120 = :code_execution_20260120
63
- CODE_EXECUTION_20260521 = :code_execution_20260521
64
-
65
- # @!method self.values
66
- # @return [Array<Symbol>]
67
- end
68
41
  end
69
42
  end
70
43
 
@@ -9,12 +9,6 @@ module Anthropic
9
9
  # @return [Symbol, :computer_toolset_20260801]
10
10
  required :type, const: :computer_toolset_20260801
11
11
 
12
- # @!attribute allowed_callers
13
- #
14
- # @return [Array<Symbol, Anthropic::Models::Beta::BetaComputerToolset20260801::AllowedCaller>, nil]
15
- optional :allowed_callers,
16
- -> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::BetaComputerToolset20260801::AllowedCaller] }
17
-
18
12
  # @!attribute cache_control
19
13
  # Create a cache control breakpoint at this content block.
20
14
  #
@@ -31,7 +25,7 @@ module Anthropic
31
25
  # @return [Anthropic::Models::Beta::BetaComputerToolsetConfigs, nil]
32
26
  optional :configs, -> { Anthropic::Beta::BetaComputerToolsetConfigs }, nil?: true
33
27
 
34
- # @!method initialize(allowed_callers: nil, cache_control: nil, configs: nil, type: :computer_toolset_20260801)
28
+ # @!method initialize(cache_control: nil, configs: nil, type: :computer_toolset_20260801)
35
29
  # The computer toolset: a single `tools[]` entry (carrying no `name`) that
36
30
  # declares the computer tool family. The model is served the family's tool with
37
31
  # any members disabled via `configs` removed from its schema. Every member is
@@ -42,32 +36,11 @@ module Anthropic
42
36
  # Some parameter documentations has been truncated, see
43
37
  # {Anthropic::Models::Beta::BetaComputerToolset20260801} for more details.
44
38
  #
45
- # @param allowed_callers [Array<Symbol, Anthropic::Models::Beta::BetaComputerToolset20260801::AllowedCaller>]
46
- #
47
39
  # @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
48
40
  #
49
41
  # @param configs [Anthropic::Models::Beta::BetaComputerToolsetConfigs, nil] Per-member configuration for `computer_toolset_20260801`: one
50
42
  #
51
43
  # @param type [Symbol, :computer_toolset_20260801]
52
-
53
- # Specifies who can invoke a tool.
54
- #
55
- # Values: direct: The model can call this tool directly. code_execution_20250825:
56
- # The tool can be called from the code execution environment (v1).
57
- # code_execution_20260120: The tool can be called from the code execution
58
- # environment (v2 with persistence). code_execution_20260521: The tool can be
59
- # called from the code execution environment (v2 with persistence).
60
- module AllowedCaller
61
- extend Anthropic::Internal::Type::Enum
62
-
63
- DIRECT = :direct
64
- CODE_EXECUTION_20250825 = :code_execution_20250825
65
- CODE_EXECUTION_20260120 = :code_execution_20260120
66
- CODE_EXECUTION_20260521 = :code_execution_20260521
67
-
68
- # @!method self.values
69
- # @return [Array<Symbol>]
70
- end
71
44
  end
72
45
  end
73
46
 
@@ -19,8 +19,10 @@ module Anthropic
19
19
  # @!attribute skills
20
20
  # Skills loaded in the container
21
21
  #
22
- # @return [Array<Anthropic::Models::Beta::BetaSkill>, nil]
23
- required :skills, -> { Anthropic::Internal::Type::ArrayOf[Anthropic::Beta::BetaSkill] }, nil?: true
22
+ # @return [Array<Anthropic::Models::Beta::BetaContainerSkill>, nil]
23
+ required :skills,
24
+ -> { Anthropic::Internal::Type::ArrayOf[Anthropic::Beta::BetaContainerSkill] },
25
+ nil?: true
24
26
 
25
27
  # @!method initialize(id:, expires_at:, skills:)
26
28
  # Information about the container used in the request (for the code execution
@@ -30,7 +32,7 @@ module Anthropic
30
32
  #
31
33
  # @param expires_at [Time] The time at which the container will expire.
32
34
  #
33
- # @param skills [Array<Anthropic::Models::Beta::BetaSkill>, nil] Skills loaded in the container
35
+ # @param skills [Array<Anthropic::Models::Beta::BetaContainerSkill>, nil] Skills loaded in the container
34
36
  end
35
37
  end
36
38
 
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ class BetaContainerSkill < Anthropic::Internal::Type::BaseModel
7
+ # @!attribute skill_id
8
+ # Skill ID
9
+ #
10
+ # @return [String]
11
+ required :skill_id, String
12
+
13
+ # @!attribute type
14
+ # Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
15
+ #
16
+ # @return [Symbol, Anthropic::Models::Beta::BetaContainerSkill::Type]
17
+ required :type, enum: -> { Anthropic::Beta::BetaContainerSkill::Type }
18
+
19
+ # @!attribute version
20
+ # The resolved version: a skill version ID for custom skills.
21
+ #
22
+ # @return [String]
23
+ required :version, String
24
+
25
+ # @!method initialize(skill_id:, type:, version:)
26
+ # A skill that was loaded in a container (response model).
27
+ #
28
+ # @param skill_id [String] Skill ID
29
+ #
30
+ # @param type [Symbol, Anthropic::Models::Beta::BetaContainerSkill::Type] Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
31
+ #
32
+ # @param version [String] The resolved version: a skill version ID for custom skills.
33
+
34
+ # Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined)
35
+ #
36
+ # @see Anthropic::Models::Beta::BetaContainerSkill#type
37
+ module Type
38
+ extend Anthropic::Internal::Type::Enum
39
+
40
+ ANTHROPIC = :anthropic
41
+ CUSTOM = :custom
42
+
43
+ # @!method self.values
44
+ # @return [Array<Symbol>]
45
+ end
46
+ end
47
+ end
48
+
49
+ BetaContainerSkill = Beta::BetaContainerSkill
50
+ end
51
+ end
@@ -4,7 +4,7 @@ module Anthropic
4
4
  module Models
5
5
  module Beta
6
6
  # @see Anthropic::Resources::Beta::Skills#delete
7
- class SkillDeleteResponse < Anthropic::Internal::Type::BaseModel
7
+ class BetaDeletedSkill < Anthropic::Internal::Type::BaseModel
8
8
  # @!attribute id
9
9
  # Unique identifier for the skill.
10
10
  #
@@ -18,17 +18,19 @@ module Anthropic
18
18
  #
19
19
  # For Skills, this is always `"skill_deleted"`.
20
20
  #
21
- # @return [String]
22
- required :type, String
21
+ # @return [Symbol, :skill_deleted]
22
+ required :type, const: :skill_deleted
23
23
 
24
- # @!method initialize(id:, type:)
24
+ # @!method initialize(id:, type: :skill_deleted)
25
25
  # Some parameter documentations has been truncated, see
26
- # {Anthropic::Models::Beta::SkillDeleteResponse} for more details.
26
+ # {Anthropic::Models::Beta::BetaDeletedSkill} for more details.
27
27
  #
28
28
  # @param id [String] Unique identifier for the skill.
29
29
  #
30
- # @param type [String] Deleted object type.
30
+ # @param type [Symbol, :skill_deleted] Deleted object type.
31
31
  end
32
32
  end
33
+
34
+ BetaDeletedSkill = Beta::BetaDeletedSkill
33
35
  end
34
36
  end