anthropic 1.67.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 (168) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +50 -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/models/anthropic_beta.rb +9 -0
  9. data/lib/anthropic/models/beta/beta_browser_toolset_20260801.rb +1 -28
  10. data/lib/anthropic/models/beta/beta_computer_toolset_20260801.rb +1 -28
  11. data/lib/anthropic/models/beta/beta_dreaming_error.rb +105 -0
  12. data/lib/anthropic/models/beta/beta_fallback_param.rb +2 -0
  13. data/lib/anthropic/models/beta/beta_managed_agents_deployment_run.rb +3 -3
  14. data/lib/anthropic/models/beta/beta_managed_agents_model.rb +5 -0
  15. data/lib/anthropic/models/beta/beta_managed_agents_outcome_evaluation_resource.rb +5 -5
  16. data/lib/anthropic/models/beta/beta_managed_agents_session.rb +2 -2
  17. data/lib/anthropic/models/beta/beta_managed_agents_session_stats.rb +2 -2
  18. data/lib/anthropic/models/beta/beta_message.rb +27 -1
  19. data/lib/anthropic/models/beta/beta_message_param.rb +48 -1
  20. data/lib/anthropic/models/beta/beta_raw_message_delta_event.rb +27 -1
  21. data/lib/anthropic/models/beta/beta_raw_message_stream_event.rb +2 -0
  22. data/lib/anthropic/models/beta/beta_system_message_output_config.rb +42 -0
  23. data/lib/anthropic/models/beta/beta_target_store_held_error.rb +39 -0
  24. data/lib/anthropic/models/beta/beta_thinking_block_binding.rb +33 -0
  25. data/lib/anthropic/models/beta/beta_thinking_config_adaptive.rb +11 -1
  26. data/lib/anthropic/models/beta/beta_thinking_config_enabled.rb +11 -1
  27. data/lib/anthropic/models/beta/beta_thinking_config_param.rb +2 -0
  28. data/lib/anthropic/models/beta/beta_thinking_dropped_input_transformation.rb +81 -0
  29. data/lib/anthropic/models/beta/beta_thinking_prefix_mismatch_behavior.rb +24 -0
  30. data/lib/anthropic/models/beta/beta_user_profile.rb +11 -29
  31. data/lib/anthropic/models/beta/deployment_list_params.rb +3 -3
  32. data/lib/anthropic/models/beta/deployment_run_list_params.rb +7 -8
  33. data/lib/anthropic/models/beta/memory_stores/memory_create_params.rb +2 -1
  34. data/lib/anthropic/models/beta/memory_stores/memory_update_params.rb +4 -3
  35. data/lib/anthropic/models/beta/organization/beta_aws_external_key_config.rb +8 -5
  36. data/lib/anthropic/models/beta/organization/beta_compliance_settings.rb +74 -0
  37. data/lib/anthropic/models/beta/organization/beta_compliance_settings_state_disabled.rb +19 -0
  38. data/lib/anthropic/models/beta/organization/beta_compliance_settings_state_disabled_param.rb +19 -0
  39. data/lib/anthropic/models/beta/organization/beta_compliance_settings_state_enabled.rb +19 -0
  40. data/lib/anthropic/models/beta/organization/beta_compliance_settings_state_enabled_param.rb +19 -0
  41. data/lib/anthropic/models/beta/organization/beta_external_key.rb +2 -2
  42. data/lib/anthropic/models/beta/organization/beta_workspace.rb +14 -6
  43. data/lib/anthropic/models/beta/organization/compliance_setting_retrieve_params.rb +18 -0
  44. data/lib/anthropic/models/beta/organization/compliance_setting_update_params.rb +76 -0
  45. data/lib/anthropic/models/beta/organization/external_key_create_params.rb +2 -2
  46. data/lib/anthropic/models/beta/organization/external_key_update_params.rb +2 -2
  47. data/lib/anthropic/models/beta/organization/workspace_create_params.rb +8 -4
  48. data/lib/anthropic/models/beta/organization/workspace_update_params.rb +8 -4
  49. data/lib/anthropic/models/beta/session_list_params.rb +7 -7
  50. data/lib/anthropic/models/beta/sessions/event_list_params.rb +5 -5
  51. data/lib/anthropic/models/beta/sessions/resource_list_params.rb +2 -2
  52. data/lib/anthropic/models/beta/sessions/thread_list_params.rb +2 -2
  53. data/lib/anthropic/models/beta/user_profile_create_params.rb +11 -27
  54. data/lib/anthropic/models/beta/user_profile_list_params.rb +20 -1
  55. data/lib/anthropic/models/beta/user_profile_update_params.rb +9 -29
  56. data/lib/anthropic/models/browser_toolset_20260801.rb +1 -28
  57. data/lib/anthropic/models/computer_toolset_20260801.rb +1 -28
  58. data/lib/anthropic/models/model.rb +10 -0
  59. data/lib/anthropic/resources/beta/deployment_runs.rb +2 -2
  60. data/lib/anthropic/resources/beta/deployments.rb +1 -1
  61. data/lib/anthropic/resources/beta/organization/compliance_settings.rb +79 -0
  62. data/lib/anthropic/resources/beta/organization.rb +4 -0
  63. data/lib/anthropic/resources/beta/sessions/events.rb +1 -1
  64. data/lib/anthropic/resources/beta/sessions/resources.rb +1 -1
  65. data/lib/anthropic/resources/beta/sessions/threads.rb +1 -1
  66. data/lib/anthropic/resources/beta/sessions.rb +3 -3
  67. data/lib/anthropic/resources/beta/user_profiles.rb +10 -8
  68. data/lib/anthropic/version.rb +1 -1
  69. data/lib/anthropic.rb +14 -0
  70. data/rbi/anthropic/helpers/tools/runner.rbi +5 -1
  71. data/rbi/anthropic/models/anthropic_beta.rbi +15 -0
  72. data/rbi/anthropic/models/beta/beta_browser_toolset_20260801.rbi +0 -81
  73. data/rbi/anthropic/models/beta/beta_computer_toolset_20260801.rbi +0 -81
  74. data/rbi/anthropic/models/beta/beta_dreaming_error.rbi +128 -0
  75. data/rbi/anthropic/models/beta/beta_fallback_param.rbi +6 -0
  76. data/rbi/anthropic/models/beta/beta_managed_agents_deployment_run.rbi +4 -4
  77. data/rbi/anthropic/models/beta/beta_managed_agents_model.rbi +7 -0
  78. data/rbi/anthropic/models/beta/beta_managed_agents_outcome_evaluation_resource.rbi +7 -7
  79. data/rbi/anthropic/models/beta/beta_managed_agents_session.rbi +2 -2
  80. data/rbi/anthropic/models/beta/beta_managed_agents_session_stats.rbi +2 -2
  81. data/rbi/anthropic/models/beta/beta_message.rbi +53 -1
  82. data/rbi/anthropic/models/beta/beta_message_param.rbi +93 -3
  83. data/rbi/anthropic/models/beta/beta_raw_message_delta_event.rbi +53 -1
  84. data/rbi/anthropic/models/beta/beta_raw_message_stream_event.rbi +22 -0
  85. data/rbi/anthropic/models/beta/beta_system_message_output_config.rbi +111 -0
  86. data/rbi/anthropic/models/beta/beta_target_store_held_error.rbi +50 -0
  87. data/rbi/anthropic/models/beta/beta_thinking_block_binding.rbi +67 -0
  88. data/rbi/anthropic/models/beta/beta_thinking_config_adaptive.rbi +22 -0
  89. data/rbi/anthropic/models/beta/beta_thinking_config_enabled.rbi +22 -0
  90. data/rbi/anthropic/models/beta/beta_thinking_config_param.rbi +6 -0
  91. data/rbi/anthropic/models/beta/beta_thinking_dropped_input_transformation.rbi +152 -0
  92. data/rbi/anthropic/models/beta/beta_thinking_prefix_mismatch_behavior.rbi +46 -0
  93. data/rbi/anthropic/models/beta/beta_user_profile.rbi +15 -74
  94. data/rbi/anthropic/models/beta/deployment_list_params.rbi +4 -4
  95. data/rbi/anthropic/models/beta/deployment_run_list_params.rbi +10 -10
  96. data/rbi/anthropic/models/beta/memory_stores/memory_create_params.rbi +4 -2
  97. data/rbi/anthropic/models/beta/memory_stores/memory_update_params.rbi +8 -6
  98. data/rbi/anthropic/models/beta/organization/beta_aws_external_key_config.rbi +12 -6
  99. data/rbi/anthropic/models/beta/organization/beta_compliance_settings.rbi +126 -0
  100. data/rbi/anthropic/models/beta/organization/beta_compliance_settings_state_disabled.rbi +30 -0
  101. data/rbi/anthropic/models/beta/organization/beta_compliance_settings_state_disabled_param.rbi +30 -0
  102. data/rbi/anthropic/models/beta/organization/beta_compliance_settings_state_enabled.rbi +30 -0
  103. data/rbi/anthropic/models/beta/organization/beta_compliance_settings_state_enabled_param.rbi +30 -0
  104. data/rbi/anthropic/models/beta/organization/beta_external_key.rbi +6 -3
  105. data/rbi/anthropic/models/beta/organization/beta_workspace.rbi +28 -12
  106. data/rbi/anthropic/models/beta/organization/compliance_setting_retrieve_params.rbi +36 -0
  107. data/rbi/anthropic/models/beta/organization/compliance_setting_update_params.rbi +135 -0
  108. data/rbi/anthropic/models/beta/organization/external_key_create_params.rbi +6 -3
  109. data/rbi/anthropic/models/beta/organization/external_key_update_params.rbi +6 -3
  110. data/rbi/anthropic/models/beta/organization/workspace_create_params.rbi +16 -8
  111. data/rbi/anthropic/models/beta/organization/workspace_update_params.rbi +16 -8
  112. data/rbi/anthropic/models/beta/session_list_params.rbi +7 -7
  113. data/rbi/anthropic/models/beta/sessions/event_list_params.rbi +5 -5
  114. data/rbi/anthropic/models/beta/sessions/resource_list_params.rbi +2 -2
  115. data/rbi/anthropic/models/beta/sessions/thread_list_params.rbi +2 -2
  116. data/rbi/anthropic/models/beta/user_profile_create_params.rbi +15 -74
  117. data/rbi/anthropic/models/beta/user_profile_list_params.rbi +52 -0
  118. data/rbi/anthropic/models/beta/user_profile_update_params.rbi +11 -66
  119. data/rbi/anthropic/models/browser_toolset_20260801.rbi +0 -74
  120. data/rbi/anthropic/models/computer_toolset_20260801.rbi +0 -78
  121. data/rbi/anthropic/models/model.rbi +8 -0
  122. data/rbi/anthropic/resources/beta/deployment_runs.rbi +5 -5
  123. data/rbi/anthropic/resources/beta/deployments.rbi +3 -2
  124. data/rbi/anthropic/resources/beta/memory_stores/memories.rbi +6 -4
  125. data/rbi/anthropic/resources/beta/organization/compliance_settings.rbi +61 -0
  126. data/rbi/anthropic/resources/beta/organization/workspaces.rbi +14 -6
  127. data/rbi/anthropic/resources/beta/organization.rbi +5 -0
  128. data/rbi/anthropic/resources/beta/sessions/events.rbi +2 -2
  129. data/rbi/anthropic/resources/beta/sessions/resources.rbi +1 -1
  130. data/rbi/anthropic/resources/beta/sessions/threads.rbi +1 -1
  131. data/rbi/anthropic/resources/beta/sessions.rbi +4 -4
  132. data/rbi/anthropic/resources/beta/user_profiles.rbi +12 -19
  133. data/sig/anthropic/models/anthropic_beta.rbs +6 -0
  134. data/sig/anthropic/models/beta/beta_browser_toolset_20260801.rbs +0 -26
  135. data/sig/anthropic/models/beta/beta_computer_toolset_20260801.rbs +0 -26
  136. data/sig/anthropic/models/beta/beta_dreaming_error.rbs +100 -0
  137. data/sig/anthropic/models/beta/beta_fallback_param.rbs +3 -0
  138. data/sig/anthropic/models/beta/beta_managed_agents_model.rbs +5 -1
  139. data/sig/anthropic/models/beta/beta_message.rbs +7 -2
  140. data/sig/anthropic/models/beta/beta_message_param.rbs +24 -3
  141. data/sig/anthropic/models/beta/beta_raw_message_delta_event.rbs +7 -2
  142. data/sig/anthropic/models/beta/beta_raw_message_stream_event.rbs +3 -1
  143. data/sig/anthropic/models/beta/beta_system_message_output_config.rbs +38 -0
  144. data/sig/anthropic/models/beta/beta_target_store_held_error.rbs +22 -0
  145. data/sig/anthropic/models/beta/beta_thinking_block_binding.rbs +24 -0
  146. data/sig/anthropic/models/beta/beta_thinking_config_adaptive.rbs +5 -0
  147. data/sig/anthropic/models/beta/beta_thinking_config_enabled.rbs +5 -0
  148. data/sig/anthropic/models/beta/beta_thinking_config_param.rbs +3 -0
  149. data/sig/anthropic/models/beta/beta_thinking_dropped_input_transformation.rbs +51 -0
  150. data/sig/anthropic/models/beta/beta_thinking_prefix_mismatch_behavior.rbs +18 -0
  151. data/sig/anthropic/models/beta/beta_user_profile.rbs +8 -24
  152. data/sig/anthropic/models/beta/organization/beta_compliance_settings.rbs +61 -0
  153. data/sig/anthropic/models/beta/organization/beta_compliance_settings_state_disabled.rbs +17 -0
  154. data/sig/anthropic/models/beta/organization/beta_compliance_settings_state_disabled_param.rbs +17 -0
  155. data/sig/anthropic/models/beta/organization/beta_compliance_settings_state_enabled.rbs +17 -0
  156. data/sig/anthropic/models/beta/organization/beta_compliance_settings_state_enabled_param.rbs +17 -0
  157. data/sig/anthropic/models/beta/organization/compliance_setting_retrieve_params.rbs +19 -0
  158. data/sig/anthropic/models/beta/organization/compliance_setting_update_params.rbs +62 -0
  159. data/sig/anthropic/models/beta/user_profile_create_params.rbs +7 -21
  160. data/sig/anthropic/models/beta/user_profile_list_params.rbs +20 -0
  161. data/sig/anthropic/models/beta/user_profile_update_params.rbs +7 -17
  162. data/sig/anthropic/models/browser_toolset_20260801.rbs +0 -26
  163. data/sig/anthropic/models/computer_toolset_20260801.rbs +0 -26
  164. data/sig/anthropic/models/model.rbs +9 -1
  165. data/sig/anthropic/resources/beta/organization/compliance_settings.rbs +20 -0
  166. data/sig/anthropic/resources/beta/organization.rbs +2 -0
  167. data/sig/anthropic/resources/beta/user_profiles.rbs +3 -2
  168. metadata +44 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7d63232dcb7062e98a3bacb9f193b2f2978d76c41a80979a93f1be937be59af1
