anthropic 2.10.0 → 2.12.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 (218) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +39 -0
  3. data/README.md +1 -1
  4. data/lib/anthropic/error_classes.rb +8 -0
  5. data/lib/anthropic/helpers/bedrock/client.rb +12 -2
  6. data/lib/anthropic/internal/tracing.rb +16 -0
  7. data/lib/anthropic/internal/transport/base_client.rb +5 -1
  8. data/lib/anthropic/internal/util.rb +5 -4
  9. data/lib/anthropic/models/anthropic_beta.rb +3 -0
  10. data/lib/anthropic/models/beta/message_create_params.rb +6 -0
  11. data/lib/anthropic/models/beta/messages/batch_create_params.rb +6 -0
  12. data/lib/anthropic/models/beta/organization/analytics/beta_analytics_cost_group.rb +2 -1
  13. data/lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rb +2 -1
  14. data/lib/anthropic/models/beta/organization/beta_analytics_cost_bucketed_result.rb +2 -1
  15. data/lib/anthropic/models/beta/organization/beta_analytics_cost_users_item.rb +2 -1
  16. data/lib/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rb +2 -1
  17. data/lib/anthropic/models/beta/organization/beta_analytics_usage_users_item.rb +2 -1
  18. data/lib/anthropic/models/beta/organization/beta_organization_rate_limit_value.rb +1 -1
  19. data/lib/anthropic/models/beta/organization/beta_rbac_group_not_found_error.rb +23 -0
  20. data/lib/anthropic/models/beta/organization/beta_rbac_group_not_found_error_details.rb +21 -0
  21. data/lib/anthropic/models/beta/organization/claude_code/beta_cmek_feature_unsupported_error.rb +27 -0
  22. data/lib/anthropic/models/beta/organization/claude_code/beta_cmek_feature_unsupported_error_details.rb +25 -0
  23. data/lib/anthropic/models/beta/organization/claude_code/beta_rbac_group_managed_settings_not_found_error.rb +25 -0
  24. data/lib/anthropic/models/beta/organization/claude_code/beta_rbac_group_managed_settings_not_found_error_details.rb +23 -0
  25. data/lib/anthropic/models/beta/organization/claude_code/beta_rbac_group_order_limit_exceeded_error.rb +26 -0
  26. data/lib/anthropic/models/beta/organization/claude_code/beta_rbac_group_order_limit_exceeded_error_details.rb +24 -0
  27. data/lib/anthropic/models/beta/organization/claude_code/beta_settings_document_limit_exceeded_error.rb +29 -0
  28. data/lib/anthropic/models/beta/organization/claude_code/beta_settings_document_limit_exceeded_error_details.rb +27 -0
  29. data/lib/anthropic/models/beta/organization/claude_code/beta_settings_history_limit_exceeded_error.rb +29 -0
  30. data/lib/anthropic/models/beta/organization/claude_code/beta_settings_history_limit_exceeded_error_details.rb +27 -0
  31. data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_configuration.rb +68 -0
  32. data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_mode.rb +62 -0
  33. data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_mode_param.rb +62 -0
  34. data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_organization_mode.rb +24 -0
  35. data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_organization_mode_param.rb +23 -0
  36. data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_rbac_groups_mode.rb +24 -0
  37. data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_rbac_groups_mode_param.rb +23 -0
  38. data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_default_managed_settings.rb +50 -0
  39. data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_managed_settings.rb +80 -0
  40. data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_managed_settings_summary.rb +69 -0
  41. data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_status.rb +70 -0
  42. data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_status_active.rb +24 -0
  43. data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_status_deleted.rb +24 -0
  44. data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_status_unknown.rb +24 -0
  45. data/lib/anthropic/models/beta/organization/claude_code/managed_settings/beta_deleted_claude_code_rbac_group_managed_settings.rb +33 -0
  46. data/lib/anthropic/models/beta/organization/claude_code/managed_settings/configuration_retrieve_params.rb +35 -0
  47. data/lib/anthropic/models/beta/organization/claude_code/managed_settings/configuration_update_params.rb +62 -0
  48. data/lib/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_default_retrieve_params.rb +35 -0
  49. data/lib/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_default_update_params.rb +47 -0
  50. data/lib/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_delete_params.rb +43 -0
  51. data/lib/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_list_params.rb +53 -0
  52. data/lib/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_retrieve_params.rb +43 -0
  53. data/lib/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_set_params.rb +53 -0
  54. data/lib/anthropic/models/beta/organization/workspaces/beta_workspace_rate_limit_type.rb +7 -1
  55. data/lib/anthropic/models/beta/organization/workspaces/beta_workspace_rate_limit_update_value.rb +8 -2
  56. data/lib/anthropic/models/beta/organization/workspaces/beta_workspace_rate_limit_value.rb +1 -1
  57. data/lib/anthropic/models/beta_request_body_timeout_error.rb +20 -0
  58. data/lib/anthropic/models/beta_request_body_timeout_error_details.rb +18 -0
  59. data/lib/anthropic/models/error_details.rb +62 -5
  60. data/lib/anthropic/models/image_dimensions_too_large_error.rb +21 -0
  61. data/lib/anthropic/models/image_dimensions_too_large_error_details.rb +41 -0
  62. data/lib/anthropic/models/organization/organization_rate_limit_value.rb +1 -1
  63. data/lib/anthropic/models/organization/workspaces/workspace_rate_limit_type.rb +7 -1
  64. data/lib/anthropic/models/organization/workspaces/workspace_rate_limit_update_value.rb +8 -2
  65. data/lib/anthropic/models/organization/workspaces/workspace_rate_limit_value.rb +1 -1
  66. data/lib/anthropic/models/sandbox_egress_restricted_error.rb +1 -1
  67. data/lib/anthropic/models/sandbox_egress_restricted_error_details.rb +1 -1
  68. data/lib/anthropic/models/user_profile_billing_not_authorized_error.rb +1 -1
  69. data/lib/anthropic/models/user_profile_billing_not_authorized_error_details.rb +1 -1
  70. data/lib/anthropic/models/user_profile_not_billable_error.rb +2 -2
  71. data/lib/anthropic/models/user_profile_not_billable_error_details.rb +2 -2
  72. data/lib/anthropic/models.rb +8 -0
  73. data/lib/anthropic/resources/beta/messages.rb +3 -0
  74. data/lib/anthropic/resources/beta/organization/analytics/user_cost_report.rb +4 -3
  75. data/lib/anthropic/resources/beta/organization/analytics/user_usage_report.rb +3 -2
  76. data/lib/anthropic/resources/beta/organization/claude_code/managed_settings/configuration.rb +141 -0
  77. data/lib/anthropic/resources/beta/organization/claude_code/managed_settings/rbac_group_default.rb +126 -0
  78. data/lib/anthropic/resources/beta/organization/claude_code/managed_settings/rbac_groups.rb +252 -0
  79. data/lib/anthropic/resources/beta/organization/claude_code/managed_settings.rb +35 -0
  80. data/lib/anthropic/resources/beta/organization/claude_code.rb +23 -0
  81. data/lib/anthropic/resources/beta/organization/external_keys.rb +2 -2
  82. data/lib/anthropic/resources/beta/organization/plugin_marketplaces.rb +5 -0
  83. data/lib/anthropic/resources/beta/organization/plugins/installation_settings.rb +4 -0
  84. data/lib/anthropic/resources/beta/organization/plugins/versions.rb +2 -0
  85. data/lib/anthropic/resources/beta/organization/plugins.rb +3 -0
  86. data/lib/anthropic/resources/beta/organization.rb +4 -0
  87. data/lib/anthropic/resources/messages.rb +3 -0
  88. data/lib/anthropic/resources/organization/external_keys.rb +2 -2
  89. data/lib/anthropic/version.rb +1 -1
  90. data/lib/anthropic.rb +44 -0
  91. data/rbi/anthropic/internal/tracing.rbi +16 -0
  92. data/rbi/anthropic/internal/util.rbi +8 -2
  93. data/rbi/anthropic/models/anthropic_beta.rbi +5 -0
  94. data/rbi/anthropic/models/beta/message_create_params.rbi +12 -0
  95. data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +12 -0
  96. data/rbi/anthropic/models/beta/organization/analytics/beta_analytics_cost_group.rbi +4 -2
  97. data/rbi/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rbi +4 -2
  98. data/rbi/anthropic/models/beta/organization/beta_analytics_cost_bucketed_result.rbi +4 -2
  99. data/rbi/anthropic/models/beta/organization/beta_analytics_cost_users_item.rbi +4 -2
  100. data/rbi/anthropic/models/beta/organization/beta_analytics_usage_bucketed_result.rbi +4 -2
  101. data/rbi/anthropic/models/beta/organization/beta_analytics_usage_users_item.rbi +4 -2
  102. data/rbi/anthropic/models/beta/organization/beta_organization_rate_limit_value.rbi +2 -2
  103. data/rbi/anthropic/models/beta/organization/beta_rbac_group_not_found_error.rbi +24 -0
  104. data/rbi/anthropic/models/beta/organization/beta_rbac_group_not_found_error_details.rbi +31 -0
  105. data/rbi/anthropic/models/beta/organization/claude_code/beta_cmek_feature_unsupported_error.rbi +28 -0
  106. data/rbi/anthropic/models/beta/organization/claude_code/beta_cmek_feature_unsupported_error_details.rbi +35 -0
  107. data/rbi/anthropic/models/beta/organization/claude_code/beta_rbac_group_managed_settings_not_found_error.rbi +26 -0
  108. data/rbi/anthropic/models/beta/organization/claude_code/beta_rbac_group_managed_settings_not_found_error_details.rbi +33 -0
  109. data/rbi/anthropic/models/beta/organization/claude_code/beta_rbac_group_order_limit_exceeded_error.rbi +27 -0
  110. data/rbi/anthropic/models/beta/organization/claude_code/beta_rbac_group_order_limit_exceeded_error_details.rbi +34 -0
  111. data/rbi/anthropic/models/beta/organization/claude_code/beta_settings_document_limit_exceeded_error.rbi +30 -0
  112. data/rbi/anthropic/models/beta/organization/claude_code/beta_settings_document_limit_exceeded_error_details.rbi +37 -0
  113. data/rbi/anthropic/models/beta/organization/claude_code/beta_settings_history_limit_exceeded_error.rbi +30 -0
  114. data/rbi/anthropic/models/beta/organization/claude_code/beta_settings_history_limit_exceeded_error_details.rbi +37 -0
  115. data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_configuration.rbi +101 -0
  116. data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_mode.rbi +82 -0
  117. data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_mode_param.rbi +82 -0
  118. data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_organization_mode.rbi +38 -0
  119. data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_organization_mode_param.rbi +34 -0
  120. data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_rbac_groups_mode.rbi +38 -0
  121. data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_rbac_groups_mode_param.rbi +34 -0
  122. data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_default_managed_settings.rbi +70 -0
  123. data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_managed_settings.rbi +114 -0
  124. data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_managed_settings_summary.rbi +104 -0
  125. data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_status.rbi +88 -0
  126. data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_status_active.rbi +38 -0
  127. data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_status_deleted.rbi +38 -0
  128. data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_status_unknown.rbi +38 -0
  129. data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/beta_deleted_claude_code_rbac_group_managed_settings.rbi +48 -0
  130. data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/configuration_retrieve_params.rbi +74 -0
  131. data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/configuration_update_params.rbi +136 -0
  132. data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_default_retrieve_params.rbi +74 -0
  133. data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_default_update_params.rbi +86 -0
  134. data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_delete_params.rbi +82 -0
  135. data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_list_params.rbi +97 -0
  136. data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_retrieve_params.rbi +82 -0
  137. data/rbi/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_set_params.rbi +94 -0
  138. data/rbi/anthropic/models/beta/organization/workspaces/beta_workspace_rate_limit_type.rbi +7 -1
  139. data/rbi/anthropic/models/beta/organization/workspaces/beta_workspace_rate_limit_update_value.rbi +14 -2
  140. data/rbi/anthropic/models/beta/organization/workspaces/beta_workspace_rate_limit_value.rbi +2 -2
  141. data/rbi/anthropic/models/beta_request_body_timeout_error.rbi +17 -0
  142. data/rbi/anthropic/models/beta_request_body_timeout_error_details.rbi +28 -0
  143. data/rbi/anthropic/models/error_details.rbi +57 -0
  144. data/rbi/anthropic/models/image_dimensions_too_large_error.rbi +18 -0
  145. data/rbi/anthropic/models/image_dimensions_too_large_error_details.rbi +63 -0
  146. data/rbi/anthropic/models/organization/organization_rate_limit_value.rbi +2 -2
  147. data/rbi/anthropic/models/organization/workspaces/workspace_rate_limit_type.rbi +7 -1
  148. data/rbi/anthropic/models/organization/workspaces/workspace_rate_limit_update_value.rbi +14 -2
  149. data/rbi/anthropic/models/organization/workspaces/workspace_rate_limit_value.rbi +2 -2
  150. data/rbi/anthropic/models/sandbox_egress_restricted_error.rbi +1 -1
  151. data/rbi/anthropic/models/sandbox_egress_restricted_error_details.rbi +1 -1
  152. data/rbi/anthropic/models/user_profile_billing_not_authorized_error.rbi +1 -1
  153. data/rbi/anthropic/models/user_profile_billing_not_authorized_error_details.rbi +1 -1
  154. data/rbi/anthropic/models/user_profile_not_billable_error.rbi +2 -2
  155. data/rbi/anthropic/models/user_profile_not_billable_error_details.rbi +2 -2
  156. data/rbi/anthropic/models.rbi +10 -0
  157. data/rbi/anthropic/resources/beta/messages.rbi +18 -0
  158. data/rbi/anthropic/resources/beta/organization/analytics/user_cost_report.rbi +4 -3
  159. data/rbi/anthropic/resources/beta/organization/analytics/user_usage_report.rbi +3 -2
  160. data/rbi/anthropic/resources/beta/organization/claude_code/managed_settings/configuration.rbi +112 -0
  161. data/rbi/anthropic/resources/beta/organization/claude_code/managed_settings/rbac_group_default.rbi +86 -0
  162. data/rbi/anthropic/resources/beta/organization/claude_code/managed_settings/rbac_groups.rbi +180 -0
  163. data/rbi/anthropic/resources/beta/organization/claude_code/managed_settings.rbi +39 -0
  164. data/rbi/anthropic/resources/beta/organization/claude_code.rbi +23 -0
  165. data/rbi/anthropic/resources/beta/organization/external_keys.rbi +2 -2
  166. data/rbi/anthropic/resources/beta/organization.rbi +3 -0
  167. data/rbi/anthropic/resources/organization/external_keys.rbi +2 -2
  168. data/sig/anthropic/internal/tracing.rbs +8 -0
  169. data/sig/anthropic/internal/util.rbs +2 -1
  170. data/sig/anthropic/models/anthropic_beta.rbs +2 -0
  171. data/sig/anthropic/models/beta/organization/beta_rbac_group_not_found_error.rbs +13 -0
  172. data/sig/anthropic/models/beta/organization/beta_rbac_group_not_found_error_details.rbs +18 -0
  173. data/sig/anthropic/models/beta/organization/claude_code/beta_cmek_feature_unsupported_error.rbs +15 -0
  174. data/sig/anthropic/models/beta/organization/claude_code/beta_cmek_feature_unsupported_error_details.rbs +20 -0
  175. data/sig/anthropic/models/beta/organization/claude_code/beta_rbac_group_managed_settings_not_found_error.rbs +15 -0
  176. data/sig/anthropic/models/beta/organization/claude_code/beta_rbac_group_managed_settings_not_found_error_details.rbs +24 -0
  177. data/sig/anthropic/models/beta/organization/claude_code/beta_rbac_group_order_limit_exceeded_error.rbs +15 -0
  178. data/sig/anthropic/models/beta/organization/claude_code/beta_rbac_group_order_limit_exceeded_error_details.rbs +22 -0
  179. data/sig/anthropic/models/beta/organization/claude_code/beta_settings_document_limit_exceeded_error.rbs +15 -0
  180. data/sig/anthropic/models/beta/organization/claude_code/beta_settings_document_limit_exceeded_error_details.rbs +22 -0
  181. data/sig/anthropic/models/beta/organization/claude_code/beta_settings_history_limit_exceeded_error.rbs +15 -0
  182. data/sig/anthropic/models/beta/organization/claude_code/beta_settings_history_limit_exceeded_error_details.rbs +22 -0
  183. data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_configuration.rbs +48 -0
  184. data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_mode.rbs +44 -0
  185. data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_mode_param.rbs +44 -0
  186. data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_organization_mode.rbs +22 -0
  187. data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_organization_mode_param.rbs +22 -0
  188. data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_rbac_groups_mode.rbs +22 -0
  189. data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_managed_settings_rbac_groups_mode_param.rbs +22 -0
  190. data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_default_managed_settings.rbs +38 -0
  191. data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_managed_settings.rbs +53 -0
  192. data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_managed_settings_summary.rbs +48 -0
  193. data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_status.rbs +49 -0
  194. data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_status_active.rbs +21 -0
  195. data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_status_deleted.rbs +21 -0
  196. data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_claude_code_rbac_group_status_unknown.rbs +21 -0
  197. data/sig/anthropic/models/beta/organization/claude_code/managed_settings/beta_deleted_claude_code_rbac_group_managed_settings.rbs +33 -0
  198. data/sig/anthropic/models/beta/organization/claude_code/managed_settings/configuration_retrieve_params.rbs +36 -0
  199. data/sig/anthropic/models/beta/organization/claude_code/managed_settings/configuration_update_params.rbs +61 -0
  200. data/sig/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_default_retrieve_params.rbs +36 -0
  201. data/sig/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_default_update_params.rbs +43 -0
  202. data/sig/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_delete_params.rbs +43 -0
  203. data/sig/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_list_params.rbs +50 -0
  204. data/sig/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_retrieve_params.rbs +43 -0
  205. data/sig/anthropic/models/beta/organization/claude_code/managed_settings/rbac_group_set_params.rbs +48 -0
  206. data/sig/anthropic/models/beta_request_body_timeout_error.rbs +9 -0
  207. data/sig/anthropic/models/beta_request_body_timeout_error_details.rbs +14 -0
  208. data/sig/anthropic/models/error_details.rbs +57 -0
  209. data/sig/anthropic/models/image_dimensions_too_large_error.rbs +9 -0
  210. data/sig/anthropic/models/image_dimensions_too_large_error_details.rbs +30 -0
  211. data/sig/anthropic/models.rbs +8 -0
  212. data/sig/anthropic/resources/beta/organization/claude_code/managed_settings/configuration.rbs +28 -0
  213. data/sig/anthropic/resources/beta/organization/claude_code/managed_settings/rbac_group_default.rbs +26 -0
  214. data/sig/anthropic/resources/beta/organization/claude_code/managed_settings/rbac_groups.rbs +41 -0
  215. data/sig/anthropic/resources/beta/organization/claude_code/managed_settings.rbs +19 -0
  216. data/sig/anthropic/resources/beta/organization/claude_code.rbs +13 -0
  217. data/sig/anthropic/resources/beta/organization.rbs +2 -0
  218. metadata +134 -2
