anthropic 1.11.0 → 1.13.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 (177) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -0
  3. data/README.md +1 -1
  4. data/lib/anthropic/helpers/streaming/message_stream.rb +3 -0
  5. data/lib/anthropic/internal/page_cursor.rb +92 -0
  6. data/lib/anthropic/internal/token_page.rb +92 -0
  7. data/lib/anthropic/internal/transport/pooled_net_requester.rb +30 -24
  8. data/lib/anthropic/models/anthropic_beta.rb +3 -0
  9. data/lib/anthropic/models/beta/beta_all_thinking_turns.rb +19 -0
  10. data/lib/anthropic/models/beta/beta_clear_thinking_20251015_edit.rb +48 -0
  11. data/lib/anthropic/models/beta/beta_clear_thinking_20251015_edit_response.rb +36 -0
  12. data/lib/anthropic/models/beta/beta_clear_tool_uses_20250919_edit_response.rb +0 -2
  13. data/lib/anthropic/models/beta/beta_container.rb +9 -1
  14. data/lib/anthropic/models/beta/beta_container_params.rb +34 -0
  15. data/lib/anthropic/models/beta/beta_context_management_config.rb +17 -5
  16. data/lib/anthropic/models/beta/beta_context_management_response.rb +16 -5
  17. data/lib/anthropic/models/beta/beta_mcp_tool_use_block_param.rb +3 -3
  18. data/lib/anthropic/models/beta/beta_message.rb +4 -2
  19. data/lib/anthropic/models/beta/beta_raw_message_delta_event.rb +2 -2
  20. data/lib/anthropic/models/beta/beta_server_tool_use_block_param.rb +3 -3
  21. data/lib/anthropic/models/beta/beta_skill.rb +51 -0
  22. data/lib/anthropic/models/beta/beta_skill_params.rb +51 -0
  23. data/lib/anthropic/models/beta/beta_thinking_config_enabled.rb +1 -1
  24. data/lib/anthropic/models/beta/beta_thinking_config_param.rb +1 -1
  25. data/lib/anthropic/models/beta/beta_thinking_turns.rb +25 -0
  26. data/lib/anthropic/models/beta/beta_tool.rb +5 -3
  27. data/lib/anthropic/models/beta/beta_tool_use_block_param.rb +3 -3
  28. data/lib/anthropic/models/beta/message_count_tokens_params.rb +15 -12
  29. data/lib/anthropic/models/beta/message_create_params.rb +34 -18
  30. data/lib/anthropic/models/beta/messages/batch_create_params.rb +39 -20
  31. data/lib/anthropic/models/beta/skill_create_params.rb +49 -0
  32. data/lib/anthropic/models/beta/skill_create_response.rb +84 -0
  33. data/lib/anthropic/models/beta/skill_delete_params.rb +24 -0
  34. data/lib/anthropic/models/beta/skill_delete_response.rb +34 -0
  35. data/lib/anthropic/models/beta/skill_list_params.rb +61 -0
  36. data/lib/anthropic/models/beta/skill_list_response.rb +84 -0
  37. data/lib/anthropic/models/beta/skill_retrieve_params.rb +24 -0
  38. data/lib/anthropic/models/beta/skill_retrieve_response.rb +84 -0
  39. data/lib/anthropic/models/beta/skills/version_create_params.rb +42 -0
  40. data/lib/anthropic/models/beta/skills/version_create_response.rb +92 -0
  41. data/lib/anthropic/models/beta/skills/version_delete_params.rb +39 -0
  42. data/lib/anthropic/models/beta/skills/version_delete_response.rb +36 -0
  43. data/lib/anthropic/models/beta/skills/version_list_params.rb +47 -0
  44. data/lib/anthropic/models/beta/skills/version_list_response.rb +92 -0
  45. data/lib/anthropic/models/beta/skills/version_retrieve_params.rb +39 -0
  46. data/lib/anthropic/models/beta/skills/version_retrieve_response.rb +92 -0
  47. data/lib/anthropic/models/completion_create_params.rb +3 -4
  48. data/lib/anthropic/models/message_count_tokens_params.rb +10 -10
  49. data/lib/anthropic/models/message_create_params.rb +13 -13
  50. data/lib/anthropic/models/messages/batch_create_params.rb +14 -15
  51. data/lib/anthropic/models/model.rb +6 -20
  52. data/lib/anthropic/models/server_tool_use_block_param.rb +3 -3
  53. data/lib/anthropic/models/stop_reason.rb +0 -1
  54. data/lib/anthropic/models/thinking_config_enabled.rb +1 -1
  55. data/lib/anthropic/models/thinking_config_param.rb +1 -1
  56. data/lib/anthropic/models/tool.rb +5 -3
  57. data/lib/anthropic/models/tool_use_block_param.rb +3 -3
  58. data/lib/anthropic/resources/beta/messages.rb +5 -5
  59. data/lib/anthropic/resources/beta/skills/versions.rb +154 -0
  60. data/lib/anthropic/resources/beta/skills.rb +144 -0
  61. data/lib/anthropic/resources/beta.rb +4 -0
  62. data/lib/anthropic/resources/completions.rb +4 -4
  63. data/lib/anthropic/version.rb +1 -1
  64. data/lib/anthropic.rb +27 -0
  65. data/rbi/anthropic/internal/page_cursor.rbi +25 -0
  66. data/rbi/anthropic/internal/token_page.rbi +25 -0
  67. data/rbi/anthropic/models/anthropic_beta.rbi +2 -0
  68. data/rbi/anthropic/models/beta/beta_all_thinking_turns.rbi +30 -0
  69. data/rbi/anthropic/models/beta/beta_clear_thinking_20251015_edit.rbi +109 -0
  70. data/rbi/anthropic/models/beta/beta_clear_thinking_20251015_edit_response.rbi +61 -0
  71. data/rbi/anthropic/models/beta/beta_clear_tool_uses_20250919_edit_response.rbi +0 -1
  72. data/rbi/anthropic/models/beta/beta_container.rbi +23 -3
  73. data/rbi/anthropic/models/beta/beta_container_params.rbi +54 -0
  74. data/rbi/anthropic/models/beta/beta_context_management_config.rbi +51 -5
  75. data/rbi/anthropic/models/beta/beta_context_management_response.rbi +32 -4
  76. data/rbi/anthropic/models/beta/beta_mcp_tool_use_block.rbi +3 -3
  77. data/rbi/anthropic/models/beta/beta_mcp_tool_use_block_param.rbi +3 -3
  78. data/rbi/anthropic/models/beta/beta_message.rbi +6 -2
  79. data/rbi/anthropic/models/beta/beta_raw_message_delta_event.rbi +2 -2
  80. data/rbi/anthropic/models/beta/beta_server_tool_use_block.rbi +3 -3
  81. data/rbi/anthropic/models/beta/beta_server_tool_use_block_param.rbi +3 -3
  82. data/rbi/anthropic/models/beta/beta_skill.rbi +80 -0
  83. data/rbi/anthropic/models/beta/beta_skill_params.rbi +91 -0
  84. data/rbi/anthropic/models/beta/beta_thinking_config_enabled.rbi +2 -2
  85. data/rbi/anthropic/models/beta/beta_thinking_config_param.rbi +1 -1
  86. data/rbi/anthropic/models/beta/beta_thinking_turns.rbi +33 -0
  87. data/rbi/anthropic/models/beta/beta_tool.rbi +3 -3
  88. data/rbi/anthropic/models/beta/beta_tool_use_block.rbi +8 -3
  89. data/rbi/anthropic/models/beta/beta_tool_use_block_param.rbi +3 -3
  90. data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +27 -21
  91. data/rbi/anthropic/models/beta/message_create_params.rbi +61 -29
  92. data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +70 -33
  93. data/rbi/anthropic/models/beta/skill_create_params.rbi +90 -0
  94. data/rbi/anthropic/models/beta/skill_create_response.rbi +118 -0
  95. data/rbi/anthropic/models/beta/skill_delete_params.rbi +62 -0
  96. data/rbi/anthropic/models/beta/skill_delete_response.rbi +46 -0
  97. data/rbi/anthropic/models/beta/skill_list_params.rbi +109 -0
  98. data/rbi/anthropic/models/beta/skill_list_response.rbi +118 -0
  99. data/rbi/anthropic/models/beta/skill_retrieve_params.rbi +62 -0
  100. data/rbi/anthropic/models/beta/skill_retrieve_response.rbi +118 -0
  101. data/rbi/anthropic/models/beta/skills/version_create_params.rbi +79 -0
  102. data/rbi/anthropic/models/beta/skills/version_create_response.rbi +124 -0
  103. data/rbi/anthropic/models/beta/skills/version_delete_params.rbi +77 -0
  104. data/rbi/anthropic/models/beta/skills/version_delete_response.rbi +48 -0
  105. data/rbi/anthropic/models/beta/skills/version_list_params.rbi +85 -0
  106. data/rbi/anthropic/models/beta/skills/version_list_response.rbi +124 -0
  107. data/rbi/anthropic/models/beta/skills/version_retrieve_params.rbi +77 -0
  108. data/rbi/anthropic/models/beta/skills/version_retrieve_response.rbi +124 -0
  109. data/rbi/anthropic/models/completion_create_params.rbi +6 -8
  110. data/rbi/anthropic/models/message_count_tokens_params.rbi +19 -19
  111. data/rbi/anthropic/models/message_create_params.rbi +24 -24
  112. data/rbi/anthropic/models/messages/batch_create_params.rbi +26 -28
  113. data/rbi/anthropic/models/model.rbi +0 -11
  114. data/rbi/anthropic/models/server_tool_use_block.rbi +8 -3
  115. data/rbi/anthropic/models/server_tool_use_block_param.rbi +3 -3
  116. data/rbi/anthropic/models/stop_reason.rbi +0 -5
  117. data/rbi/anthropic/models/thinking_config_enabled.rbi +2 -2
  118. data/rbi/anthropic/models/thinking_config_param.rbi +1 -1
  119. data/rbi/anthropic/models/tool.rbi +3 -3
  120. data/rbi/anthropic/models/tool_use_block.rbi +8 -3
  121. data/rbi/anthropic/models/tool_use_block_param.rbi +3 -3
  122. data/rbi/anthropic/resources/beta/messages.rbi +51 -36
  123. data/rbi/anthropic/resources/beta/skills/versions.rbi +124 -0
  124. data/rbi/anthropic/resources/beta/skills.rbi +118 -0
  125. data/rbi/anthropic/resources/beta.rbi +3 -0
  126. data/rbi/anthropic/resources/completions.rbi +10 -12
  127. data/rbi/anthropic/resources/messages.rbi +31 -31
  128. data/sig/anthropic/internal/page_cursor.rbs +15 -0
  129. data/sig/anthropic/internal/token_page.rbs +15 -0
  130. data/sig/anthropic/models/anthropic_beta.rbs +2 -0
  131. data/sig/anthropic/models/beta/beta_all_thinking_turns.rbs +17 -0
  132. data/sig/anthropic/models/beta/beta_clear_thinking_20251015_edit.rbs +44 -0
  133. data/sig/anthropic/models/beta/beta_clear_thinking_20251015_edit_response.rbs +34 -0
  134. data/sig/anthropic/models/beta/beta_container.rbs +18 -3
  135. data/sig/anthropic/models/beta/beta_container_params.rbs +26 -0
  136. data/sig/anthropic/models/beta/beta_context_management_config.rbs +18 -6
  137. data/sig/anthropic/models/beta/beta_context_management_response.rbs +14 -4
  138. data/sig/anthropic/models/beta/beta_mcp_tool_use_block.rbs +4 -4
  139. data/sig/anthropic/models/beta/beta_mcp_tool_use_block_param.rbs +4 -4
  140. data/sig/anthropic/models/beta/beta_server_tool_use_block.rbs +4 -4
  141. data/sig/anthropic/models/beta/beta_server_tool_use_block_param.rbs +4 -4
  142. data/sig/anthropic/models/beta/beta_skill.rbs +45 -0
  143. data/sig/anthropic/models/beta/beta_skill_params.rbs +47 -0
  144. data/sig/anthropic/models/beta/beta_thinking_turns.rbs +19 -0
  145. data/sig/anthropic/models/beta/beta_tool.rbs +8 -4
  146. data/sig/anthropic/models/beta/beta_tool_use_block.rbs +9 -4
  147. data/sig/anthropic/models/beta/beta_tool_use_block_param.rbs +4 -4
  148. data/sig/anthropic/models/beta/message_create_params.rbs +12 -4
  149. data/sig/anthropic/models/beta/messages/batch_create_params.rbs +12 -4
  150. data/sig/anthropic/models/beta/skill_create_params.rbs +42 -0
  151. data/sig/anthropic/models/beta/skill_create_response.rbs +52 -0
  152. data/sig/anthropic/models/beta/skill_delete_params.rbs +30 -0
  153. data/sig/anthropic/models/beta/skill_delete_response.rbs +17 -0
  154. data/sig/anthropic/models/beta/skill_list_params.rbs +49 -0
  155. data/sig/anthropic/models/beta/skill_list_response.rbs +52 -0
  156. data/sig/anthropic/models/beta/skill_retrieve_params.rbs +30 -0
  157. data/sig/anthropic/models/beta/skill_retrieve_response.rbs +52 -0
  158. data/sig/anthropic/models/beta/skills/version_create_params.rbs +39 -0
  159. data/sig/anthropic/models/beta/skills/version_create_response.rbs +59 -0
  160. data/sig/anthropic/models/beta/skills/version_delete_params.rbs +39 -0
  161. data/sig/anthropic/models/beta/skills/version_delete_response.rbs +19 -0
  162. data/sig/anthropic/models/beta/skills/version_list_params.rbs +44 -0
  163. data/sig/anthropic/models/beta/skills/version_list_response.rbs +59 -0
  164. data/sig/anthropic/models/beta/skills/version_retrieve_params.rbs +39 -0
  165. data/sig/anthropic/models/beta/skills/version_retrieve_response.rbs +59 -0
  166. data/sig/anthropic/models/model.rbs +0 -11
  167. data/sig/anthropic/models/server_tool_use_block.rbs +9 -4
  168. data/sig/anthropic/models/server_tool_use_block_param.rbs +4 -4
  169. data/sig/anthropic/models/stop_reason.rbs +0 -2
  170. data/sig/anthropic/models/tool.rbs +8 -4
  171. data/sig/anthropic/models/tool_use_block.rbs +9 -4
  172. data/sig/anthropic/models/tool_use_block_param.rbs +4 -4
  173. data/sig/anthropic/resources/beta/messages.rbs +2 -2
  174. data/sig/anthropic/resources/beta/skills/versions.rbs +40 -0
  175. data/sig/anthropic/resources/beta/skills.rbs +38 -0
  176. data/sig/anthropic/resources/beta.rbs +2 -0
  177. metadata +83 -2
