anthropic 1.11.0 → 1.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 (127) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/anthropic/internal/page_cursor.rb +92 -0
  5. data/lib/anthropic/internal/token_page.rb +92 -0
  6. data/lib/anthropic/models/anthropic_beta.rb +3 -0
  7. data/lib/anthropic/models/beta/beta_clear_tool_uses_20250919_edit_response.rb +0 -2
  8. data/lib/anthropic/models/beta/beta_container.rb +9 -1
  9. data/lib/anthropic/models/beta/beta_container_params.rb +34 -0
  10. data/lib/anthropic/models/beta/beta_context_management_config.rb +0 -2
  11. data/lib/anthropic/models/beta/beta_context_management_response.rb +0 -2
  12. data/lib/anthropic/models/beta/beta_message.rb +4 -2
  13. data/lib/anthropic/models/beta/beta_raw_message_delta_event.rb +2 -2
  14. data/lib/anthropic/models/beta/beta_skill.rb +51 -0
  15. data/lib/anthropic/models/beta/beta_skill_params.rb +51 -0
  16. data/lib/anthropic/models/beta/beta_thinking_config_enabled.rb +1 -1
  17. data/lib/anthropic/models/beta/beta_thinking_config_param.rb +1 -1
  18. data/lib/anthropic/models/beta/message_count_tokens_params.rb +15 -12
  19. data/lib/anthropic/models/beta/message_create_params.rb +34 -18
  20. data/lib/anthropic/models/beta/messages/batch_create_params.rb +39 -20
  21. data/lib/anthropic/models/beta/skill_create_params.rb +49 -0
  22. data/lib/anthropic/models/beta/skill_create_response.rb +84 -0
  23. data/lib/anthropic/models/beta/skill_delete_params.rb +24 -0
  24. data/lib/anthropic/models/beta/skill_delete_response.rb +34 -0
  25. data/lib/anthropic/models/beta/skill_list_params.rb +61 -0
  26. data/lib/anthropic/models/beta/skill_list_response.rb +84 -0
  27. data/lib/anthropic/models/beta/skill_retrieve_params.rb +24 -0
  28. data/lib/anthropic/models/beta/skill_retrieve_response.rb +84 -0
  29. data/lib/anthropic/models/beta/skills/version_create_params.rb +42 -0
  30. data/lib/anthropic/models/beta/skills/version_create_response.rb +92 -0
  31. data/lib/anthropic/models/beta/skills/version_delete_params.rb +39 -0
  32. data/lib/anthropic/models/beta/skills/version_delete_response.rb +36 -0
  33. data/lib/anthropic/models/beta/skills/version_list_params.rb +47 -0
  34. data/lib/anthropic/models/beta/skills/version_list_response.rb +92 -0
  35. data/lib/anthropic/models/beta/skills/version_retrieve_params.rb +39 -0
  36. data/lib/anthropic/models/beta/skills/version_retrieve_response.rb +92 -0
  37. data/lib/anthropic/models/completion_create_params.rb +3 -4
  38. data/lib/anthropic/models/message_count_tokens_params.rb +10 -10
  39. data/lib/anthropic/models/message_create_params.rb +13 -13
  40. data/lib/anthropic/models/messages/batch_create_params.rb +14 -15
  41. data/lib/anthropic/models/stop_reason.rb +0 -1
  42. data/lib/anthropic/models/thinking_config_enabled.rb +1 -1
  43. data/lib/anthropic/models/thinking_config_param.rb +1 -1
  44. data/lib/anthropic/resources/beta/messages.rb +5 -5
  45. data/lib/anthropic/resources/beta/skills/versions.rb +154 -0
  46. data/lib/anthropic/resources/beta/skills.rb +144 -0
  47. data/lib/anthropic/resources/beta.rb +4 -0
  48. data/lib/anthropic/resources/completions.rb +4 -4
  49. data/lib/anthropic/version.rb +1 -1
  50. data/lib/anthropic.rb +23 -0
  51. data/rbi/anthropic/internal/page_cursor.rbi +25 -0
  52. data/rbi/anthropic/internal/token_page.rbi +25 -0
  53. data/rbi/anthropic/models/anthropic_beta.rbi +2 -0
  54. data/rbi/anthropic/models/beta/beta_clear_tool_uses_20250919_edit_response.rbi +0 -1
  55. data/rbi/anthropic/models/beta/beta_container.rbi +23 -3
  56. data/rbi/anthropic/models/beta/beta_container_params.rbi +54 -0
  57. data/rbi/anthropic/models/beta/beta_context_management_config.rbi +0 -1
  58. data/rbi/anthropic/models/beta/beta_context_management_response.rbi +0 -1
  59. data/rbi/anthropic/models/beta/beta_message.rbi +6 -2
  60. data/rbi/anthropic/models/beta/beta_raw_message_delta_event.rbi +2 -2
  61. data/rbi/anthropic/models/beta/beta_skill.rbi +80 -0
  62. data/rbi/anthropic/models/beta/beta_skill_params.rbi +91 -0
  63. data/rbi/anthropic/models/beta/beta_thinking_config_enabled.rbi +2 -2
  64. data/rbi/anthropic/models/beta/beta_thinking_config_param.rbi +1 -1
  65. data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +27 -21
  66. data/rbi/anthropic/models/beta/message_create_params.rbi +61 -29
  67. data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +70 -33
  68. data/rbi/anthropic/models/beta/skill_create_params.rbi +90 -0
  69. data/rbi/anthropic/models/beta/skill_create_response.rbi +118 -0
  70. data/rbi/anthropic/models/beta/skill_delete_params.rbi +62 -0
  71. data/rbi/anthropic/models/beta/skill_delete_response.rbi +46 -0
  72. data/rbi/anthropic/models/beta/skill_list_params.rbi +109 -0
  73. data/rbi/anthropic/models/beta/skill_list_response.rbi +118 -0
  74. data/rbi/anthropic/models/beta/skill_retrieve_params.rbi +62 -0
  75. data/rbi/anthropic/models/beta/skill_retrieve_response.rbi +118 -0
  76. data/rbi/anthropic/models/beta/skills/version_create_params.rbi +79 -0
  77. data/rbi/anthropic/models/beta/skills/version_create_response.rbi +124 -0
  78. data/rbi/anthropic/models/beta/skills/version_delete_params.rbi +77 -0
  79. data/rbi/anthropic/models/beta/skills/version_delete_response.rbi +48 -0
  80. data/rbi/anthropic/models/beta/skills/version_list_params.rbi +85 -0
  81. data/rbi/anthropic/models/beta/skills/version_list_response.rbi +124 -0
  82. data/rbi/anthropic/models/beta/skills/version_retrieve_params.rbi +77 -0
  83. data/rbi/anthropic/models/beta/skills/version_retrieve_response.rbi +124 -0
  84. data/rbi/anthropic/models/completion_create_params.rbi +6 -8
  85. data/rbi/anthropic/models/message_count_tokens_params.rbi +19 -19
  86. data/rbi/anthropic/models/message_create_params.rbi +24 -24
  87. data/rbi/anthropic/models/messages/batch_create_params.rbi +26 -28
  88. data/rbi/anthropic/models/stop_reason.rbi +0 -5
  89. data/rbi/anthropic/models/thinking_config_enabled.rbi +2 -2
  90. data/rbi/anthropic/models/thinking_config_param.rbi +1 -1
  91. data/rbi/anthropic/resources/beta/messages.rbi +51 -36
  92. data/rbi/anthropic/resources/beta/skills/versions.rbi +124 -0
  93. data/rbi/anthropic/resources/beta/skills.rbi +118 -0
  94. data/rbi/anthropic/resources/beta.rbi +3 -0
  95. data/rbi/anthropic/resources/completions.rbi +10 -12
  96. data/rbi/anthropic/resources/messages.rbi +31 -31
  97. data/sig/anthropic/internal/page_cursor.rbs +15 -0
  98. data/sig/anthropic/internal/token_page.rbs +15 -0
  99. data/sig/anthropic/models/anthropic_beta.rbs +2 -0
  100. data/sig/anthropic/models/beta/beta_container.rbs +18 -3
  101. data/sig/anthropic/models/beta/beta_container_params.rbs +26 -0
  102. data/sig/anthropic/models/beta/beta_skill.rbs +45 -0
  103. data/sig/anthropic/models/beta/beta_skill_params.rbs +47 -0
  104. data/sig/anthropic/models/beta/message_create_params.rbs +12 -4
  105. data/sig/anthropic/models/beta/messages/batch_create_params.rbs +12 -4
  106. data/sig/anthropic/models/beta/skill_create_params.rbs +42 -0
  107. data/sig/anthropic/models/beta/skill_create_response.rbs +52 -0
  108. data/sig/anthropic/models/beta/skill_delete_params.rbs +30 -0
  109. data/sig/anthropic/models/beta/skill_delete_response.rbs +17 -0
  110. data/sig/anthropic/models/beta/skill_list_params.rbs +49 -0
  111. data/sig/anthropic/models/beta/skill_list_response.rbs +52 -0
  112. data/sig/anthropic/models/beta/skill_retrieve_params.rbs +30 -0
  113. data/sig/anthropic/models/beta/skill_retrieve_response.rbs +52 -0
  114. data/sig/anthropic/models/beta/skills/version_create_params.rbs +39 -0
  115. data/sig/anthropic/models/beta/skills/version_create_response.rbs +59 -0
  116. data/sig/anthropic/models/beta/skills/version_delete_params.rbs +39 -0
  117. data/sig/anthropic/models/beta/skills/version_delete_response.rbs +19 -0
  118. data/sig/anthropic/models/beta/skills/version_list_params.rbs +44 -0
  119. data/sig/anthropic/models/beta/skills/version_list_response.rbs +59 -0
  120. data/sig/anthropic/models/beta/skills/version_retrieve_params.rbs +39 -0
  121. data/sig/anthropic/models/beta/skills/version_retrieve_response.rbs +59 -0
  122. data/sig/anthropic/models/stop_reason.rbs +0 -2
  123. data/sig/anthropic/resources/beta/messages.rbs +2 -2
  124. data/sig/anthropic/resources/beta/skills/versions.rbs +40 -0
  125. data/sig/anthropic/resources/beta/skills.rbs +38 -0
  126. data/sig/anthropic/resources/beta.rbs +2 -0
  127. metadata +71 -2