@@ -47,6 +47,9 @@ module Anthropic
47
47
  # The `compaction` block's `tool_changes` differs from what was returned with the block.
48
48
  variant :compaction_tool_changes_mismatch, -> { Anthropic::CompactionToolChangesMismatchErrorDetails }
49
49
 
50
+ # The longest side of one or more images in the request exceeds the image size limit. Scale each image in `paths` so that neither side exceeds `max_side_length_pixels`, or remove it, then retry.
51
+ variant :image_dimensions_too_large, -> { Anthropic::ImageDimensionsTooLargeErrorDetails }
52
+
50
53
  # Anthropic has disabled the organization for trust and safety reasons. An organization disabled for any other reason, such as billing, does not get this code. `appeal_url`, when present, is where the organization can appeal.
51
54
  variant :organization_on_hold, -> { Anthropic::OrganizationOnHoldErrorDetails }
52
55
 
@@ -85,11 +88,11 @@ module Anthropic
85
88
  variant :linked_organization_spend_limit_reached,
86
89
  -> { Anthropic::LinkedOrganizationSpendLimitReachedErrorDetails }
87
90
 
88
- # The customer that the named user profile represents has not authorized the caller to bill them, or the authorization that the request's credential uses has ended. The response does not say which applies.
91
+ # The customer that the request's user profile represents has not authorized the caller to bill them, or the authorization that the request's credential uses has ended. The response does not say which applies.
89
92
  variant :user_profile_billing_not_authorized,