@@ -0,0 +1,92 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ module Skills
7
+ # @see Anthropic::Resources::Beta::Skills::Versions#list
8
+ class VersionListResponse < Anthropic::Internal::Type::BaseModel
9
+ # @!attribute id
10
+ # Unique identifier for the skill version.
11
+ #
12
+ # The format and length of IDs may change over time.
13
+ #
14
+ # @return [String]
15
+ required :id, String
16
+
17
+ # @!attribute created_at
18
+ # ISO 8601 timestamp of when the skill version was created.
19
+ #
20
+ # @return [String]
21
+ required :created_at, String
22
+
23
+ # @!attribute description
24
+ # Description of the skill version.
25
+ #
26
+ # This is extracted from the SKILL.md file in the skill upload.
27
+ #
28
+ # @return [String]
29
+ required :description, String
30
+
31
+ # @!attribute directory
32
+ # Directory name of the skill version.
33
+ #
34
+ # This is the top-level directory name that was extracted from the uploaded files.
35
+ #
36
+ # @return [String]
37
+ required :directory, String
38
+
39
+ # @!attribute name
40
+ # Human-readable name of the skill version.
41
+ #
42
+ # This is extracted from the SKILL.md file in the skill upload.
43
+ #
44
+ # @return [String]
45
+ required :name, String
46
+
47
+ # @!attribute skill_id
48
+ # Identifier for the skill that this version belongs to.
49
+ #
50
+ # @return [String]
51
+ required :skill_id, String
52
+
53
+ # @!attribute type
54
+ # Object type.
55
+ #
56
+ # For Skill Versions, this is always `"skill_version"`.
57
+ #
58
+ # @return [String]
59
+ required :type, String
60
+
61
+ # @!attribute version
62
+ # Version identifier for the skill.
63
+ #
64
+ # Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
65
+ #
66
+ # @return [String]
67
+ required :version, String
68
+
69
+ # @!method initialize(id:, created_at:, description:, directory:, name:, skill_id:, type:, version:)
70
+ # Some parameter documentations has been truncated, see
71
+ # {Anthropic::Models::Beta::Skills::VersionListResponse} for more details.
72
+ #
73
+ # @param id [String] Unique identifier for the skill version.
74
+ #
75
+ # @param created_at [String] ISO 8601 timestamp of when the skill version was created.
76
+ #
77
+ # @param description [String] Description of the skill version.
78
+ #
79
+ # @param directory [String] Directory name of the skill version.
80
+ #
81
+ # @param name [String] Human-readable name of the skill version.
82
+ #
83
+ # @param skill_id [String] Identifier for the skill that this version belongs to.
84
+ #
85
+ # @param type [String] Object type.
86
+ #
87
+ # @param version [String] Version identifier for the skill.
88
+ end
89
+ end
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ module Skills
7
+ # @see Anthropic::Resources::Beta::Skills::Versions#retrieve
8
+ class VersionRetrieveParams < Anthropic::Internal::Type::BaseModel
9
+ extend Anthropic::Internal::Type::RequestParameters::Converter
10
+ include Anthropic::Internal::Type::RequestParameters
11
+
12
+ # @!attribute skill_id
13
+ # Unique identifier for the skill.
14
+ #
15
+ # The format and length of IDs may change over time.
16
+ #
17
+ # @return [String]
18
+ required :skill_id, String
19
+
20
+ # @!attribute betas
21
+ # Optional header to specify the beta version(s) you want to use.
22
+ #
23
+ # @return [Array<String, Symbol, Anthropic::Models::AnthropicBeta>, nil]
24
+ optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }
25
+
26
+ # @!method initialize(skill_id:, betas: nil, request_options: {})
27
+ # Some parameter documentations has been truncated, see
28
+ # {Anthropic::Models::Beta::Skills::VersionRetrieveParams} for more details.
29
+ #
30
+ # @param skill_id [String] Unique identifier for the skill.
31
+ #
32
+ # @param betas [Array<String, Symbol, Anthropic::Models::AnthropicBeta>] Optional header to specify the beta version(s) you want to use.
33
+ #
34
+ # @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}]
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,92 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ module Skills
7
+ # @see Anthropic::Resources::Beta::Skills::Versions#retrieve
8
+ class VersionRetrieveResponse < Anthropic::Internal::Type::BaseModel
9
+ # @!attribute id
10
+ # Unique identifier for the skill version.
11
+ #
12
+ # The format and length of IDs may change over time.
13
+ #
14
+ # @return [String]
15
+ required :id, String
16
+
17
+ # @!attribute created_at
18
+ # ISO 8601 timestamp of when the skill version was created.
19
+ #
20
+ # @return [String]
21
+ required :created_at, String
22
+
23
+ # @!attribute description
24
+ # Description of the skill version.
25
+ #
26
+ # This is extracted from the SKILL.md file in the skill upload.
27
+ #
28
+ # @return [String]
29
+ required :description, String
30
+
31
+ # @!attribute directory
32
+ # Directory name of the skill version.
33
+ #
34
+ # This is the top-level directory name that was extracted from the uploaded files.
35
+ #
36
+ # @return [String]
37
+ required :directory, String
38
+
39
+ # @!attribute name
40
+ # Human-readable name of the skill version.
41
+ #
42
+ # This is extracted from the SKILL.md file in the skill upload.
43
+ #
44
+ # @return [String]
45
+ required :name, String
46
+
47
+ # @!attribute skill_id
48
+ # Identifier for the skill that this version belongs to.
49
+ #
50
+ # @return [String]
51
+ required :skill_id, String
52
+
53
+ # @!attribute type
54
+ # Object type.
55
+ #
56
+ # For Skill Versions, this is always `"skill_version"`.
57
+ #
58
+ # @return [String]
59
+ required :type, String
60
+
61
+ # @!attribute version
62
+ # Version identifier for the skill.
63
+ #
64
+ # Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
65
+ #
66
+ # @return [String]
67
+ required :version, String
68
+
69
+ # @!method initialize(id:, created_at:, description:, directory:, name:, skill_id:, type:, version:)
70
+ # Some parameter documentations has been truncated, see
71
+ # {Anthropic::Models::Beta::Skills::VersionRetrieveResponse} for more details.
72
+ #
73
+ # @param id [String] Unique identifier for the skill version.
74
+ #
75
+ # @param created_at [String] ISO 8601 timestamp of when the skill version was created.
76
+ #
77
+ # @param description [String] Description of the skill version.
78
+ #
79
+ # @param directory [String] Directory name of the skill version.
80
+ #
81
+ # @param name [String] Human-readable name of the skill version.
82
+ #
83
+ # @param skill_id [String] Identifier for the skill that this version belongs to.
84
+ #
85
+ # @param type [String] Object type.
86
+ #
87
+ # @param version [String] Version identifier for the skill.
88
+ end
89
+ end
90
+ end
91
+ end
92
+ end
@@ -36,10 +36,9 @@ module Anthropic
36
36
  # "\n\nHuman: {userQuestion}\n\nAssistant:"