@@ -0,0 +1,124 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ module Skills
7
+ class VersionRetrieveResponse < Anthropic::Internal::Type::BaseModel
8
+ OrHash =
9
+ T.type_alias do
10
+ T.any(
11
+ Anthropic::Models::Beta::Skills::VersionRetrieveResponse,
12
+ Anthropic::Internal::AnyHash
13
+ )
14
+ end
15
+
16
+ # Unique identifier for the skill version.
17
+ #
18
+ # The format and length of IDs may change over time.
19
+ sig { returns(String) }
20
+ attr_accessor :id
21
+
22
+ # ISO 8601 timestamp of when the skill version was created.
23
+ sig { returns(String) }
24
+ attr_accessor :created_at
25
+
26
+ # Description of the skill version.
27
+ #
28
+ # This is extracted from the SKILL.md file in the skill upload.
29
+ sig { returns(String) }
30
+ attr_accessor :description
31
+
32
+ # Directory name of the skill version.
33
+ #
34
+ # This is the top-level directory name that was extracted from the uploaded files.
35
+ sig { returns(String) }
36
+ attr_accessor :directory
37
+
38
+ # Human-readable name of the skill version.
39
+ #
40
+ # This is extracted from the SKILL.md file in the skill upload.
41
+ sig { returns(String) }
42
+ attr_accessor :name
43
+
44
+ # Identifier for the skill that this version belongs to.
45
+ sig { returns(String) }
46
+ attr_accessor :skill_id
47
+
48
+ # Object type.
49
+ #
50
+ # For Skill Versions, this is always `"skill_version"`.
51
+ sig { returns(String) }
52
+ attr_accessor :type
53
+
54
+ # Version identifier for the skill.
55
+ #
56
+ # Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
57
+ sig { returns(String) }
58
+ attr_accessor :version
59
+
60
+ sig do
61
+ params(
62
+ id: String,
63
+ created_at: String,
64
+ description: String,
65
+ directory: String,
66
+ name: String,
67
+ skill_id: String,
68
+ type: String,
69
+ version: String
70
+ ).returns(T.attached_class)
71
+ end
72
+ def self.new(
73
+ # Unique identifier for the skill version.
74
+ #
75
+ # The format and length of IDs may change over time.
76
+ id:,
77
+ # ISO 8601 timestamp of when the skill version was created.
78
+ created_at:,
79
+ # Description of the skill version.
80
+ #
81
+ # This is extracted from the SKILL.md file in the skill upload.
82
+ description:,
83
+ # Directory name of the skill version.
84
+ #
85
+ # This is the top-level directory name that was extracted from the uploaded files.
86
+ directory:,
87
+ # Human-readable name of the skill version.
88
+ #
89
+ # This is extracted from the SKILL.md file in the skill upload.
90
+ name:,
91
+ # Identifier for the skill that this version belongs to.
92
+ skill_id:,
93
+ # Object type.
94
+ #
95
+ # For Skill Versions, this is always `"skill_version"`.
96
+ type:,
97
+ # Version identifier for the skill.
98
+ #
99
+ # Each version is identified by a Unix epoch timestamp (e.g., "1759178010641129").
100
+ version:
101
+ )
102
+ end
103
+
104
+ sig do
105
+ override.returns(
106
+ {
107
+ id: String,
108
+ created_at: String,
109
+ description: String,
110
+ directory: String,
111
+ name: String,
112
+ skill_id: String,
113
+ type: String,
114
+ version: String
115
+ }
116
+ )
117
+ end
118
+ def to_hash
119
+ end
120
+ end
121
+ end
122
+ end
123
+ end
124
+ end
@@ -33,10 +33,9 @@ module Anthropic
33
33
  # "\n\nHuman: {userQuestion}\n\nAssistant:"