4
- data.tar.gz: cf1494922e6fcdba1daafed3ce43650d21c79e8213a217969056fe48a71bddfe
3
+ metadata.gz: f18393a5346183924cb40cde07ffe456233828d8e35d275a709907f3c4a2a8ca
4
+ data.tar.gz: 5d1456c7ebd607a7e7a938ca104f714e09417668df1275c2ae0d792fda617ac5
5
5
  SHA512:
6
- metadata.gz: f0e8d744918b8ef81214991f86fddfc2ce75836cc35ebd416eea38da499ea64a544578a1bb601bb32db3d9982bf583da24a08230fed51c1c6d29c1e36a2e8870
7
- data.tar.gz: 37f3517c2176bfca145e8683d4ecf84c6b0863347f02876595ba4ca61192ce8e58bf24c015bff80be4c168f7c718943ef966bb4f929c813a8c5eb4f2e95661a4
6
+ metadata.gz: 9544c29f75c2d93161e1ef5934ba1861ca537167793393edfe643208cb98a38cdc3f9b390ab5ad3a0d2efa7c4ab3c59b7a7dd159b78a20b5a240e76952530923
7
+ data.tar.gz: 0b8e7fd35dcf7e1c4dd220a21af9acd65eedac541a9ff8e891e776951a4d9af8197cd7904347de33d0d9267b28f95bfe2b8bf16adf8162228518c6999c658372
data/CHANGELOG.md CHANGED
@@ -1,5 +1,46 @@
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
+
3
44
  ## 1.67.0 (2026-08-27)