37
37
  # ```
38
38
  #
39
- # See [prompt validation](https://docs.anthropic.com/en/api/prompt-validation) and
40
- # our guide to
41
- # [prompt design](https://docs.anthropic.com/en/docs/intro-to-prompting) for more
42
- # details.
39
+ # See [prompt validation](https://docs.claude.com/en/api/prompt-validation) and
40
+ # our guide to [prompt design](https://docs.claude.com/en/docs/intro-to-prompting)
41
+ # for more details.
43
42
  #
44
43
  # @return [String]
45
44
  required :prompt, String
@@ -65,12 +65,12 @@ module Anthropic
65
65
  # { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
66
66
  # ```
67
67
  #
68
- # See [input examples](https://docs.anthropic.com/en/api/messages-examples).
68
+ # See [input examples](https://docs.claude.com/en/api/messages-examples).
69
69
  #
70
70
  # Note that if you want to include a
71
- # [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
72
- # the top-level `system` parameter — there is no `"system"` role for input
73
- # messages in the Messages API.
71
+ # [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
72
+ # top-level `system` parameter — there is no `"system"` role for input messages in
73
+ # the Messages API.
74
74
  #
75
75
  # There is a limit of 100,000 messages in a single request.
76
76
  #
@@ -90,7 +90,7 @@ module Anthropic
90
90
  #