34
34
  # ```
35
35
  #
36
- # See [prompt validation](https://docs.anthropic.com/en/api/prompt-validation) and
37
- # our guide to
38
- # [prompt design](https://docs.anthropic.com/en/docs/intro-to-prompting) for more
39
- # details.
36
+ # See [prompt validation](https://docs.claude.com/en/api/prompt-validation) and
37
+ # our guide to [prompt design](https://docs.claude.com/en/docs/intro-to-prompting)
38
+ # for more details.
40
39
  sig { returns(String) }
41
40
  attr_accessor :prompt
42
41
 
@@ -148,10 +147,9 @@ module Anthropic
148
147
  # "\n\nHuman: {userQuestion}\n\nAssistant:"
149
148
  # ```
150
149
  #
151
- # See [prompt validation](https://docs.anthropic.com/en/api/prompt-validation) and
152
- # our guide to
153
- # [prompt design](https://docs.anthropic.com/en/docs/intro-to-prompting) for more
154
- # details.
150
+ # See [prompt validation](https://docs.claude.com/en/api/prompt-validation) and
151
+ # our guide to [prompt design](https://docs.claude.com/en/docs/intro-to-prompting)
152
+ # for more details.
155
153
  prompt:,
156
154
  # An object describing metadata about the request.
157
155
  metadata: nil,