90
93
  -> { Anthropic::UserProfileBillingNotAuthorizedErrorDetails }
91
94
 
92
- # The caller is not allowed to bill the user profile that the request names. The response gives no more specific error code and does not say what the reason is.
95
+ # The request's user profile cannot be billed. The response gives no more specific error code and does not say what the reason is.
93
96
  variant :user_profile_not_billable, -> { Anthropic::UserProfileNotBillableErrorDetails }
94
97
 
95
98
  # No usable Thread state was found for `previous_message_id`. Replay the full conversation with `thread: {"type": "create"}` to start a new Thread.
@@ -136,7 +139,7 @@ module Anthropic
136
139
  variant :workspace_api_key_limit_exceeded,
137
140
  -> { Anthropic::Organization::WorkspaceAPIKeyLimitExceededErrorDetails }
138
141
 
139
- # The request came from a Claude sandbox with restricted network access, which is not allowed to make this change. Send it from outside the sandbox, or from a sandbox with unrestricted network access.
142
+ # The request came from a Claude sandbox with restricted network access, which is not allowed to make this request. Send it from outside the sandbox, or from a sandbox with unrestricted network access.
140
143
  variant :sandbox_egress_restricted, -> { Anthropic::SandboxEgressRestrictedErrorDetails }
141
144
 
142
145
  # The request depends on a user profile that does not exist in the organization or is no longer active. The request either names this user profile by ID, or names a resource, such as an External Key, that is bound to it.
@@ -273,6 +276,32 @@ module Anthropic
273
276
  # The content scan of the version in `plugin_version_id` is still running. Retry once the scan finishes.
274
277
  variant :scan_pending, -> { Anthropic::Beta::Organization::BetaScanPendingErrorDetails }
275
278
 
279
+ # The request body did not finish arriving in time, so nothing was done. Send a smaller body, or send it over a faster connection.
280
+ variant :request_body_timeout, -> { Anthropic::BetaRequestBodyTimeoutErrorDetails }
281
+
282
+ # The organization has reached its limit of settings documents, counting unused ones. An owner can remove unused documents in claude.ai. Deleting a group's settings or clearing the default settings also frees a document, if nothing else uses it. None of these works once the organization has also reached its settings history limit.
283
+ variant :settings_document_limit_exceeded,
284
+ -> { Anthropic::Beta::Organization::ClaudeCode::BetaSettingsDocumentLimitExceededErrorDetails }
285
+
286
+ # The organization has reached its settings history limit, a cap on stored versions of its settings documents. Nothing in the API or claude.ai lowers the count, so contact support. Creating or deleting group settings, creating or clearing the default settings, and reordering are refused. Changing the mode still works, unless it would copy the organization settings into a new default.
287
+ variant :settings_history_limit_exceeded,
288
+ -> { Anthropic::Beta::Organization::ClaudeCode::BetaSettingsHistoryLimitExceededErrorDetails }
289
+
290
+ # This stored settings document currently cannot be read or replaced. Contact support, or, if you no longer need these settings, delete the group's settings or clear the default.
291
+ variant :cmek_feature_unsupported,
292
+ -> { Anthropic::Beta::Organization::ClaudeCode::BetaCMEKFeatureUnsupportedErrorDetails }
293
+
294
+ # This RBAC Group has no Claude Code managed settings.
295
+ variant :rbac_group_managed_settings_not_found,
296
+ -> { Anthropic::Beta::Organization::ClaudeCode::BetaRBACGroupManagedSettingsNotFoundErrorDetails }
297
+
298
+ # The RBAC Group order already has the most groups allowed. Delete another group's settings first.
299
+ variant :rbac_group_order_limit_exceeded,
300
+ -> { Anthropic::Beta::Organization::ClaudeCode::BetaRBACGroupOrderLimitExceededErrorDetails }
301
+
302
+ # The RBAC Group is not one of the organization's groups.
303
+ variant :rbac_group_not_found, -> { Anthropic::Beta::Organization::BetaRBACGroupNotFoundErrorDetails }
304
+
276
305
  # The request set the channel up, and `settings` was then refused. The channel stays set up with every setting unset.
277
306
  variant :slack_channel_set_up_settings_refused,
278
307
  -> { Anthropic::Beta::Organization::BetaSlackChannelSetUpSettingsRefusedErrorDetails }
@@ -326,6 +355,7 @@ module Anthropic
326
355
  COMPACTION_SIGNATURE_INVALID = :compaction_signature_invalid
327
356
  COMPACTION_TOO_MANY_TOOL_REFERENCES = :compaction_too_many_tool_references
328
357
  COMPACTION_TOOL_CHANGES_MISMATCH = :compaction_tool_changes_mismatch
358
+ IMAGE_DIMENSIONS_TOO_LARGE = :image_dimensions_too_large
329
359
  ORGANIZATION_ON_HOLD = :organization_on_hold
330
360
  REQUEST_BODY_ENCODING_INVALID = :request_body_encoding_invalid
331
361
  REQUEST_BODY_ENCODING_UNSUPPORTED = :request_body_encoding_unsupported
@@ -395,6 +425,13 @@ module Anthropic
395
425
  REGISTRATION_PENDING = :registration_pending
396
426
  SCAN_FAILED = :scan_failed
397
427
  SCAN_PENDING = :scan_pending
428
+ REQUEST_BODY_TIMEOUT = :request_body_timeout
429
+ SETTINGS_DOCUMENT_LIMIT_EXCEEDED = :settings_document_limit_exceeded
430
+ SETTINGS_HISTORY_LIMIT_EXCEEDED = :settings_history_limit_exceeded
431
+ CMEK_FEATURE_UNSUPPORTED = :cmek_feature_unsupported
432
+ RBAC_GROUP_MANAGED_SETTINGS_NOT_FOUND = :rbac_group_managed_settings_not_found
433
+ RBAC_GROUP_ORDER_LIMIT_EXCEEDED = :rbac_group_order_limit_exceeded
434
+ RBAC_GROUP_NOT_FOUND = :rbac_group_not_found
398
435
  SLACK_CHANNEL_SET_UP_SETTINGS_REFUSED = :slack_channel_set_up_settings_refused
399
436
  API_KEY_SCOPE_MISSING = :api_key_scope_missing
400
437
  CLAUDE_TAG_WRITES_NOT_ENABLED = :claude_tag_writes_not_enabled
@@ -411,7 +448,7 @@ module Anthropic
411
448
  end
412
449
 
413
450
  # @!method self.variants