91
91
  # A system prompt is a way of providing context and instructions to Claude, such
92
92
  # as specifying a particular goal or role. See our
93
- # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
93
+ # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
94
94
  #
95
95
  # @return [String, Array<Anthropic::Models::TextBlockParam>, nil]
96
96
  optional :system_, union: -> { Anthropic::MessageCountTokensParams::System }, api_name: :system
@@ -103,7 +103,7 @@ module Anthropic
103
103
  # tokens and counts towards your `max_tokens` limit.
104
104
  #
105
105
  # See
106
- # [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
106
+ # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
107
107
  # for details.
108
108
  #
109
109
  # @return [Anthropic::Models::ThinkingConfigEnabled, Anthropic::Models::ThinkingConfigDisabled, nil]
@@ -126,9 +126,9 @@ module Anthropic
126
126
  #
127
127
  # There are two types of tools: **client tools** and **server tools**. The
128
128
  # behavior described below applies to client tools. For
129
- # [server tools](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
129
+ # [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
130
130
  # see their individual documentation as each has its own behavior (e.g., the
131
- # [web search tool](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
131
+ # [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
132
132
  #
133
133
  # Each tool definition includes:
134
134
  #
@@ -191,7 +191,7 @@ module Anthropic
191
191
  # functions, or more generally whenever you want the model to produce a particular