@@ -71,12 +71,12 @@ module Anthropic
71
71
  # { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
72
72
  # ```
73
73
  #
74
- # See [input examples](https://docs.anthropic.com/en/api/messages-examples).
74
+ # See [input examples](https://docs.claude.com/en/api/messages-examples).
75
75
  #
76
76
  # Note that if you want to include a
77
- # [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
78
- # the top-level `system` parameter — there is no `"system"` role for input
79
- # messages in the Messages API.
77
+ # [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
78
+ # top-level `system` parameter — there is no `"system"` role for input messages in
79
+ # the Messages API.
80
80
  #
81
81
  # There is a limit of 100,000 messages in a single request.
82
82
  sig { returns(T::Array[Anthropic::MessageParam]) }
@@ -92,7 +92,7 @@ module Anthropic
92
92
  #
93
93
  # A system prompt is a way of providing context and instructions to Claude, such
94
94
  # as specifying a particular goal or role. See our
95
- # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
95
+ # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
96
96
  sig do
97
97
  returns(
98
98
  T.nilable(Anthropic::MessageCountTokensParams::System::Variants)
@@ -114,7 +114,7 @@ module Anthropic
114
114
  # tokens and counts towards your `max_tokens` limit.
115
115
  #
116
116
  # See
117
- # [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
117
+ # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
118
118
  # for details.
119
119
  sig do
120
120
  returns(
@@ -177,9 +177,9 @@ module Anthropic
177
177
  #
178
178
  # There are two types of tools: **client tools** and **server tools**. The
179
179
  # behavior described below applies to client tools. For
180
- # [server tools](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
180
+ # [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
181
181
  # see their individual documentation as each has its own behavior (e.g., the
182
- # [web search tool](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
182
+ # [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
183
183
  #
184
184
  # Each tool definition includes:
185
185
  #
@@ -242,7 +242,7 @@ module Anthropic
242
242
  # functions, or more generally whenever you want the model to produce a particular
243
243
  # JSON structure of output.
244
244
  #
245
- # See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
245
+ # See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
246
246
  sig do
247
247
  returns(
248
248
  T.nilable(
@@ -367,12 +367,12 @@ module Anthropic
367
367
  # { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
368
368
  # ```
369
369
  #
370
- # See [input examples](https://docs.anthropic.com/en/api/messages-examples).
370
+ # See [input examples](https://docs.claude.com/en/api/messages-examples).
371
371
  #
372
372
  # Note that if you want to include a
373
- # [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
374
- # the top-level `system` parameter — there is no `"system"` role for input
375
- # messages in the Messages API.
373
+ # [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
374
+ # top-level `system` parameter — there is no `"system"` role for input messages in
375
+ # the Messages API.
376
376
  #
377
377
  # There is a limit of 100,000 messages in a single request.
378
378
  messages:,
@@ -384,7 +384,7 @@ module Anthropic
384
384
  #
385
385
  # A system prompt is a way of providing context and instructions to Claude, such
386
386
  # as specifying a particular goal or role. See our
387
- # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
387
+ # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
388
388
  system_: nil,
389
389
  # Configuration for enabling Claude's extended thinking.
390
390
  #
@@ -393,7 +393,7 @@ module Anthropic
393
393
  # tokens and counts towards your `max_tokens` limit.
394
394
  #
395
395
  # See
396
- # [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
396
+ # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
397
397
  # for details.
398
398
  thinking: nil,
399
399
  # How the model should use the provided tools. The model can use a specific tool,
@@ -408,9 +408,9 @@ module Anthropic
408
408
  #
409
409
  # There are two types of tools: **client tools** and **server tools**. The
410
410
  # behavior described below applies to client tools. For
411
- # [server tools](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
411
+ # [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
412
412
  # see their individual documentation as each has its own behavior (e.g., the
413
- # [web search tool](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
413
+ # [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
414
414
  #
415
415
  # Each tool definition includes:
416
416
  #
@@ -473,7 +473,7 @@ module Anthropic
473
473
  # functions, or more generally whenever you want the model to produce a particular
474
474
  # JSON structure of output.
475
475
  #
476
- # See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
476
+ # See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
477
477
  tools: nil,
478
478
  request_options: {}
479
479
  )
@@ -519,7 +519,7 @@ module Anthropic
519
519
  #
520
520
  # A system prompt is a way of providing context and instructions to Claude, such
521
521
  # as specifying a particular goal or role. See our
522
- # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
522
+ # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
523
523
  module System
524
524
  extend Anthropic::Internal::Type::Union
525
525
 
@@ -17,7 +17,7 @@ module Anthropic
17
17
  # only specifies the absolute maximum number of tokens to generate.
18
18
  #
19
19
  # Different models have different maximum values for this parameter. See
20
- # [models](https://docs.anthropic.com/en/docs/models-overview) for details.
20
+ # [models](https://docs.claude.com/en/docs/models-overview) for details.
21
21
  sig { returns(Integer) }
22
22
  attr_accessor :max_tokens
23
23
 
@@ -78,12 +78,12 @@ module Anthropic
78
78
  # { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
79
79
  # ```
80
80
  #
81
- # See [input examples](https://docs.anthropic.com/en/api/messages-examples).
81
+ # See [input examples](https://docs.claude.com/en/api/messages-examples).
82
82
  #
83
83
  # Note that if you want to include a
84
- # [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
85
- # the top-level `system` parameter — there is no `"system"` role for input
86
- # messages in the Messages API.
84
+ # [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
85
+ # top-level `system` parameter — there is no `"system"` role for input messages in
86
+ # the Messages API.
87
87
  #
88
88
  # There is a limit of 100,000 messages in a single request.
89
89
  sig { returns(T::Array[Anthropic::MessageParam]) }
@@ -106,7 +106,7 @@ module Anthropic
106
106
  # for this request.
107
107
  #
108
108
  # Anthropic offers different levels of service for your API requests. See
109
- # [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details.
109
+ # [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
110
110
  sig do
111
111
  returns(
112
112
  T.nilable(Anthropic::MessageCreateParams::ServiceTier::OrSymbol)
@@ -140,7 +140,7 @@ module Anthropic
140
140
  #
141
141
  # A system prompt is a way of providing context and instructions to Claude, such
142
142
  # as specifying a particular goal or role. See our
143
- # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
143
+ # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
144
144
  sig do
145
145
  returns(T.nilable(Anthropic::MessageCreateParams::System::Variants))
146
146
  end
@@ -172,7 +172,7 @@ module Anthropic
172
172
  # tokens and counts towards your `max_tokens` limit.
173
173
  #
174
174
  # See
175
- # [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
175
+ # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
176
176
  # for details.
177
177
  sig do
178
178
  returns(
@@ -235,9 +235,9 @@ module Anthropic
235
235
  #
236
236
  # There are two types of tools: **client tools** and **server tools**. The
237
237
  # behavior described below applies to client tools. For
238
- # [server tools](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
238
+ # [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
239
239
  # see their individual documentation as each has its own behavior (e.g., the
240
- # [web search tool](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
240
+ # [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
241
241
  #
242
242
  # Each tool definition includes:
243
243
  #
@@ -300,7 +300,7 @@ module Anthropic
300
300
  # functions, or more generally whenever you want the model to produce a particular
301
301
  # JSON structure of output.
302
302
  #
303
- # See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
303
+ # See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
304
304
  sig do
305
305
  returns(
306
306
  T.nilable(
@@ -409,7 +409,7 @@ module Anthropic
409
409
  # only specifies the absolute maximum number of tokens to generate.
410
410
  #
411
411
  # Different models have different maximum values for this parameter. See
412
- # [models](https://docs.anthropic.com/en/docs/models-overview) for details.
412
+ # [models](https://docs.claude.com/en/docs/models-overview) for details.
413
413
  max_tokens:,
414
414
  # Input messages.
415
415
  #
@@ -468,12 +468,12 @@ module Anthropic
468
468
  # { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
469
469
  # ```
470
470
  #
471
- # See [input examples](https://docs.anthropic.com/en/api/messages-examples).
471
+ # See [input examples](https://docs.claude.com/en/api/messages-examples).
472
472
  #
473
473
  # Note that if you want to include a
474
- # [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
475
- # the top-level `system` parameter — there is no `"system"` role for input
476
- # messages in the Messages API.
474
+ # [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
475
+ # top-level `system` parameter — there is no `"system"` role for input messages in
476
+ # the Messages API.
477
477
  #
478
478
  # There is a limit of 100,000 messages in a single request.
479
479
  messages:,
@@ -487,7 +487,7 @@ module Anthropic
487
487
  # for this request.
488
488
  #
489
489
  # Anthropic offers different levels of service for your API requests. See
490
- # [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details.
490
+ # [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
491
491
  service_tier: nil,
492
492
  # Custom text sequences that will cause the model to stop generating.
493
493
  #
@@ -503,7 +503,7 @@ module Anthropic
503
503
  #
504
504
  # A system prompt is a way of providing context and instructions to Claude, such
505
505
  # as specifying a particular goal or role. See our
506
- # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
506
+ # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
507
507
  system_: nil,
508
508
  # Amount of randomness injected into the response.
509
509
  #
@@ -521,7 +521,7 @@ module Anthropic
521
521
  # tokens and counts towards your `max_tokens` limit.
522
522
  #
523
523
  # See
524
- # [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
524
+ # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
525
525
  # for details.
526
526
  thinking: nil,
527
527
  # How the model should use the provided tools. The model can use a specific tool,
@@ -536,9 +536,9 @@ module Anthropic
536
536
  #
537
537
  # There are two types of tools: **client tools** and **server tools**. The
538
538
  # behavior described below applies to client tools. For
539
- # [server tools](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
539
+ # [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
540
540
  # see their individual documentation as each has its own behavior (e.g., the
541
- # [web search tool](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
541
+ # [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
542
542
  #
543
543
  # Each tool definition includes:
544
544
  #
@@ -601,7 +601,7 @@ module Anthropic
601
601
  # functions, or more generally whenever you want the model to produce a particular
602
602
  # JSON structure of output.
603
603
  #
604
- # See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
604
+ # See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
605
605
  tools: nil,
606
606
  # Only sample from the top K options for each subsequent token.
607
607
  #
@@ -672,7 +672,7 @@ module Anthropic
672
672
  # for this request.
673
673
  #
674
674
  # Anthropic offers different levels of service for your API requests. See
675
- # [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details.
675
+ # [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
676
676
  module ServiceTier
677
677
  extend Anthropic::Internal::Type::Enum
678
678
 
@@ -706,7 +706,7 @@ module Anthropic
706
706
  #
707
707
  # A system prompt is a way of providing context and instructions to Claude, such
708
708
  # as specifying a particular goal or role. See our
709
- # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
709
+ # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
710
710
  module System
711
711
  extend Anthropic::Internal::Type::Union
712
712
 
@@ -129,7 +129,7 @@ module Anthropic
129
129
  # only specifies the absolute maximum number of tokens to generate.
130
130
  #
131
131
  # Different models have different maximum values for this parameter. See
132
- # [models](https://docs.anthropic.com/en/docs/models-overview) for details.
132
+ # [models](https://docs.claude.com/en/docs/models-overview) for details.
133
133
  sig { returns(Integer) }
134
134
  attr_accessor :max_tokens
135
135
 
@@ -190,12 +190,12 @@ module Anthropic
190
190
  # { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
191
191
  # ```
192
192
  #
193
- # See [input examples](https://docs.anthropic.com/en/api/messages-examples).
193
+ # See [input examples](https://docs.claude.com/en/api/messages-examples).
194
194
  #
195
195
  # Note that if you want to include a
196
- # [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
197
- # the top-level `system` parameter — there is no `"system"` role for input
198
- # messages in the Messages API.
196
+ # [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
197
+ # top-level `system` parameter — there is no `"system"` role for input messages in
198
+ # the Messages API.
199
199
  #
200
200
  # There is a limit of 100,000 messages in a single request.
201
201
  sig { returns(T::Array[Anthropic::MessageParam]) }
@@ -218,7 +218,7 @@ module Anthropic
218
218
  # for this request.
219
219
  #
220
220
  # Anthropic offers different levels of service for your API requests. See
221
- # [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details.
221
+ # [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
222
222
  sig do
223
223
  returns(
224
224
  T.nilable(
@@ -253,8 +253,7 @@ module Anthropic
253
253
 
254
254
  # Whether to incrementally stream the response using server-sent events.
255
255
  #
256
- # See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for
257
- # details.
256
+ # See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
258
257
  sig { returns(T.nilable(T::Boolean)) }
259
258
  attr_reader :stream
260
259
 
@@ -265,7 +264,7 @@ module Anthropic
265
264
  #
266
265
  # A system prompt is a way of providing context and instructions to Claude, such
267
266
  # as specifying a particular goal or role. See our
268
- # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
267
+ # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
269
268
  sig do
270
269
  returns(
271
270
  T.nilable(
@@ -304,7 +303,7 @@ module Anthropic
304
303
  # tokens and counts towards your `max_tokens` limit.
305
304
  #
306
305
  # See
307
- # [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
306
+ # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
308
307
  # for details.
309
308
  sig do
310
309
  returns(
@@ -367,9 +366,9 @@ module Anthropic
367
366
  #
368
367
  # There are two types of tools: **client tools** and **server tools**. The
369
368
  # behavior described below applies to client tools. For
370
- # [server tools](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
369
+ # [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
371
370
  # see their individual documentation as each has its own behavior (e.g., the
372
- # [web search tool](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
371
+ # [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
373
372
  #
374
373
  # Each tool definition includes:
375
374
  #
@@ -432,7 +431,7 @@ module Anthropic
432
431
  # functions, or more generally whenever you want the model to produce a particular
433
432
  # JSON structure of output.
434
433
  #
435
- # See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
434
+ # See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
436
435
  sig do
437
436
  returns(
438
437
  T.nilable(
@@ -547,7 +546,7 @@ module Anthropic
547
546
  # only specifies the absolute maximum number of tokens to generate.
548
547
  #
549
548
  # Different models have different maximum values for this parameter. See
550
- # [models](https://docs.anthropic.com/en/docs/models-overview) for details.
549
+ # [models](https://docs.claude.com/en/docs/models-overview) for details.
551
550
  max_tokens:,
552
551
  # Input messages.
553
552
  #
@@ -606,12 +605,12 @@ module Anthropic
606
605
  # { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
607
606
  # ```
608
607
  #
609
- # See [input examples](https://docs.anthropic.com/en/api/messages-examples).
608
+ # See [input examples](https://docs.claude.com/en/api/messages-examples).
610
609
  #
611
610
  # Note that if you want to include a
612
- # [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
613
- # the top-level `system` parameter — there is no `"system"` role for input
614
- # messages in the Messages API.
611
+ # [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
612
+ # top-level `system` parameter — there is no `"system"` role for input messages in
613
+ # the Messages API.
615
614
  #
616
615
  # There is a limit of 100,000 messages in a single request.
617
616
  messages:,
@@ -625,7 +624,7 @@ module Anthropic
625
624
  # for this request.
626
625
  #
627
626
  # Anthropic offers different levels of service for your API requests. See
628
- # [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details.
627
+ # [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
629
628
  service_tier: nil,
630
629
  # Custom text sequences that will cause the model to stop generating.
631
630
  #
@@ -639,14 +638,13 @@ module Anthropic
639
638
  stop_sequences: nil,
640
639
  # Whether to incrementally stream the response using server-sent events.
641
640
  #
642
- # See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for
643
- # details.
641
+ # See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
644
642
  stream: nil,
645
643
  # System prompt.
646
644
  #
647
645
  # A system prompt is a way of providing context and instructions to Claude, such
648
646
  # as specifying a particular goal or role. See our
649
- # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
647
+ # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
650
648
  system_: nil,
651
649
  # Amount of randomness injected into the response.
652
650
  #
@@ -664,7 +662,7 @@ module Anthropic
664
662
  # tokens and counts towards your `max_tokens` limit.
665
663
  #
666
664
  # See
667
- # [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
665
+ # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
668
666
  # for details.
669
667
  thinking: nil,
670
668
  # How the model should use the provided tools. The model can use a specific tool,
@@ -679,9 +677,9 @@ module Anthropic
679
677
  #
680
678
  # There are two types of tools: **client tools** and **server tools**. The
681
679
  # behavior described below applies to client tools. For
682
- # [server tools](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
680
+ # [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
683
681
  # see their individual documentation as each has its own behavior (e.g., the
684
- # [web search tool](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
682
+ # [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
685
683
  #
686
684
  # Each tool definition includes:
687
685
  #
@@ -744,7 +742,7 @@ module Anthropic
744
742
  # functions, or more generally whenever you want the model to produce a particular
745
743
  # JSON structure of output.
746
744
  #
747
- # See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
745
+ # See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
748
746
  tools: nil,
749
747
  # Only sample from the top K options for each subsequent token.
750
748
  #
@@ -816,7 +814,7 @@ module Anthropic
816
814
  # for this request.
817
815
  #
818
816
  # Anthropic offers different levels of service for your API requests. See
819
- # [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details.
817
+ # [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
820
818
  module ServiceTier
821
819
  extend Anthropic::Internal::Type::Enum
822
820
 
@@ -855,7 +853,7 @@ module Anthropic
855
853
  #
856
854
  # A system prompt is a way of providing context and instructions to Claude, such
857
855
  # as specifying a particular goal or role. See our
858
- # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
856
+ # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
859
857
  module System
860
858
  extend Anthropic::Internal::Type::Union
861
859
 
@@ -14,11 +14,6 @@ module Anthropic
14
14
  TOOL_USE = T.let(:tool_use, Anthropic::StopReason::TaggedSymbol)
15
15
  PAUSE_TURN = T.let(:pause_turn, Anthropic::StopReason::TaggedSymbol)
16
16
  REFUSAL = T.let(:refusal, Anthropic::StopReason::TaggedSymbol)
17
- MODEL_CONTEXT_WINDOW_EXCEEDED =
18
- T.let(
19
- :model_context_window_exceeded,
20
- Anthropic::StopReason::TaggedSymbol
21
- )
22
17
 
23
18
  sig { override.returns(T::Array[Anthropic::StopReason::TaggedSymbol]) }
24
19
  def self.values
@@ -15,7 +15,7 @@ module Anthropic
15
15
  # Must be ≥1024 and less than `max_tokens`.
16
16
  #
17
17
  # See
18
- # [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
18
+ # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
19
19
  # for details.
20
20
  sig { returns(Integer) }
21
21
  attr_accessor :budget_tokens
@@ -34,7 +34,7 @@ module Anthropic
34
34
  # Must be ≥1024 and less than `max_tokens`.
35
35
  #
36
36
  # See
37
- # [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
37
+ # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
38
38
  # for details.
39
39
  budget_tokens:,
40
40
  type: :enabled
@@ -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