414
- # @return [Array(Anthropic::Models::AvailableToolsLimitExceededErrorDetails, Anthropic::Models::ClaudeCodeKeyCreatorNotMemberErrorDetails, Anthropic::Models::ClaudeCodeVersionTooOldErrorDetails, Anthropic::Models::CMEKKeyDisabledErrorDetails, Anthropic::Models::CMEKKeyNetworkBlockedErrorDetails, Anthropic::Models::CompactionBlockAmbiguousErrorDetails, Anthropic::Models::CompactionBlockMisplacedErrorDetails, Anthropic::Models::CompactionContentMismatchErrorDetails, Anthropic::Models::CompactionIncompleteTurnErrorDetails, Anthropic::Models::CompactionNothingToSummarizeErrorDetails, Anthropic::Models::CompactionSignatureInvalidErrorDetails, Anthropic::Models::CompactionTooManyToolReferencesErrorDetails, Anthropic::Models::CompactionToolChangesMismatchErrorDetails, Anthropic::Models::OrganizationOnHoldErrorDetails, Anthropic::Models::RequestBodyEncodingInvalidErrorDetails, Anthropic::Models::RequestBodyEncodingUnsupportedErrorDetails, Anthropic::Models::ThreadAlreadyContinuedErrorDetails, Anthropic::Models::ThreadContinueInFlightErrorDetails, Anthropic::Models::ThreadFingerprintMismatchErrorDetails, Anthropic::Models::ThreadUnsupportedRequestErrorDetails, Anthropic::Models::ToolNameConflictErrorDetails, Anthropic::Models::ToolReferenceUnresolvedErrorDetails, Anthropic::Models::UserProfileRequiredErrorDetails, Anthropic::Models::LinkedOrganizationBillingUnavailableErrorDetails, Anthropic::Models::LinkedOrganizationSpendLimitReachedErrorDetails, Anthropic::Models::UserProfileBillingNotAuthorizedErrorDetails, Anthropic::Models::UserProfileNotBillableErrorDetails, Anthropic::Models::ThreadNotFoundErrorDetails, Anthropic::Models::SkillReadBlockedUndecryptableErrorDetails, Anthropic::Models::RequestBodyTooLargeAfterDecodingErrorDetails, Anthropic::Models::ContractSpendLimitReachedErrorDetails, Anthropic::Models::EnforcedSpendLimitReachedErrorDetails, Anthropic::Models::RampLimitExceededErrorDetails, Anthropic::Models::CMEKKeyUnreachableErrorDetails, Anthropic::Models::CompactionUnavailableErrorDetails, Anthropic::Models::StorageQuotaExceededErrorDetails, Anthropic::Models::FileNotDownloadableErrorDetails, Anthropic::Models::FileExpiredErrorDetails, Anthropic::Models::CMEKContextUnavailableErrorDetails, Anthropic::Models::Organization::OrgAPIKeyLimitExceededErrorDetails, Anthropic::Models::Organization::WorkspaceAPIKeyLimitExceededErrorDetails, Anthropic::Models::SandboxEgressRestrictedErrorDetails, Anthropic::Models::UserProfileNotFoundErrorDetails, Anthropic::Models::Organization::ExternalKeyInWorkspacePolicyErrorDetails, Anthropic::Models::Organization::AlreadyMemberErrorDetails, Anthropic::Models::Organization::CannotInviteEmailsWithUnverifiedDomainsErrorDetails, Anthropic::Models::Organization::EmailDomainNotAllowedErrorDetails, Anthropic::Models::Organization::InviteAlreadyExistsErrorDetails, Anthropic::Models::OrgMemberLimitExceededErrorDetails, Anthropic::Models::Organization::RBACGroupGrantsOwnerAccessErrorDetails, Anthropic::Models::Organization::RBACGroupOwnerAccessUnconfirmedErrorDetails, Anthropic::Models::Organization::CannotRemoveLastMemberErrorDetails, Anthropic::Models::ConcurrentMembershipChangeErrorDetails, Anthropic::Models::Organization::ExternalKeyValidationFailedErrorDetails, Anthropic::Models::Organization::ExternalKeyValidationTimedOutErrorDetails, Anthropic::Models::Organization::KeyProfileMismatchErrorDetails, Anthropic::Models::Organization::WorkspacePolicyViolationErrorDetails, Anthropic::Models::Organization::ExternalKeyChangedErrorDetails, Anthropic::Models::Organization::WorkspaceMemberLimitExceededErrorDetails, Anthropic::Models::OrganizationTypeNotSupportedErrorDetails, Anthropic::Models::ParentOrganizationRequiredErrorDetails, Anthropic::Models::RBACRoleNotFoundErrorDetails, Anthropic::Models::Beta::BetaEnvironmentCreateDisabledErrorDetails, Anthropic::Models::Beta::BetaEnvironmentArchivedErrorDetails, Anthropic::Models::Beta::BetaInvalidConfigTypeChangeErrorDetails, Anthropic::Models::Beta::BetaEnvironmentUpdateDisabledErrorDetails, Anthropic::Models::Beta::Environments::BetaHeartbeatPreconditionFailedErrorDetails, Anthropic::Models::Beta::BetaInvalidMetadataErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutPrimaryOwnerErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutSelfErrorDetails, Anthropic::Models::BetaOrganizationNotEnrolledInBetaErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutManagedMemberErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutMembershipAdminErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutOwnerErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutPrivilegedMemberErrorDetails, Anthropic::Models::Beta::Organization::BetaSpendLimitsAdminAPIWritesNotEnabledErrorDetails, Anthropic::Models::BetaUnsupportedCharsetErrorDetails, Anthropic::Models::Beta::Organization::BetaPluginNameTakenErrorDetails, Anthropic::Models::Beta::Organization::BetaSkillNameTakenErrorDetails, Anthropic::Models::Beta::Organization::BetaRegistrationPendingErrorDetails, Anthropic::Models::Beta::Organization::BetaScanFailedErrorDetails, Anthropic::Models::Beta::Organization::BetaScanPendingErrorDetails, Anthropic::Models::Beta::Organization::BetaSlackChannelSetUpSettingsRefusedErrorDetails, Anthropic::Models::Beta::Organization::BetaAPIKeyScopeMissingErrorDetails, Anthropic::Models::Beta::Organization::BetaClaudeTagWritesNotEnabledErrorDetails, Anthropic::Models::Beta::Organization::BetaComplianceConfigurationRestrictedErrorDetails, Anthropic::Models::Beta::Organization::BetaOrganizationLevelScopedAPIKeyRequiredErrorDetails, Anthropic::Models::Beta::BetaEnvironmentNotFoundErrorDetails, Anthropic::Models::Beta::Organization::BetaSlackChannelSetUpEnvironmentNotFoundErrorDetails, Anthropic::Models::Beta::Organization::BetaSlackChannelSetUpSettingsConflictErrorDetails, Anthropic::Models::Beta::Organization::BetaBundleAttachmentNotSupportedErrorDetails, Anthropic::Models::Beta::Organization::BetaBundleOnCallErrorDetails)]
451
+ # @return [Array(Anthropic::Models::AvailableToolsLimitExceededErrorDetails, Anthropic::Models::ClaudeCodeKeyCreatorNotMemberErrorDetails, Anthropic::Models::ClaudeCodeVersionTooOldErrorDetails, Anthropic::Models::CMEKKeyDisabledErrorDetails, Anthropic::Models::CMEKKeyNetworkBlockedErrorDetails, Anthropic::Models::CompactionBlockAmbiguousErrorDetails, Anthropic::Models::CompactionBlockMisplacedErrorDetails, Anthropic::Models::CompactionContentMismatchErrorDetails, Anthropic::Models::CompactionIncompleteTurnErrorDetails, Anthropic::Models::CompactionNothingToSummarizeErrorDetails, Anthropic::Models::CompactionSignatureInvalidErrorDetails, Anthropic::Models::CompactionTooManyToolReferencesErrorDetails, Anthropic::Models::CompactionToolChangesMismatchErrorDetails, Anthropic::Models::ImageDimensionsTooLargeErrorDetails, Anthropic::Models::OrganizationOnHoldErrorDetails, Anthropic::Models::RequestBodyEncodingInvalidErrorDetails, Anthropic::Models::RequestBodyEncodingUnsupportedErrorDetails, Anthropic::Models::ThreadAlreadyContinuedErrorDetails, Anthropic::Models::ThreadContinueInFlightErrorDetails, Anthropic::Models::ThreadFingerprintMismatchErrorDetails, Anthropic::Models::ThreadUnsupportedRequestErrorDetails, Anthropic::Models::ToolNameConflictErrorDetails, Anthropic::Models::ToolReferenceUnresolvedErrorDetails, Anthropic::Models::UserProfileRequiredErrorDetails, Anthropic::Models::LinkedOrganizationBillingUnavailableErrorDetails, Anthropic::Models::LinkedOrganizationSpendLimitReachedErrorDetails, Anthropic::Models::UserProfileBillingNotAuthorizedErrorDetails, Anthropic::Models::UserProfileNotBillableErrorDetails, Anthropic::Models::ThreadNotFoundErrorDetails, Anthropic::Models::SkillReadBlockedUndecryptableErrorDetails, Anthropic::Models::RequestBodyTooLargeAfterDecodingErrorDetails, Anthropic::Models::ContractSpendLimitReachedErrorDetails, Anthropic::Models::EnforcedSpendLimitReachedErrorDetails, Anthropic::Models::RampLimitExceededErrorDetails, Anthropic::Models::CMEKKeyUnreachableErrorDetails, Anthropic::Models::CompactionUnavailableErrorDetails, Anthropic::Models::StorageQuotaExceededErrorDetails, Anthropic::Models::FileNotDownloadableErrorDetails, Anthropic::Models::FileExpiredErrorDetails, Anthropic::Models::CMEKContextUnavailableErrorDetails, Anthropic::Models::Organization::OrgAPIKeyLimitExceededErrorDetails, Anthropic::Models::Organization::WorkspaceAPIKeyLimitExceededErrorDetails, Anthropic::Models::SandboxEgressRestrictedErrorDetails, Anthropic::Models::UserProfileNotFoundErrorDetails, Anthropic::Models::Organization::ExternalKeyInWorkspacePolicyErrorDetails, Anthropic::Models::Organization::AlreadyMemberErrorDetails, Anthropic::Models::Organization::CannotInviteEmailsWithUnverifiedDomainsErrorDetails, Anthropic::Models::Organization::EmailDomainNotAllowedErrorDetails, Anthropic::Models::Organization::InviteAlreadyExistsErrorDetails, Anthropic::Models::OrgMemberLimitExceededErrorDetails, Anthropic::Models::Organization::RBACGroupGrantsOwnerAccessErrorDetails, Anthropic::Models::Organization::RBACGroupOwnerAccessUnconfirmedErrorDetails, Anthropic::Models::Organization::CannotRemoveLastMemberErrorDetails, Anthropic::Models::ConcurrentMembershipChangeErrorDetails, Anthropic::Models::Organization::ExternalKeyValidationFailedErrorDetails, Anthropic::Models::Organization::ExternalKeyValidationTimedOutErrorDetails, Anthropic::Models::Organization::KeyProfileMismatchErrorDetails, Anthropic::Models::Organization::WorkspacePolicyViolationErrorDetails, Anthropic::Models::Organization::ExternalKeyChangedErrorDetails, Anthropic::Models::Organization::WorkspaceMemberLimitExceededErrorDetails, Anthropic::Models::OrganizationTypeNotSupportedErrorDetails, Anthropic::Models::ParentOrganizationRequiredErrorDetails, Anthropic::Models::RBACRoleNotFoundErrorDetails, Anthropic::Models::Beta::BetaEnvironmentCreateDisabledErrorDetails, Anthropic::Models::Beta::BetaEnvironmentArchivedErrorDetails, Anthropic::Models::Beta::BetaInvalidConfigTypeChangeErrorDetails, Anthropic::Models::Beta::BetaEnvironmentUpdateDisabledErrorDetails, Anthropic::Models::Beta::Environments::BetaHeartbeatPreconditionFailedErrorDetails, Anthropic::Models::Beta::BetaInvalidMetadataErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutPrimaryOwnerErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutSelfErrorDetails, Anthropic::Models::BetaOrganizationNotEnrolledInBetaErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutManagedMemberErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutMembershipAdminErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutOwnerErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutPrivilegedMemberErrorDetails, Anthropic::Models::Beta::Organization::BetaSpendLimitsAdminAPIWritesNotEnabledErrorDetails, Anthropic::Models::BetaUnsupportedCharsetErrorDetails, Anthropic::Models::Beta::Organization::BetaPluginNameTakenErrorDetails, Anthropic::Models::Beta::Organization::BetaSkillNameTakenErrorDetails, Anthropic::Models::Beta::Organization::BetaRegistrationPendingErrorDetails, Anthropic::Models::Beta::Organization::BetaScanFailedErrorDetails, Anthropic::Models::Beta::Organization::BetaScanPendingErrorDetails, Anthropic::Models::BetaRequestBodyTimeoutErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaSettingsDocumentLimitExceededErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaSettingsHistoryLimitExceededErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaCMEKFeatureUnsupportedErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaRBACGroupManagedSettingsNotFoundErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaRBACGroupOrderLimitExceededErrorDetails, Anthropic::Models::Beta::Organization::BetaRBACGroupNotFoundErrorDetails, Anthropic::Models::Beta::Organization::BetaSlackChannelSetUpSettingsRefusedErrorDetails, Anthropic::Models::Beta::Organization::BetaAPIKeyScopeMissingErrorDetails, Anthropic::Models::Beta::Organization::BetaClaudeTagWritesNotEnabledErrorDetails, Anthropic::Models::Beta::Organization::BetaComplianceConfigurationRestrictedErrorDetails, Anthropic::Models::Beta::Organization::BetaOrganizationLevelScopedAPIKeyRequiredErrorDetails, Anthropic::Models::Beta::BetaEnvironmentNotFoundErrorDetails, Anthropic::Models::Beta::Organization::BetaSlackChannelSetUpEnvironmentNotFoundErrorDetails, Anthropic::Models::Beta::Organization::BetaSlackChannelSetUpSettingsConflictErrorDetails, Anthropic::Models::Beta::Organization::BetaBundleAttachmentNotSupportedErrorDetails, Anthropic::Models::Beta::Organization::BetaBundleOnCallErrorDetails)]
415
452
 