192
192
  # JSON structure of output.
193
193
  #
194
- # See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
194
+ # See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
195
195
  #
196
196
  # @return [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305>, nil]
197
197
  optional :tools, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::MessageCountTokensTool] }
@@ -218,7 +218,7 @@ module Anthropic
218
218
  #
219
219
  # A system prompt is a way of providing context and instructions to Claude, such
220
220
  # as specifying a particular goal or role. See our
221
- # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
221
+ # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
222
222
  module System
223
223
  extend Anthropic::Internal::Type::Union
224
224
 
@@ -16,7 +16,7 @@ module Anthropic
16
16
  # only specifies the absolute maximum number of tokens to generate.
17
17
  #
18
18
  # Different models have different maximum values for this parameter. See
19
- # [models](https://docs.anthropic.com/en/docs/models-overview) for details.
19
+ # [models](https://docs.claude.com/en/docs/models-overview) for details.
20
20
  #
21
21
  # @return [Integer]
22
22
  required :max_tokens, Integer
@@ -79,12 +79,12 @@ module Anthropic
79
79
  # { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
80
80
  # ```
81
81
  #
82
- # See [input examples](https://docs.anthropic.com/en/api/messages-examples).
82
+ # See [input examples](https://docs.claude.com/en/api/messages-examples).
83
83
  #