4
45
 
5
46
  Full Changelog: [v1.66.0...v1.67.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.66.0...v1.67.0)
@@ -8,6 +49,15 @@ Full Changelog: [v1.66.0...v1.67.0](https://github.com/anthropics/anthropic-sdk-
8
49
 
9
50
  * **api:** beta files/skills namespaces use GA shapes; drop dated beta header pins ([8c60f7a](https://github.com/anthropics/anthropic-sdk-ruby/commit/8c60f7ab13ee7a1c6fc1423a7a2b63d469048589))
10
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
+
11
61
 
12
62
  ### Bug Fixes
13
63
 
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.67.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
@@ -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
 
@@ -0,0 +1,105 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ # The `output_behavior.memory_store_id` target is still held by a prior
7
+ # `{type: "update_existing"}` dream — one that is `pending` or `running`, or was
8
+ # canceled with its final writes still landing. Rarely the named dream has just
9
+ # finished (`completed`/`failed`) and its execution is still closing; an immediate
10
+ # retry then almost always succeeds. The message names the holding dream when the
11
+ # server can identify it (rarely omitted); poll it to a terminal state or cancel
12
+ # it, then retry. Carried with `x-should-retry: false`.
13
+ module BetaDreamingError
14
+ extend Anthropic::Internal::Type::Union
15
+
16
+ discriminator :type
17
+
18
+ variant :invalid_request_error, -> { Anthropic::BetaInvalidRequestError }
19
+
20
+ variant :authentication_error, -> { Anthropic::BetaAuthenticationError }
21
+
22
+ variant :billing_error, -> { Anthropic::BetaBillingError }
23
+
24
+ variant :permission_error, -> { Anthropic::BetaPermissionError }
25
+
26
+ variant :not_found_error, -> { Anthropic::BetaNotFoundError }
27
+
28
+ variant :rate_limit_error, -> { Anthropic::BetaRateLimitError }
29
+
30
+ variant :timeout_error, -> { Anthropic::BetaGatewayTimeoutError }
31
+
32
+ variant :api_error, -> { Anthropic::BetaAPIError }
33
+
34
+ variant :overloaded_error, -> { Anthropic::BetaOverloadedError }
35
+
36
+ # The `output_behavior.memory_store_id` target is still held by a prior `{type: "update_existing"}` dream — one that is `pending` or `running`, or was canceled with its final writes still landing. Rarely the named dream has just finished (`completed`/`failed`) and its execution is still closing; an immediate retry then almost always succeeds. The message names the holding dream when the server can identify it (rarely omitted); poll it to a terminal state or cancel it, then retry. Carried with `x-should-retry: false`.
37
+ variant :conflict_error, -> { Anthropic::Beta::BetaTargetStoreHeldError }
38
+
39
+ module Type
40
+ extend Anthropic::Internal::Type::Enum
41
+
42
+ INVALID_REQUEST_ERROR = :invalid_request_error
43
+ AUTHENTICATION_ERROR = :authentication_error
44
+ BILLING_ERROR = :billing_error
45
+ PERMISSION_ERROR = :permission_error
46
+ NOT_FOUND_ERROR = :not_found_error
47
+ RATE_LIMIT_ERROR = :rate_limit_error
48
+ TIMEOUT_ERROR = :timeout_error
49
+ API_ERROR = :api_error
50
+ OVERLOADED_ERROR = :overloaded_error
51
+ CONFLICT_ERROR = :conflict_error
52
+
53
+ # @!method self.values
54
+ # @return [Array<Symbol>]
55
+ end
56
+
57
+ # @!method self.variants
58
+ # @return [Array(Anthropic::Models::BetaInvalidRequestError, Anthropic::Models::BetaAuthenticationError, Anthropic::Models::BetaBillingError, Anthropic::Models::BetaPermissionError, Anthropic::Models::BetaNotFoundError, Anthropic::Models::BetaRateLimitError, Anthropic::Models::BetaGatewayTimeoutError, Anthropic::Models::BetaAPIError, Anthropic::Models::BetaOverloadedError, Anthropic::Models::Beta::BetaTargetStoreHeldError)]
59
+
60
+ # Creates a new instance of the variant class whose `type` matches the given
61
+ # value, passing the remaining arguments to its constructor.
62
+ #
63
+ # Some parameter documentations has been truncated, see
64
+ # {Anthropic::Models::Beta::BetaDreamingError} for more details.
65
+ #
66
+ # @param type [Symbol, String]
67
+ #
68
+ # @param args [Hash{Symbol=>Object}] Attributes for the chosen variant.
69
+ #
70
+ # @option args [String] :message Human-readable description of the conflict, naming the dream that holds the targ
71
+ #
72
+ # @raise [ArgumentError]
73
+ # @return [Anthropic::Models::BetaInvalidRequestError, Anthropic::Models::BetaAuthenticationError, Anthropic::Models::BetaBillingError, Anthropic::Models::BetaPermissionError, Anthropic::Models::BetaNotFoundError, Anthropic::Models::BetaRateLimitError, Anthropic::Models::BetaGatewayTimeoutError, Anthropic::Models::BetaAPIError, Anthropic::Models::BetaOverloadedError, Anthropic::Models::Beta::BetaTargetStoreHeldError]
74
+ def self.new(type:, **args)
75
+ case type.to_sym
76
+ when :invalid_request_error
77
+ Anthropic::BetaInvalidRequestError.new(**args)
78
+ when :authentication_error
79
+ Anthropic::BetaAuthenticationError.new(**args)
80
+ when :billing_error
81
+ Anthropic::BetaBillingError.new(**args)
82
+ when :permission_error
83
+ Anthropic::BetaPermissionError.new(**args)
84
+ when :not_found_error
85
+ Anthropic::BetaNotFoundError.new(**args)
86
+ when :rate_limit_error
87
+ Anthropic::BetaRateLimitError.new(**args)
88
+ when :timeout_error
89
+ Anthropic::BetaGatewayTimeoutError.new(**args)
90
+ when :api_error
91
+ Anthropic::BetaAPIError.new(**args)
92
+ when :overloaded_error
93
+ Anthropic::BetaOverloadedError.new(**args)
94
+ when :conflict_error
95
+ Anthropic::Beta::BetaTargetStoreHeldError.new(**args)
96
+ else
97
+ raise ArgumentError, "unknown type: #{type}"
98
+ end
99
+ end
100
+ end
101
+ end
102
+
103
+ BetaDreamingError = Beta::BetaDreamingError
104
+ end
105
+ end
@@ -110,6 +110,8 @@ module Anthropic
110
110
  #
111
111
  # @option args [Integer] :budget_tokens Determines how many tokens Claude can use for its internal reasoning process. La
112
112
  #
113
+ # @option args [Anthropic::Models::Beta::BetaThinkingBlockBinding, nil] :block_binding Controls for block binding: what happens when a thinking block this
114
+ #
113
115
  # @option args [Symbol, Anthropic::Models::Beta::BetaThinkingConfigEnabled::Display, nil, Symbol, Anthropic::Models::Beta::BetaThinkingConfigAdaptive::Display, nil] :display_ Controls how thinking content appears in the response. When set to `summarized`,
114
116
  #
115
117
  # @raise [ArgumentError]
@@ -37,8 +37,8 @@ module Anthropic
37
37
  required :error, union: -> { Anthropic::Beta::BetaManagedAgentsDeploymentRun::Error }, nil?: true
38
38
 
39
39
  # @!attribute session_id
40
- # Populated on success. Null on creation failure. Exactly one of session_id or
41
- # error is non-null.
40
+ # Populated on success. Null on creation failure. Exactly one of `session_id` or
41
+ # `error` is non-null.
42
42
  #
43
43
  # @return [String, nil]
44
44
  required :session_id, String, nil?: true
@@ -71,7 +71,7 @@ module Anthropic
71
71
  #
72
72
  # @param error [Anthropic::Models::Beta::BetaManagedAgentsEnvironmentArchivedRunError, Anthropic::Models::Beta::BetaManagedAgentsAgentArchivedRunError, Anthropic::Models::Beta::BetaManagedAgentsEnvironmentNotFoundRunError, Anthropic::Models::Beta::BetaManagedAgentsVaultNotFoundRunError, Anthropic::Models::Beta::BetaManagedAgentsVaultArchivedRunError, Anthropic::Models::Beta::BetaManagedAgentsFileNotFoundRunError, Anthropic::Models::Beta::BetaManagedAgentsMemoryStoreArchivedRunError, Anthropic::Models::Beta::BetaManagedAgentsSkillNotFoundRunError, Anthropic::Models::Beta::BetaManagedAgentsSessionResourceNotFoundRunError, Anthropic::Models::Beta::BetaManagedAgentsWorkspaceArchivedRunError, Anthropic::Models::Beta::BetaManagedAgentsOrganizationDisabledRunError, Anthropic::Models::Beta::BetaManagedAgentsSessionRateLimitedRunError, Anthropic::Models::Beta::BetaManagedAgentsSessionCreationRejectedRunError, Anthropic::Models::Beta::BetaManagedAgentsUnknownRunError, Anthropic::Models::Beta::BetaManagedAgentsSelfHostedResourcesUnsupportedRunError, Anthropic::Models::Beta::BetaManagedAgentsMCPEgressBlockedRunError, nil] Why the run failed to create a session. The type identifies the failure; message
73
73
  #
74
- # @param session_id [String, nil] Populated on success. Null on creation failure. Exactly one of session_id or err
74
+ # @param session_id [String, nil] Populated on success. Null on creation failure. Exactly one of `session_id` or `
75
75
  #
76
76
  # @param trigger_context [Anthropic::Models::Beta::BetaManagedAgentsScheduleTriggerContext, Anthropic::Models::Beta::BetaManagedAgentsManualTriggerContext] Describes what triggered a deployment run, with trigger-specific metadata.
77
77
  #
@@ -10,6 +10,8 @@ module Anthropic
10
10
  module BetaManagedAgentsModel
11
11
  extend Anthropic::Internal::Type::Union
12
12
 
13
+ variant const: -> { Anthropic::Models::Beta::BetaManagedAgentsModel::CLAUDE_FABLE_5_1 }
14
+
13
15
  variant const: -> { Anthropic::Models::Beta::BetaManagedAgentsModel::CLAUDE_SONNET_5 }
14
16
 
15
17
  variant const: -> { Anthropic::Models::Beta::BetaManagedAgentsModel::CLAUDE_FABLE_5 }
@@ -47,6 +49,9 @@ module Anthropic
47
49
 
48
50
  # @!group
49
51
 
52
+ # Frontier intelligence for ambitious tasks across coding, scientific discovery, and enterprise workflows
53
+ CLAUDE_FABLE_5_1 = :"claude-fable-5-1"
54
+
50
55
  # High-performance model for coding and agents
51
56
  CLAUDE_SONNET_5 = :"claude-sonnet-5"
52
57
 
@@ -17,9 +17,9 @@ module Anthropic
17
17
  required :description, String
18
18
 
19
19
  # @!attribute explanation
20
- # Grader's verdict text from the most recent evaluation. For satisfied, explains
21
- # why criteria are met; for needs_revision (intermediate), what's missing; for
22
- # failed, why unrecoverable.
20
+ # Grader's verdict text from the most recent evaluation. For `satisfied`, explains
21
+ # why criteria are met; for `needs_revision` (intermediate), what's missing; for
22
+ # `failed`, why unrecoverable.
23
23
  #
24
24
  # @return [String, nil]
25
25
  required :explanation, String, nil?: true
@@ -50,7 +50,7 @@ module Anthropic
50
50
  required :type, enum: -> { Anthropic::Beta::BetaManagedAgentsOutcomeEvaluationResource::Type }
51
51
 
52
52
  # @!method initialize(completed_at:, description:, explanation:, iteration:, outcome_id:, result:, type:)
53
- # Evaluation state for a single outcome defined via a define_outcome event.
53
+ # Evaluation state for a single outcome defined via a `define_outcome` event.
54
54
  #
55
55
  # Some parameter documentations has been truncated, see
56
56
  # {Anthropic::Models::Beta::BetaManagedAgentsOutcomeEvaluationResource} for more
@@ -60,7 +60,7 @@ module Anthropic
60
60
  #
61
61
  # @param description [String] What the agent should produce.
62
62
  #
63
- # @param explanation [String, nil] Grader's verdict text from the most recent evaluation. For satisfied, explains w
63
+ # @param explanation [String, nil] Grader's verdict text from the most recent evaluation. For `satisfied`, explains
64
64
  #
65
65
  # @param iteration [Integer] 0-indexed revision cycle the outcome is currently on.
66
66
  #
@@ -47,7 +47,7 @@ module Anthropic
47
47
  required :metadata, Anthropic::Internal::Type::HashOf[String]
48
48
 
49
49
  # @!attribute outcome_evaluations
50
- # Per-outcome evaluation state. One entry per define_outcome event sent to the
50
+ # Per-outcome evaluation state. One entry per `define_outcome` event sent to the
51
51
  # session.
52
52
  #
53
53
  # @return [Array<Anthropic::Models::Beta::BetaManagedAgentsOutcomeEvaluationResource>]
@@ -128,7 +128,7 @@ module Anthropic
128
128
  #
129
129
  # @param metadata [Hash{Symbol=>String}]
130
130
  #
131
- # @param outcome_evaluations [Array<Anthropic::Models::Beta::BetaManagedAgentsOutcomeEvaluationResource>] Per-outcome evaluation state. One entry per define_outcome event sent to the ses
131
+ # @param outcome_evaluations [Array<Anthropic::Models::Beta::BetaManagedAgentsOutcomeEvaluationResource>] Per-outcome evaluation state. One entry per `define_outcome` event sent to the s
132
132
  #
133
133
  # @param resources [Array<Anthropic::Models::Beta::Sessions::BetaManagedAgentsGitHubRepositoryResource, Anthropic::Models::Beta::Sessions::BetaManagedAgentsFileResource, Anthropic::Models::Beta::Sessions::BetaManagedAgentsMemoryStoreResource>]
134
134
  #
@@ -5,7 +5,7 @@ module Anthropic
5
5
  module Beta
6
6
  class BetaManagedAgentsSessionStats < Anthropic::Internal::Type::BaseModel
7
7
  # @!attribute active_seconds
8
- # Cumulative time in seconds the session spent in running status. Excludes idle
8
+ # Cumulative time in seconds the session spent in `running` status. Excludes idle
9
9
  # time.
10
10
  #
11
11
  # @return [Float, nil]
@@ -24,7 +24,7 @@ module Anthropic
24
24
  # Some parameter documentations has been truncated, see
25
25
  # {Anthropic::Models::Beta::BetaManagedAgentsSessionStats} for more details.
26
26
  #
27
- # @param active_seconds [Float] Cumulative time in seconds the session spent in running status. Excludes idle ti
27
+ # @param active_seconds [Float] Cumulative time in seconds the session spent in `running` status. Excludes idle
28
28
  #
29
29
  # @param duration_seconds [Float] Elapsed time since session creation in seconds. For terminated sessions, frozen
30
30
  end