416
453
  # Creates a new instance of the variant class whose `error_code` matches the given
417
454
  # value, passing the remaining arguments to its constructor.
@@ -423,6 +460,10 @@ module Anthropic
423
460
  #
424
461
  # @param args [Hash{Symbol=>Object}] Attributes for the chosen variant.
425
462
  #
463
+ # @option args [Integer] :max_side_length_pixels The limit the images exceeded: the largest width or height, in pixels, that an i
464
+ #
465
+ # @option args [Array<String>] :paths The position of every image over the limit, in the order you sent them, nested b
466
+ #
426
467
  # @option args [String, nil] :appeal_url
427
468
  #
428
469
  # @option args [Array<Symbol, Anthropic::Models::ThreadUnsupportedFeatureName>, nil] :unsupported Each entry names a request field or an organization setting that Threads do not
@@ -440,7 +481,7 @@ module Anthropic
440
481
  # @option args [String] :slack_channel_id The identifier of the channel the request set up, starting with `slch_`.
441
482
  #
442
483
  # @raise [ArgumentError]
443
- # @return [Anthropic::Models::AvailableToolsLimitExceededErrorDetails, Anthropic::Models::ClaudeCodeKeyCreatorNotMemberErrorDetails, Anthropic::Models::ClaudeCodeVersionTooOldErrorDetails, Anthropic::Models::CMEKKeyDisabledErrorDetails, Anthropic::Models::CMEKKeyNetworkBlockedErrorDetails, Anthropic::Models::CompactionBlockAmbiguousErrorDetails, Anthropic::Models::CompactionBlockMisplacedErrorDetails, Anthropic::Models::CompactionContentMismatchErrorDetails, Anthropic::Models::CompactionIncompleteTurnErrorDetails, Anthropic::Models::CompactionNothingToSummarizeErrorDetails, Anthropic::Models::CompactionSignatureInvalidErrorDetails, Anthropic::Models::CompactionTooManyToolReferencesErrorDetails, Anthropic::Models::CompactionToolChangesMismatchErrorDetails, Anthropic::Models::OrganizationOnHoldErrorDetails, Anthropic::Models::RequestBodyEncodingInvalidErrorDetails, Anthropic::Models::RequestBodyEncodingUnsupportedErrorDetails, Anthropic::Models::ThreadAlreadyContinuedErrorDetails, Anthropic::Models::ThreadContinueInFlightErrorDetails, Anthropic::Models::ThreadFingerprintMismatchErrorDetails, Anthropic::Models::ThreadUnsupportedRequestErrorDetails, Anthropic::Models::ToolNameConflictErrorDetails, Anthropic::Models::ToolReferenceUnresolvedErrorDetails, Anthropic::Models::UserProfileRequiredErrorDetails, Anthropic::Models::LinkedOrganizationBillingUnavailableErrorDetails, Anthropic::Models::LinkedOrganizationSpendLimitReachedErrorDetails, Anthropic::Models::UserProfileBillingNotAuthorizedErrorDetails, Anthropic::Models::UserProfileNotBillableErrorDetails, Anthropic::Models::ThreadNotFoundErrorDetails, Anthropic::Models::SkillReadBlockedUndecryptableErrorDetails, Anthropic::Models::RequestBodyTooLargeAfterDecodingErrorDetails, Anthropic::Models::ContractSpendLimitReachedErrorDetails, Anthropic::Models::EnforcedSpendLimitReachedErrorDetails, Anthropic::Models::RampLimitExceededErrorDetails, Anthropic::Models::CMEKKeyUnreachableErrorDetails, Anthropic::Models::CompactionUnavailableErrorDetails, Anthropic::Models::StorageQuotaExceededErrorDetails, Anthropic::Models::FileNotDownloadableErrorDetails, Anthropic::Models::FileExpiredErrorDetails, Anthropic::Models::CMEKContextUnavailableErrorDetails, Anthropic::Models::Organization::OrgAPIKeyLimitExceededErrorDetails, Anthropic::Models::Organization::WorkspaceAPIKeyLimitExceededErrorDetails, Anthropic::Models::SandboxEgressRestrictedErrorDetails, Anthropic::Models::UserProfileNotFoundErrorDetails, Anthropic::Models::Organization::ExternalKeyInWorkspacePolicyErrorDetails, Anthropic::Models::Organization::AlreadyMemberErrorDetails, Anthropic::Models::Organization::CannotInviteEmailsWithUnverifiedDomainsErrorDetails, Anthropic::Models::Organization::EmailDomainNotAllowedErrorDetails, Anthropic::Models::Organization::InviteAlreadyExistsErrorDetails, Anthropic::Models::OrgMemberLimitExceededErrorDetails, Anthropic::Models::Organization::RBACGroupGrantsOwnerAccessErrorDetails, Anthropic::Models::Organization::RBACGroupOwnerAccessUnconfirmedErrorDetails, Anthropic::Models::Organization::CannotRemoveLastMemberErrorDetails, Anthropic::Models::ConcurrentMembershipChangeErrorDetails, Anthropic::Models::Organization::ExternalKeyValidationFailedErrorDetails, Anthropic::Models::Organization::ExternalKeyValidationTimedOutErrorDetails, Anthropic::Models::Organization::KeyProfileMismatchErrorDetails, Anthropic::Models::Organization::WorkspacePolicyViolationErrorDetails, Anthropic::Models::Organization::ExternalKeyChangedErrorDetails, Anthropic::Models::Organization::WorkspaceMemberLimitExceededErrorDetails, Anthropic::Models::OrganizationTypeNotSupportedErrorDetails, Anthropic::Models::ParentOrganizationRequiredErrorDetails, Anthropic::Models::RBACRoleNotFoundErrorDetails, Anthropic::Models::Beta::BetaEnvironmentCreateDisabledErrorDetails, Anthropic::Models::Beta::BetaEnvironmentArchivedErrorDetails, Anthropic::Models::Beta::BetaInvalidConfigTypeChangeErrorDetails, Anthropic::Models::Beta::BetaEnvironmentUpdateDisabledErrorDetails, Anthropic::Models::Beta::Environments::BetaHeartbeatPreconditionFailedErrorDetails, Anthropic::Models::Beta::BetaInvalidMetadataErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutPrimaryOwnerErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutSelfErrorDetails, Anthropic::Models::BetaOrganizationNotEnrolledInBetaErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutManagedMemberErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutMembershipAdminErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutOwnerErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutPrivilegedMemberErrorDetails, Anthropic::Models::Beta::Organization::BetaSpendLimitsAdminAPIWritesNotEnabledErrorDetails, Anthropic::Models::BetaUnsupportedCharsetErrorDetails, Anthropic::Models::Beta::Organization::BetaPluginNameTakenErrorDetails, Anthropic::Models::Beta::Organization::BetaSkillNameTakenErrorDetails, Anthropic::Models::Beta::Organization::BetaRegistrationPendingErrorDetails, Anthropic::Models::Beta::Organization::BetaScanFailedErrorDetails, Anthropic::Models::Beta::Organization::BetaScanPendingErrorDetails, Anthropic::Models::Beta::Organization::BetaSlackChannelSetUpSettingsRefusedErrorDetails, Anthropic::Models::Beta::Organization::BetaAPIKeyScopeMissingErrorDetails, Anthropic::Models::Beta::Organization::BetaClaudeTagWritesNotEnabledErrorDetails, Anthropic::Models::Beta::Organization::BetaComplianceConfigurationRestrictedErrorDetails, Anthropic::Models::Beta::Organization::BetaOrganizationLevelScopedAPIKeyRequiredErrorDetails, Anthropic::Models::Beta::BetaEnvironmentNotFoundErrorDetails, Anthropic::Models::Beta::Organization::BetaSlackChannelSetUpEnvironmentNotFoundErrorDetails, Anthropic::Models::Beta::Organization::BetaSlackChannelSetUpSettingsConflictErrorDetails, Anthropic::Models::Beta::Organization::BetaBundleAttachmentNotSupportedErrorDetails, Anthropic::Models::Beta::Organization::BetaBundleOnCallErrorDetails]
484
+ # @return [Anthropic::Models::AvailableToolsLimitExceededErrorDetails, Anthropic::Models::ClaudeCodeKeyCreatorNotMemberErrorDetails, Anthropic::Models::ClaudeCodeVersionTooOldErrorDetails, Anthropic::Models::CMEKKeyDisabledErrorDetails, Anthropic::Models::CMEKKeyNetworkBlockedErrorDetails, Anthropic::Models::CompactionBlockAmbiguousErrorDetails, Anthropic::Models::CompactionBlockMisplacedErrorDetails, Anthropic::Models::CompactionContentMismatchErrorDetails, Anthropic::Models::CompactionIncompleteTurnErrorDetails, Anthropic::Models::CompactionNothingToSummarizeErrorDetails, Anthropic::Models::CompactionSignatureInvalidErrorDetails, Anthropic::Models::CompactionTooManyToolReferencesErrorDetails, Anthropic::Models::CompactionToolChangesMismatchErrorDetails, Anthropic::Models::ImageDimensionsTooLargeErrorDetails, Anthropic::Models::OrganizationOnHoldErrorDetails, Anthropic::Models::RequestBodyEncodingInvalidErrorDetails, Anthropic::Models::RequestBodyEncodingUnsupportedErrorDetails, Anthropic::Models::ThreadAlreadyContinuedErrorDetails, Anthropic::Models::ThreadContinueInFlightErrorDetails, Anthropic::Models::ThreadFingerprintMismatchErrorDetails, Anthropic::Models::ThreadUnsupportedRequestErrorDetails, Anthropic::Models::ToolNameConflictErrorDetails, Anthropic::Models::ToolReferenceUnresolvedErrorDetails, Anthropic::Models::UserProfileRequiredErrorDetails, Anthropic::Models::LinkedOrganizationBillingUnavailableErrorDetails, Anthropic::Models::LinkedOrganizationSpendLimitReachedErrorDetails, Anthropic::Models::UserProfileBillingNotAuthorizedErrorDetails, Anthropic::Models::UserProfileNotBillableErrorDetails, Anthropic::Models::ThreadNotFoundErrorDetails, Anthropic::Models::SkillReadBlockedUndecryptableErrorDetails, Anthropic::Models::RequestBodyTooLargeAfterDecodingErrorDetails, Anthropic::Models::ContractSpendLimitReachedErrorDetails, Anthropic::Models::EnforcedSpendLimitReachedErrorDetails, Anthropic::Models::RampLimitExceededErrorDetails, Anthropic::Models::CMEKKeyUnreachableErrorDetails, Anthropic::Models::CompactionUnavailableErrorDetails, Anthropic::Models::StorageQuotaExceededErrorDetails, Anthropic::Models::FileNotDownloadableErrorDetails, Anthropic::Models::FileExpiredErrorDetails, Anthropic::Models::CMEKContextUnavailableErrorDetails, Anthropic::Models::Organization::OrgAPIKeyLimitExceededErrorDetails, Anthropic::Models::Organization::WorkspaceAPIKeyLimitExceededErrorDetails, Anthropic::Models::SandboxEgressRestrictedErrorDetails, Anthropic::Models::UserProfileNotFoundErrorDetails, Anthropic::Models::Organization::ExternalKeyInWorkspacePolicyErrorDetails, Anthropic::Models::Organization::AlreadyMemberErrorDetails, Anthropic::Models::Organization::CannotInviteEmailsWithUnverifiedDomainsErrorDetails, Anthropic::Models::Organization::EmailDomainNotAllowedErrorDetails, Anthropic::Models::Organization::InviteAlreadyExistsErrorDetails, Anthropic::Models::OrgMemberLimitExceededErrorDetails, Anthropic::Models::Organization::RBACGroupGrantsOwnerAccessErrorDetails, Anthropic::Models::Organization::RBACGroupOwnerAccessUnconfirmedErrorDetails, Anthropic::Models::Organization::CannotRemoveLastMemberErrorDetails, Anthropic::Models::ConcurrentMembershipChangeErrorDetails, Anthropic::Models::Organization::ExternalKeyValidationFailedErrorDetails, Anthropic::Models::Organization::ExternalKeyValidationTimedOutErrorDetails, Anthropic::Models::Organization::KeyProfileMismatchErrorDetails, Anthropic::Models::Organization::WorkspacePolicyViolationErrorDetails, Anthropic::Models::Organization::ExternalKeyChangedErrorDetails, Anthropic::Models::Organization::WorkspaceMemberLimitExceededErrorDetails, Anthropic::Models::OrganizationTypeNotSupportedErrorDetails, Anthropic::Models::ParentOrganizationRequiredErrorDetails, Anthropic::Models::RBACRoleNotFoundErrorDetails, Anthropic::Models::Beta::BetaEnvironmentCreateDisabledErrorDetails, Anthropic::Models::Beta::BetaEnvironmentArchivedErrorDetails, Anthropic::Models::Beta::BetaInvalidConfigTypeChangeErrorDetails, Anthropic::Models::Beta::BetaEnvironmentUpdateDisabledErrorDetails, Anthropic::Models::Beta::Environments::BetaHeartbeatPreconditionFailedErrorDetails, Anthropic::Models::Beta::BetaInvalidMetadataErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutPrimaryOwnerErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutSelfErrorDetails, Anthropic::Models::BetaOrganizationNotEnrolledInBetaErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutManagedMemberErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutMembershipAdminErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutOwnerErrorDetails, Anthropic::Models::Beta::Organization::BetaCannotSignOutPrivilegedMemberErrorDetails, Anthropic::Models::Beta::Organization::BetaSpendLimitsAdminAPIWritesNotEnabledErrorDetails, Anthropic::Models::BetaUnsupportedCharsetErrorDetails, Anthropic::Models::Beta::Organization::BetaPluginNameTakenErrorDetails, Anthropic::Models::Beta::Organization::BetaSkillNameTakenErrorDetails, Anthropic::Models::Beta::Organization::BetaRegistrationPendingErrorDetails, Anthropic::Models::Beta::Organization::BetaScanFailedErrorDetails, Anthropic::Models::Beta::Organization::BetaScanPendingErrorDetails, Anthropic::Models::BetaRequestBodyTimeoutErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaSettingsDocumentLimitExceededErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaSettingsHistoryLimitExceededErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaCMEKFeatureUnsupportedErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaRBACGroupManagedSettingsNotFoundErrorDetails, Anthropic::Models::Beta::Organization::ClaudeCode::BetaRBACGroupOrderLimitExceededErrorDetails, Anthropic::Models::Beta::Organization::BetaRBACGroupNotFoundErrorDetails, Anthropic::Models::Beta::Organization::BetaSlackChannelSetUpSettingsRefusedErrorDetails, Anthropic::Models::Beta::Organization::BetaAPIKeyScopeMissingErrorDetails, Anthropic::Models::Beta::Organization::BetaClaudeTagWritesNotEnabledErrorDetails, Anthropic::Models::Beta::Organization::BetaComplianceConfigurationRestrictedErrorDetails, Anthropic::Models::Beta::Organization::BetaOrganizationLevelScopedAPIKeyRequiredErrorDetails, Anthropic::Models::Beta::BetaEnvironmentNotFoundErrorDetails, Anthropic::Models::Beta::Organization::BetaSlackChannelSetUpEnvironmentNotFoundErrorDetails, Anthropic::Models::Beta::Organization::BetaSlackChannelSetUpSettingsConflictErrorDetails, Anthropic::Models::Beta::Organization::BetaBundleAttachmentNotSupportedErrorDetails, Anthropic::Models::Beta::Organization::BetaBundleOnCallErrorDetails]
444
485
  def self.new(error_code:, **args)