84
84
  # Note that if you want to include a
85
- # [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
86
- # the top-level `system` parameter — there is no `"system"` role for input
87
- # messages in the Messages API.
85
+ # [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
86
+ # top-level `system` parameter — there is no `"system"` role for input messages in
87
+ # the Messages API.
88
88
  #
89
89
  # There is a limit of 100,000 messages in a single request.
90
90
  #
@@ -110,7 +110,7 @@ module Anthropic
110
110
  # for this request.
111
111
  #
112
112
  # Anthropic offers different levels of service for your API requests. See
113
- # [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details.
113
+ # [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
114
114
  #
115
115
  # @return [Symbol, Anthropic::Models::MessageCreateParams::ServiceTier, nil]
116
116
  optional :service_tier, enum: -> { Anthropic::MessageCreateParams::ServiceTier }
@@ -134,7 +134,7 @@ module Anthropic
134
134
  #
135
135
  # A system prompt is a way of providing context and instructions to Claude, such
136
136
  # as specifying a particular goal or role. See our
137
- # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
137
+ # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
138
138
  #
139
139
  # @return [String, Array<Anthropic::Models::TextBlockParam>, nil]
140
140
  optional :system_, union: -> { Anthropic::MessageCreateParams::System }, api_name: :system
@@ -160,7 +160,7 @@ module Anthropic
160
160
  # tokens and counts towards your `max_tokens` limit.
161
161
  #
162
162
  # See
163
- # [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
163
+ # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
164
164
  # for details.
165
165
  #
166
166
  # @return [Anthropic::Models::ThinkingConfigEnabled, Anthropic::Models::ThinkingConfigDisabled, nil]
@@ -183,9 +183,9 @@ module Anthropic
183
183
  #
184
184
  # There are two types of tools: **client tools** and **server tools**. The
185
185
  # behavior described below applies to client tools. For
186
- # [server tools](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
186
+ # [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
187
187
  # see their individual documentation as each has its own behavior (e.g., the
188
- # [web search tool](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
188
+ # [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
189
189
  #
190
190
  # Each tool definition includes:
191
191
  #
@@ -248,7 +248,7 @@ module Anthropic
248
248
  # functions, or more generally whenever you want the model to produce a particular
249
249
  # JSON structure of output.
250
250
  #
251
- # See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
251
+ # See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
252
252
  #
253
253
  # @return [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305>, nil]
254
254
  optional :tools, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::ToolUnion] }
@@ -315,7 +315,7 @@ module Anthropic
315
315
  # for this request.
316
316
  #
317
317
  # Anthropic offers different levels of service for your API requests. See
318
- # [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details.
318
+ # [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
319
319
  module ServiceTier
320
320
  extend Anthropic::Internal::Type::Enum
321
321
 
@@ -330,7 +330,7 @@ module Anthropic
330
330
  #
331
331
  # A system prompt is a way of providing context and instructions to Claude, such
332
332
  # as specifying a particular goal or role. See our
333
- # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
333
+ # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
334
334
  module System
335
335
  extend Anthropic::Internal::Type::Union
336
336
 
@@ -60,7 +60,7 @@ module Anthropic
60
60
  # only specifies the absolute maximum number of tokens to generate.
61
61
  #
62
62
  # Different models have different maximum values for this parameter. See
63
- # [models](https://docs.anthropic.com/en/docs/models-overview) for details.
63
+ # [models](https://docs.claude.com/en/docs/models-overview) for details.
64
64
  #
65
65
  # @return [Integer]
66
66
  required :max_tokens, Integer
@@ -123,12 +123,12 @@ module Anthropic
123
123
  # { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
124
124
  # ```
125
125
  #
126
- # See [input examples](https://docs.anthropic.com/en/api/messages-examples).
126
+ # See [input examples](https://docs.claude.com/en/api/messages-examples).
127
127
  #
128
128
  # Note that if you want to include a
129
- # [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
130
- # the top-level `system` parameter — there is no `"system"` role for input
131
- # messages in the Messages API.
129
+ # [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
130
+ # top-level `system` parameter — there is no `"system"` role for input messages in
131
+ # the Messages API.
132
132
  #
133
133
  # There is a limit of 100,000 messages in a single request.
134
134
  #
@@ -154,7 +154,7 @@ module Anthropic
154
154
  # for this request.
155
155
  #
156
156
  # Anthropic offers different levels of service for your API requests. See
157
- # [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details.
157
+ # [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
158
158
  #
159
159
  # @return [Symbol, Anthropic::Models::Messages::BatchCreateParams::Request::Params::ServiceTier, nil]
160
160
  optional :service_tier, enum: -> { Anthropic::Messages::BatchCreateParams::Request::Params::ServiceTier }
@@ -176,8 +176,7 @@ module Anthropic
176
176
  # @!attribute stream
177
177
  # Whether to incrementally stream the response using server-sent events.
178
178
  #
179
- # See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for
180
- # details.
179
+ # See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
181
180
  #
182
181
  # @return [Boolean, nil]
183
182
  optional :stream, Anthropic::Internal::Type::Boolean
@@ -187,7 +186,7 @@ module Anthropic
187
186
  #
188
187
  # A system prompt is a way of providing context and instructions to Claude, such
189
188
  # as specifying a particular goal or role. See our
190
- # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
189
+ # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
191
190
  #
192
191
  # @return [String, Array<Anthropic::Models::TextBlockParam>, nil]
193
192
  optional :system_,
@@ -215,7 +214,7 @@ module Anthropic
215
214
  # tokens and counts towards your `max_tokens` limit.
216
215
  #
217
216
  # See
218
- # [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
217
+ # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
219
218
  # for details.
220
219
  #
221
220
  # @return [Anthropic::Models::ThinkingConfigEnabled, Anthropic::Models::ThinkingConfigDisabled, nil]
@@ -238,9 +237,9 @@ module Anthropic
238
237
  #
239
238
  # There are two types of tools: **client tools** and **server tools**. The
240
239
  # behavior described below applies to client tools. For
241
- # [server tools](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
240
+ # [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
242
241
  # see their individual documentation as each has its own behavior (e.g., the
243
- # [web search tool](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
242
+ # [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
244
243
  #
245
244
  # Each tool definition includes:
246
245
  #
@@ -303,7 +302,7 @@ module Anthropic
303
302
  # functions, or more generally whenever you want the model to produce a particular
304
303
  # JSON structure of output.
305
304
  #
306
- # See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
305
+ # See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
307
306
  #
308
307
  # @return [Array<Anthropic::Models::Tool, Anthropic::Models::ToolBash20250124, Anthropic::Models::ToolTextEditor20250124, Anthropic::Models::ToolTextEditor20250429, Anthropic::Models::ToolTextEditor20250728, Anthropic::Models::WebSearchTool20250305>, nil]
309
308
  optional :tools, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::ToolUnion] }
@@ -376,7 +375,7 @@ module Anthropic
376
375
  # for this request.
377
376
  #
378
377
  # Anthropic offers different levels of service for your API requests. See
379
- # [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details.
378
+ # [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
380
379
  #
381
380
  # @see Anthropic::Models::Messages::BatchCreateParams::Request::Params#service_tier
382
381
  module ServiceTier
@@ -393,7 +392,7 @@ module Anthropic
393
392
  #
394
393
  # A system prompt is a way of providing context and instructions to Claude, such
395
394
  # as specifying a particular goal or role. See our
396
- # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
395
+ # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
397
396
  #
398
397
  # @see Anthropic::Models::Messages::BatchCreateParams::Request::Params#system_
399
398
  module System
@@ -30,12 +30,6 @@ module Anthropic
30
30
 
31
31
  variant const: -> { Anthropic::Models::Model::CLAUDE_SONNET_4_5_20250929 }
32
32
 
33
- variant const: -> { Anthropic::Models::Model::CLAUDE_3_5_SONNET_LATEST }
34
-
35
- variant const: -> { Anthropic::Models::Model::CLAUDE_3_5_SONNET_20241022 }
36
-
37
- variant const: -> { Anthropic::Models::Model::CLAUDE_3_5_SONNET_20240620 }
38
-
39
33
  variant const: -> { Anthropic::Models::Model::CLAUDE_OPUS_4_0 }
40
34
 
41
35
  variant const: -> { Anthropic::Models::Model::CLAUDE_OPUS_4_20250514 }
@@ -62,9 +56,15 @@ module Anthropic
62
56
  # @!group
63
57
 
64
58
  # High-performance model with early extended thinking
59
+ # @deprecated Will reach end-of-life on February 19th, 2026. Please migrate to a newer model.
60
+ # Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more
61
+ # information.
65
62
  CLAUDE_3_7_SONNET_LATEST = :"claude-3-7-sonnet-latest"
66
63
 
67
64
  # High-performance model with early extended thinking