445
486
  case error_code.to_sym
446
487
  when :available_tools_limit_exceeded
@@ -469,6 +510,8 @@ module Anthropic
469
510
  Anthropic::CompactionTooManyToolReferencesErrorDetails.new(**args)
470
511
  when :compaction_tool_changes_mismatch
471
512
  Anthropic::CompactionToolChangesMismatchErrorDetails.new(**args)
513
+ when :image_dimensions_too_large
514
+ Anthropic::ImageDimensionsTooLargeErrorDetails.new(**args)
472
515
  when :organization_on_hold
473
516
  Anthropic::OrganizationOnHoldErrorDetails.new(**args)
474
517
  when :request_body_encoding_invalid
@@ -607,6 +650,20 @@ module Anthropic
607
650
  Anthropic::Beta::Organization::BetaScanFailedErrorDetails.new(**args)
608
651
  when :scan_pending
609
652
  Anthropic::Beta::Organization::BetaScanPendingErrorDetails.new(**args)
653
+ when :request_body_timeout
654
+ Anthropic::BetaRequestBodyTimeoutErrorDetails.new(**args)
655
+ when :settings_document_limit_exceeded
656
+ Anthropic::Beta::Organization::ClaudeCode::BetaSettingsDocumentLimitExceededErrorDetails.new(**args)
657
+ when :settings_history_limit_exceeded
658
+ Anthropic::Beta::Organization::ClaudeCode::BetaSettingsHistoryLimitExceededErrorDetails.new(**args)
659
+ when :cmek_feature_unsupported
660
+ Anthropic::Beta::Organization::ClaudeCode::BetaCMEKFeatureUnsupportedErrorDetails.new(**args)
661
+ when :rbac_group_managed_settings_not_found
662
+ Anthropic::Beta::Organization::ClaudeCode::BetaRBACGroupManagedSettingsNotFoundErrorDetails.new(**args)
663
+ when :rbac_group_order_limit_exceeded
664
+ Anthropic::Beta::Organization::ClaudeCode::BetaRBACGroupOrderLimitExceededErrorDetails.new(**args)
665
+ when :rbac_group_not_found
666
+ Anthropic::Beta::Organization::BetaRBACGroupNotFoundErrorDetails.new(**args)
610
667
  when :slack_channel_set_up_settings_refused
611
668
  Anthropic::Beta::Organization::BetaSlackChannelSetUpSettingsRefusedErrorDetails.new(**args)