65
+ # @deprecated Will reach end-of-life on February 19th, 2026. Please migrate to a newer model.
66
+ # Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more
67
+ # information.
68
68
  CLAUDE_3_7_SONNET_20250219 = :"claude-3-7-sonnet-20250219"
69
69
 
70
70
  # Fastest and most compact model for near-instant responsiveness
@@ -94,20 +94,6 @@ module Anthropic
94
94
  # Our best model for real-world agents and coding
95
95
  CLAUDE_SONNET_4_5_20250929 = :"claude-sonnet-4-5-20250929"
96
96
 
97
- # Our previous most intelligent model
98
- CLAUDE_3_5_SONNET_LATEST = :"claude-3-5-sonnet-latest"
99
-
100
- # Our previous most intelligent model
101
- # @deprecated Will reach end-of-life on October 22, 2025. Please migrate to a newer model.
102
- # Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more
103
- # information.
104
- CLAUDE_3_5_SONNET_20241022 = :"claude-3-5-sonnet-20241022"
105
-
106
- # @deprecated Will reach end-of-life on October 22, 2025. Please migrate to a newer model.
107
- # Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more
108
- # information.
109
- CLAUDE_3_5_SONNET_20240620 = :"claude-3-5-sonnet-20240620"
110
-
111
97
  # Our most capable model
112
98
  CLAUDE_OPUS_4_0 = :"claude-opus-4-0"
113
99
 
@@ -10,8 +10,8 @@ module Anthropic
10
10
 
11
11
  # @!attribute input
12
12
  #
13
- # @return [Object]
14
- required :input, Anthropic::Internal::Type::Unknown
13
+ # @return [Hash{Symbol=>Object}]
14
+ required :input, Anthropic::Internal::Type::HashOf[Anthropic::Internal::Type::Unknown]
15
15
 
16
16
  # @!attribute name
17
17
  #
@@ -32,7 +32,7 @@ module Anthropic
32
32
  # @!method initialize(id:, input:, cache_control: nil, name: :web_search, type: :server_tool_use)
33
33
  # @param id [String]
34
34
  #
35
- # @param input [Object]
35
+ # @param input [Hash{Symbol=>Object}]
36
36
  #
37
37
  # @param cache_control [Anthropic::Models::CacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
38
38
  #
@@ -11,7 +11,6 @@ module Anthropic
11
11
  TOOL_USE = :tool_use
12
12
  PAUSE_TURN = :pause_turn
13
13
  REFUSAL = :refusal
14
- MODEL_CONTEXT_WINDOW_EXCEEDED = :model_context_window_exceeded
15
14
 
16
15
  # @!method self.values
17
16
  # @return [Array<Symbol>]
@@ -11,7 +11,7 @@ module Anthropic
11
11
  # Must be ≥1024 and less than `max_tokens`.
12
12
  #
13
13
  # See
14
- # [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
14
+ # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
15
15
  # for details.
16
16
  #
17
17
  # @return [Integer]
@@ -9,7 +9,7 @@ module Anthropic
9
9
  # tokens and counts towards your `max_tokens` limit.
10
10
  #
11
11
  # See
12
- # [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
12
+ # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
13
13
  # for details.
14
14
  module ThinkingConfigParam
15
15
  extend Anthropic::Internal::Type::Union
@@ -65,8 +65,10 @@ module Anthropic
65
65
 
66
66
  # @!attribute properties
67
67
  #
68
- # @return [Object, nil]
69
- optional :properties, Anthropic::Internal::Type::Unknown, nil?: true
68
+ # @return [Hash{Symbol=>Object}, nil]
69
+ optional :properties,
70
+ Anthropic::Internal::Type::HashOf[Anthropic::Internal::Type::Unknown],
71
+ nil?: true
70
72
 
71
73
  # @!attribute required
72
74
  #
@@ -79,7 +81,7 @@ module Anthropic
79
81
  # This defines the shape of the `input` that your tool accepts and that the model
80
82
  # will produce.
81
83
  #
82
- # @param properties [Object, nil]
84
+ # @param properties [Hash{Symbol=>Object}, nil]
83
85
  # @param required [Array<String>, nil]
84
86
  # @param type [Symbol, :object]
85
87
  end
@@ -10,8 +10,8 @@ module Anthropic
10
10
 
11
11
  # @!attribute input
12
12
  #
13
- # @return [Object]
14
- required :input, Anthropic::Internal::Type::Unknown
13
+ # @return [Hash{Symbol=>Object}]
14
+ required :input, Anthropic::Internal::Type::HashOf[Anthropic::Internal::Type::Unknown]
15
15
 
16
16
  # @!attribute name
17
17
  #
@@ -32,7 +32,7 @@ module Anthropic
32
32
  # @!method initialize(id:, input:, name:, cache_control: nil, type: :tool_use)
33
33
  # @param id [String]
34
34
  #
35
- # @param input [Object]
35
+ # @param input [Hash{Symbol=>Object}]
36
36
  #
37
37
  # @param name [String]
38
38
  #