612
669
  when :api_key_scope_missing
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ # The longest side of one or more images in the request exceeds the image size
6
+ # limit. Scale each image in `paths` so that neither side exceeds
7
+ # `max_side_length_pixels`, or remove it, then retry.
8
+ class ImageDimensionsTooLargeError < Anthropic::Errors::BadRequestError
9
+ # @!method error_code
10
+ # @return [Symbol, :image_dimensions_too_large]
11
+
12
+ # @return [Anthropic::Models::ImageDimensionsTooLargeErrorDetails]
13
+ def details
14
+ Anthropic::Internal::Type::Converter.coerce(
15
+ Anthropic::ImageDimensionsTooLargeErrorDetails,
16
+ Anthropic::Internal::Util.dig(body, [:error, :details])
17
+ )
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ class ImageDimensionsTooLargeErrorDetails < Anthropic::Internal::Type::BaseModel
6
+ # @!attribute error_code
7
+ #
8
+ # @return [Symbol, :image_dimensions_too_large]
9
+ required :error_code, const: :image_dimensions_too_large
10
+
11
+ # @!attribute max_side_length_pixels
12
+ # The limit the images exceeded: the largest width or height, in pixels, that an
13
+ # image on this request may have.
14
+ #
15
+ # @return [Integer]
16
+ required :max_side_length_pixels, Integer
17
+
18
+ # @!attribute paths
19
+ # The position of every image over the limit, in the order you sent them, nested
20
+ # blocks included, such as `messages.0.content.1`, or
21
+ # `messages.0.content.1.content.0` for an image in a `tool_result` block.
22
+ #
23
+ # @return [Array<String>]
24
+ required :paths, Anthropic::Internal::Type::ArrayOf[String]
25
+
26
+ # @!method initialize(max_side_length_pixels:, paths:, error_code: :image_dimensions_too_large)
27
+ # The longest side of one or more images in the request exceeds the image size
28
+ # limit. Scale each image in `paths` so that neither side exceeds
29
+ # `max_side_length_pixels`, or remove it, then retry.
30
+ #
31
+ # Some parameter documentations has been truncated, see
32
+ # {Anthropic::Models::ImageDimensionsTooLargeErrorDetails} for more details.
33
+ #
34
+ # @param max_side_length_pixels [Integer] The limit the images exceeded: the largest width or height, in pixels, that an i
35
+ #
36
+ # @param paths [Array<String>] The position of every image over the limit, in the order you sent them, nested b
37
+ #
38
+ # @param error_code [Symbol, :image_dimensions_too_large]
39
+ end
40
+ end
41
+ end
@@ -6,7 +6,7 @@ module Anthropic
6
6
  class OrganizationRateLimitValue < Anthropic::Internal::Type::BaseModel
7
7
  # @!attribute type
8
8
  # The limiter type (for example, `requests_per_minute` or
9
- # `input_tokens_per_minute`).
9
+ # `input_tokens_per_minute_cache_aware`).
10
10
  #
11
11
  # @return [String]
12
12
  required :type, String
@@ -4,7 +4,13 @@ module Anthropic
4
4
  module Models
5
5
  module Organization
6
6
  module Workspaces
7
- # Rate limiter type.
7
+ # Rate limiter type. `input_tokens_per_minute` counts every input token, cache
8
+ # reads included. `input_tokens_per_minute_cache_aware` does not count cache
9
+ # reads, and on current models the organization's input-token limit usually has
10
+ # this type. A workspace limit of either type applies alongside the organization's
11
+ # limit, not in place of it. Because cache reads count toward an
12
+ # `input_tokens_per_minute` limit, it can reject requests that read mostly from
13
+ # the cache while the organization's limit still has room.
8
14
  module WorkspaceRateLimitType
9
15
  extend Anthropic::Internal::Type::Enum
10
16
 
@@ -6,7 +6,13 @@ module Anthropic
6
6
  module Workspaces
7
7
  class WorkspaceRateLimitUpdateValue < Anthropic::Internal::Type::BaseModel
8
8
  # @!attribute type
9
- # Rate limiter type.
9
+ # Rate limiter type. `input_tokens_per_minute` counts every input token, cache
10
+ # reads included. `input_tokens_per_minute_cache_aware` does not count cache
11
+ # reads, and on current models the organization's input-token limit usually has
12
+ # this type. A workspace limit of either type applies alongside the organization's
13
+ # limit, not in place of it. Because cache reads count toward an
14
+ # `input_tokens_per_minute` limit, it can reject requests that read mostly from
15
+ # the cache while the organization's limit still has room.
10
16
  #
11
17
  # @return [Symbol, Anthropic::Models::Organization::Workspaces::WorkspaceRateLimitType]
12
18
  required :type, enum: -> { Anthropic::Organization::Workspaces::WorkspaceRateLimitType }
@@ -23,7 +29,7 @@ module Anthropic
23
29
  # {Anthropic::Models::Organization::Workspaces::WorkspaceRateLimitUpdateValue} for
24
30
  # more details.
25
31
  #
26
- # @param type [Symbol, Anthropic::Models::Organization::Workspaces::WorkspaceRateLimitType] Rate limiter type.
32
+ # @param type [Symbol, Anthropic::Models::Organization::Workspaces::WorkspaceRateLimitType] Rate limiter type. `input_tokens_per_minute` counts every input token, cache rea
27
33
  #
28
34
  # @param value [Integer, nil] New limit value. Set to null to clear the workspace override and fall back to th
29
35
  end
@@ -21,7 +21,7 @@ module Anthropic
21
21
 
22
22
  # @!attribute type
23
23
  # The limiter type (for example, `requests_per_minute` or
24
- # `input_tokens_per_minute`).
24
+ # `input_tokens_per_minute_cache_aware`).
25
25
  #
26
26
  # @return [String]
27
27
  required :type, String
@@ -3,7 +3,7 @@
3
3
  module Anthropic
4
4
  module Models
5
5
  # The request came from a Claude sandbox with restricted network access, which is
6
- # not allowed to make this change. Send it from outside the sandbox, or from a
6
+ # not allowed to make this request. Send it from outside the sandbox, or from a
7
7
  # sandbox with unrestricted network access.
8
8
  class SandboxEgressRestrictedError < Anthropic::Errors::PermissionDeniedError
9
9
  # @!method error_code
@@ -10,7 +10,7 @@ module Anthropic
10
10
 
11
11
  # @!method initialize(error_code: :sandbox_egress_restricted)
12
12
  # The request came from a Claude sandbox with restricted network access, which is
13
- # not allowed to make this change. Send it from outside the sandbox, or from a
13
+ # not allowed to make this request. Send it from outside the sandbox, or from a
14
14
  # sandbox with unrestricted network access.
15
15
  #
16
16
  # @param error_code [Symbol, :sandbox_egress_restricted]
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Anthropic
4
4
  module Models
5
- # The customer that the named user profile represents has not authorized the
5
+ # The customer that the request's user profile represents has not authorized the
6
6
  # caller to bill them, or the authorization that the request's credential uses has
7
7
  # ended. The response does not say which applies.
8
8
  class UserProfileBillingNotAuthorizedError < Anthropic::Errors::PermissionDeniedError
@@ -9,7 +9,7 @@ module Anthropic
9
9
  required :error_code, const: :user_profile_billing_not_authorized
10
10
 
11
11
  # @!method initialize(error_code: :user_profile_billing_not_authorized)
12
- # The customer that the named user profile represents has not authorized the
12
+ # The customer that the request's user profile represents has not authorized the
13
13
  # caller to bill them, or the authorization that the request's credential uses has
14
14
  # ended. The response does not say which applies.
15
15
  #
@@ -2,8 +2,8 @@
2
2
 
3
3
  module Anthropic
4
4
  module Models
5
- # The caller is not allowed to bill the user profile that the request names. The
6
- # response gives no more specific error code and does not say what the reason is.
5
+ # The request's user profile cannot be billed. The response gives no more specific
6
+ # error code and does not say what the reason is.
7
7
  class UserProfileNotBillableError < Anthropic::Errors::PermissionDeniedError
8
8
  # @!method error_code
9
9
  # @return [Symbol, :user_profile_not_billable]
@@ -9,8 +9,8 @@ module Anthropic
9
9
  required :error_code, const: :user_profile_not_billable
10
10
 
11
11
  # @!method initialize(error_code: :user_profile_not_billable)
12
- # The caller is not allowed to bill the user profile that the request names. The
13
- # response gives no more specific error code and does not say what the reason is.
12
+ # The request's user profile cannot be billed. The response gives no more specific
13
+ # error code and does not say what the reason is.
14
14
  #
15
15
  # @param error_code [Symbol, :user_profile_not_billable]
16
16
  end
@@ -130,6 +130,10 @@ module Anthropic
130
130
 
131
131
  BetaRateLimitErrorObject = Anthropic::Models::BetaRateLimitErrorObject
132
132
 
133
+ BetaRequestBodyTimeoutError = Anthropic::Models::BetaRequestBodyTimeoutError
134
+
135
+ BetaRequestBodyTimeoutErrorDetails = Anthropic::Models::BetaRequestBodyTimeoutErrorDetails
136
+
133
137
  BetaUnsupportedCharsetError = Anthropic::Models::BetaUnsupportedCharsetError
134
138
 
135
139
  BetaUnsupportedCharsetErrorDetails = Anthropic::Models::BetaUnsupportedCharsetErrorDetails
@@ -697,6 +701,10 @@ module Anthropic
697
701
 
698
702
  ImageBlockParam = Anthropic::Models::ImageBlockParam
699
703
 
704
+ ImageDimensionsTooLargeError = Anthropic::Models::ImageDimensionsTooLargeError
705
+
706
+ ImageDimensionsTooLargeErrorDetails = Anthropic::Models::ImageDimensionsTooLargeErrorDetails
707
+
700
708
  ImageTransformationsParam = Anthropic::Models::ImageTransformationsParam
701
709
 
702
710
  InputJSONDelta = Anthropic::Models::InputJSONDelta
@@ -147,6 +147,7 @@ module Anthropic
147
147
  # @raise [Anthropic::Models::CompactionSignatureInvalidError]
148
148
  # @raise [Anthropic::Models::CompactionTooManyToolReferencesError]
149
149
  # @raise [Anthropic::Models::CompactionToolChangesMismatchError]
150
+ # @raise [Anthropic::Models::ImageDimensionsTooLargeError]
150
151
  # @raise [Anthropic::Models::OrganizationOnHoldError]
151
152
  # @raise [Anthropic::Models::RequestBodyEncodingInvalidError]
152
153
  # @raise [Anthropic::Models::RequestBodyEncodingUnsupportedError]
@@ -305,6 +306,7 @@ module Anthropic
305
306
  # @raise [Anthropic::Models::CompactionSignatureInvalidError]
306
307
  # @raise [Anthropic::Models::CompactionTooManyToolReferencesError]
307
308
  # @raise [Anthropic::Models::CompactionToolChangesMismatchError]
309
+ # @raise [Anthropic::Models::ImageDimensionsTooLargeError]
308
310
  # @raise [Anthropic::Models::OrganizationOnHoldError]
309
311
  # @raise [Anthropic::Models::RequestBodyEncodingInvalidError]
310
312
  # @raise [Anthropic::Models::RequestBodyEncodingUnsupportedError]
@@ -536,6 +538,7 @@ module Anthropic
536
538
  # @raise [Anthropic::Models::CompactionSignatureInvalidError]
537
539
  # @raise [Anthropic::Models::CompactionTooManyToolReferencesError]
538
540
  # @raise [Anthropic::Models::CompactionToolChangesMismatchError]
541
+ # @raise [Anthropic::Models::ImageDimensionsTooLargeError]
539
542
  # @raise [Anthropic::Models::OrganizationOnHoldError]
540
543
  # @raise [Anthropic::Models::RequestBodyEncodingInvalidError]
541
544
  # @raise [Anthropic::Models::RequestBodyEncodingUnsupportedError]
@@ -13,9 +13,10 @@ module Anthropic
13
13
  # Only cost attributed to a user account is included, so cost with no user
14
14
  # account, such as Code Review usage and Claude Tag usage in Slack channels, is
15
15
  # left out. Claude Tag one-to-one direct messages are included, with product
16
- # `claude-tag`, only for members who have connected a Claude account. Available to
17
- # organizations on a Claude Enterprise plan. Requires an API key with the
18
- # `read:analytics` scope.
16
+ # `claude-tag`, only for members who have connected a Claude account. To see all
17
+ # cost by product, call `GET /v1/organizations/analytics/cost_report` with
18
+ # `group_by[]=product`. Available to organizations on a Claude Enterprise plan.
19
+ # Requires an API key with the `read:analytics` scope.
19
20
  #
20
21
  # This endpoint is one of the legacy Claude Enterprise usage and cost reports. For
21
22
  # new integrations, use
@@ -14,8 +14,9 @@ module Anthropic
14
14
  # usage with no user account, such as Code Review usage and Claude Tag usage in
15
15
  # Slack channels, is left out. Claude Tag one-to-one direct messages are included,
16
16
  # with product `claude-tag`, only for members who have connected a Claude account.
17
- # Available to organizations on a Claude Enterprise plan. Requires an API key with
18
- # the `read:analytics` scope.
17
+ # To see all usage by product, call `GET /v1/organizations/analytics/usage_report`
18
+ # with `group_by[]=product`. Available to organizations on a Claude Enterprise
19
+ # plan. Requires an API key with the `read:analytics` scope.
19
20
  #
20
21
  # This endpoint is one of the legacy Claude Enterprise usage and cost reports. For
21
22
  # new integrations, use
@@ -0,0 +1,141 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Resources
5
+ class Beta
6
+ class Organization
7
+ class ClaudeCode
8
+ class ManagedSettings
9
+ class Configuration
10
+ # Retrieve the organization's Claude Code managed settings mode and RBAC Group
11
+ # order.
12
+ #
13
+ # **Accepted credentials:** an organization-level Admin API key with the
14
+ # `read:claude_code_managed_settings` scope.
15
+ #
16
+ # Every request must include the beta header
17
+ # `anthropic-beta: ce-claude-code-managed-settings-2026-10-06`. A request without
18
+ # it, or from an organization not enabled for this beta, returns `404`. The Claude
19
+ # Code Managed Settings API is in beta and is available to Claude Enterprise
20
+ # organizations only.
21
+ #
22
+ # Some parameter documentations has been truncated, see
23
+ # {Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::ConfigurationRetrieveParams}
24
+ # for more details.
25
+ #
26
+ # @overload retrieve(betas: nil, request_options: {})
27
+ #
28
+ # @param betas [Array<Symbol, String, Anthropic::Models::AnthropicBeta>] This endpoint is in beta: requests must send
29
+ #
30
+ # @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
31
+ #
32
+ # @return [Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeManagedSettingsConfiguration]
33
+ #
34
+ # @see Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::ConfigurationRetrieveParams
35
+ def retrieve(params = {})
36
+ parsed, options =
37
+ Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::ConfigurationRetrieveParams.dump_request(
38
+ params
39
+ )
40
+ @client.request(
41
+ qualifiers: {beta: "true"},
42
+ span_name: Anthropic::Internal::Tracing::SpanName::ORGANIZATION_CLAUDE_CODE_MANAGED_SETTINGS_CONFIGURATION_RETRIEVE,
43
+ span_route: "/v1/organizations/claude_code/managed_settings/configuration",
44
+ method: :get,
45
+ path: "v1/organizations/claude_code/managed_settings/configuration",
46
+ headers: parsed.transform_keys(betas: "anthropic-beta"),
47
+ model: Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeManagedSettingsConfiguration,
48
+ options: {
49
+ extra_headers: {"anthropic-beta" => "ce-claude-code-managed-settings-2026-10-06"}, **options
50
+ }
51
+ )
52
+ end
53
+
54
+ # Change the organization's Claude Code managed settings mode, the RBAC Group
55
+ # order, or both, in one atomic write.
56
+ #
57
+ # To change the order, send `rbac_group_order` with the `rbac_group_order_version`
58
+ # from the read the change is based on. If the order has changed since that read,
59
+ # the request returns `409`: read it again and retry. To switch modes only if the
60
+ # order has not changed, send the current `rbac_group_order` and
61
+ # `rbac_group_order_version` with the new `mode`.
62
+ #
63
+ # A switch to `rbac_groups` mode with no RBAC Group settings and no default
64
+ # settings copies the organization settings into a new default, in the same write,
65
+ # so members keep the settings they had. The copy does not follow later changes to
66
+ # the organization settings. If the organization settings cannot be copied, the
67
+ # request returns `400` and changes nothing. If they cannot be read, are over 1
68
+ # MiB or are not valid, setting the default settings first avoids the copy.
69
+ #
70
+ # After a switch to `rbac_groups` mode, a member in no listed RBAC Group receives
71
+ # the default settings, or no settings if no default is set, not the organization
72
+ # settings.
73
+ #
74
+ # **Accepted credentials:** an organization-level Admin API key with the
75
+ # `write:claude_code_managed_settings` scope.
76
+ #
77
+ # Every request must include the beta header
78
+ # `anthropic-beta: ce-claude-code-managed-settings-2026-10-06`. A request without
79
+ # it, or from an organization not enabled for this beta, returns `404`. The Claude
80
+ # Code Managed Settings API is in beta and is available to Claude Enterprise
81
+ # organizations only.
82
+ #
83
+ # A write that returns `503` may have applied. Retrying it is safe.
84
+ #
85
+ # Some parameter documentations has been truncated, see
86
+ # {Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::ConfigurationUpdateParams}
87
+ # for more details.
88
+ #
89
+ # @overload update(mode: nil, rbac_group_order: nil, rbac_group_order_version: nil, betas: nil, request_options: {})
90
+ #
91
+ # @param mode [Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeManagedSettingsOrganizationModeParam, Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeManagedSettingsRBACGroupsModeParam] Body param: The new mode, as an object such as `{"type": "rbac_groups"}`.
92
+ #
93
+ # @param rbac_group_order [Array<String>] Body param: Every RBAC Group that has settings, each listed once, in the new ord
94
+ #
95
+ # @param rbac_group_order_version [String] Body param: The `rbac_group_order_version` from the read this change is based on
96
+ #
97
+ # @param betas [Array<Symbol, String, Anthropic::Models::AnthropicBeta>] Header param: This endpoint is in beta: requests must send
98
+ #
99
+ # @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
100
+ #
101
+ # @raise [Anthropic::Models::CMEKKeyDisabledError]
102
+ # @raise [Anthropic::Models::BetaRequestBodyTimeoutError]
103
+ # @raise [Anthropic::Models::Beta::Organization::ClaudeCode::BetaSettingsDocumentLimitExceededError]
104
+ # @raise [Anthropic::Models::Beta::Organization::ClaudeCode::BetaSettingsHistoryLimitExceededError]
105
+ # @raise [Anthropic::Models::SandboxEgressRestrictedError]
106
+ #
107
+ # @return [Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeManagedSettingsConfiguration]
108
+ #
109
+ # @see Anthropic::Models::Beta::Organization::ClaudeCode::ManagedSettings::ConfigurationUpdateParams
110
+ def update(params = {})
111
+ parsed, options =
112
+ Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::ConfigurationUpdateParams.dump_request(params)
113
+ header_params = {betas: "anthropic-beta"}
114
+ @client.request(
115
+ qualifiers: {beta: "true"},
116
+ span_name: Anthropic::Internal::Tracing::SpanName::ORGANIZATION_CLAUDE_CODE_MANAGED_SETTINGS_CONFIGURATION_UPDATE,
117
+ span_route: "/v1/organizations/claude_code/managed_settings/configuration",
118
+ method: :post,
119
+ path: "v1/organizations/claude_code/managed_settings/configuration",
120
+ headers: parsed.slice(*header_params.keys).transform_keys(header_params),
121
+ body: parsed.except(*header_params.keys),
122
+ model: Anthropic::Beta::Organization::ClaudeCode::ManagedSettings::BetaClaudeCodeManagedSettingsConfiguration,
123
+ options: {
124
+ extra_headers: {"anthropic-beta" => "ce-claude-code-managed-settings-2026-10-06"}, **options
125
+ }
126
+ )
127
+ end
128
+
129
+ # @api private
130
+ #
131
+ # @param client [Anthropic::Client]
132
+ def initialize(client:)
133
+ @client = client
134
+ end
135
+ end
136
+ end
137
+ end
138
+ end
139
+ end
140
+ end
141
+ end