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
@@ -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
  #
22
22
  # @return [Integer]
23
23
  required :max_tokens, Integer
@@ -80,12 +80,12 @@ module Anthropic
80
80
  # { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
81
81
  # ```
82
82
  #
83
- # See [input examples](https://docs.anthropic.com/en/api/messages-examples).
83
+ # See [input examples](https://docs.claude.com/en/api/messages-examples).
84
84
  #
85
85
  # Note that if you want to include a
86
- # [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
87
- # the top-level `system` parameter — there is no `"system"` role for input
88
- # messages in the Messages API.
86
+ # [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
87
+ # top-level `system` parameter — there is no `"system"` role for input messages in
88
+ # the Messages API.
89
89
  #
90
90
  # There is a limit of 100,000 messages in a single request.
91
91
  #
@@ -103,11 +103,14 @@ module Anthropic
103
103
  # @!attribute container
104
104
  # Container identifier for reuse across requests.
105
105
  #
106
- # @return [String, nil]
107
- optional :container, String, nil?: true
106
+ # @return [Anthropic::Models::Beta::BetaContainerParams, String, nil]
107
+ optional :container, union: -> { Anthropic::Beta::MessageCreateParams::Container }, nil?: true
108
108
 
109
109
  # @!attribute context_management
110
- # Configuration for context management operations.
110
+ # Context management configuration.
111
+ #
112
+ # This allows you to control how Claude manages context across multiple requests,
113
+ # such as whether to clear function results or not.
111
114
  #
112
115
  # @return [Anthropic::Models::Beta::BetaContextManagementConfig, nil]
113
116
  optional :context_management, -> { Anthropic::Beta::BetaContextManagementConfig }, nil?: true
@@ -130,7 +133,7 @@ module Anthropic
130
133
  # for this request.
131
134
  #
132
135
  # Anthropic offers different levels of service for your API requests. See
133
- # [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details.
136
+ # [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
134
137
  #
135
138
  # @return [Symbol, Anthropic::Models::Beta::MessageCreateParams::ServiceTier, nil]
136
139
  optional :service_tier, enum: -> { Anthropic::Beta::MessageCreateParams::ServiceTier }
@@ -154,7 +157,7 @@ module Anthropic
154
157
  #
155
158
  # A system prompt is a way of providing context and instructions to Claude, such
156
159
  # as specifying a particular goal or role. See our
157
- # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
160
+ # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
158
161
  #
159
162
  # @return [String, Array<Anthropic::Models::Beta::BetaTextBlockParam>, nil]
160
163
  optional :system_, union: -> { Anthropic::Beta::MessageCreateParams::System }, api_name: :system
@@ -180,7 +183,7 @@ module Anthropic
180
183
  # tokens and counts towards your `max_tokens` limit.
181
184
  #
182
185
  # See
183
- # [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
186
+ # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
184
187
  # for details.
185
188
  #
186
189
  # @return [Anthropic::Models::Beta::BetaThinkingConfigEnabled, Anthropic::Models::Beta::BetaThinkingConfigDisabled, nil]
@@ -203,9 +206,9 @@ module Anthropic
203
206
  #
204
207
  # There are two types of tools: **client tools** and **server tools**. The
205
208
  # behavior described below applies to client tools. For
206
- # [server tools](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
209
+ # [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
207
210
  # see their individual documentation as each has its own behavior (e.g., the
208
- # [web search tool](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
211
+ # [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
209
212
  #
210
213
  # Each tool definition includes:
211
214
  #
@@ -268,7 +271,7 @@ module Anthropic
268
271
  # functions, or more generally whenever you want the model to produce a particular
269
272
  # JSON structure of output.
270
273
  #
271
- # See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
274
+ # See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
272
275
  #
273
276
  # @return [Array<Anthropic::Models::Beta::BetaTool, Anthropic::Models::Beta::BetaToolBash20241022, Anthropic::Models::Beta::BetaToolBash20250124, Anthropic::Models::Beta::BetaCodeExecutionTool20250522, Anthropic::Models::Beta::BetaCodeExecutionTool20250825, Anthropic::Models::Beta::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaMemoryTool20250818, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolTextEditor20250124, Anthropic::Models::Beta::BetaToolTextEditor20250429, Anthropic::Models::Beta::BetaToolTextEditor20250728, Anthropic::Models::Beta::BetaWebSearchTool20250305, Anthropic::Models::Beta::BetaWebFetchTool20250910>, nil]
274
277
  optional :tools, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::BetaToolUnion] }
@@ -315,9 +318,9 @@ module Anthropic
315
318
  #
316
319
  # @param model [Symbol, String, Anthropic::Models::Model] The model that will complete your prompt.\n\nSee [models](https://docs.anthropic
317
320
  #
318
- # @param container [String, nil] Container identifier for reuse across requests.
321
+ # @param container [Anthropic::Models::Beta::BetaContainerParams, String, nil] Container identifier for reuse across requests.
319
322
  #
320
- # @param context_management [Anthropic::Models::Beta::BetaContextManagementConfig, nil] Configuration for context management operations.
323
+ # @param context_management [Anthropic::Models::Beta::BetaContextManagementConfig, nil] Context management configuration.
321
324
  #
322
325
  # @param mcp_servers [Array<Anthropic::Models::Beta::BetaRequestMCPServerURLDefinition>] MCP servers to be utilized in this request
323
326
  #
@@ -345,11 +348,24 @@ module Anthropic
345
348
  #
346
349
  # @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}]
347
350
 
351
+ # Container identifier for reuse across requests.
352
+ module Container
353
+ extend Anthropic::Internal::Type::Union
354
+
355
+ # Container parameters with skills to be loaded.
356
+ variant -> { Anthropic::Beta::BetaContainerParams }
357
+
358
+ variant String
359
+
360
+ # @!method self.variants
361
+ # @return [Array(Anthropic::Models::Beta::BetaContainerParams, String)]
362
+ end
363
+
348
364
  # Determines whether to use priority capacity (if available) or standard capacity
349
365
  # for this request.
350
366
  #
351
367
  # Anthropic offers different levels of service for your API requests. See
352
- # [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details.
368
+ # [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
353
369
  module ServiceTier
354
370
  extend Anthropic::Internal::Type::Enum
355
371
 
@@ -364,7 +380,7 @@ module Anthropic
364
380
  #
365
381
  # A system prompt is a way of providing context and instructions to Claude, such
366
382
  # as specifying a particular goal or role. See our
367
- # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
383
+ # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
368
384
  module System
369
385
  extend Anthropic::Internal::Type::Union
370
386
 
@@ -70,7 +70,7 @@ module Anthropic
70
70
  # only specifies the absolute maximum number of tokens to generate.
71
71
  #
72
72
  # Different models have different maximum values for this parameter. See
73
- # [models](https://docs.anthropic.com/en/docs/models-overview) for details.
73
+ # [models](https://docs.claude.com/en/docs/models-overview) for details.
74
74
  #
75
75
  # @return [Integer]
76
76
  required :max_tokens, Integer
@@ -133,12 +133,12 @@ module Anthropic
133
133
  # { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] }
134
134
  # ```
135
135
  #
136
- # See [input examples](https://docs.anthropic.com/en/api/messages-examples).
136
+ # See [input examples](https://docs.claude.com/en/api/messages-examples).
137
137
  #
138
138
  # Note that if you want to include a
139
- # [system prompt](https://docs.anthropic.com/en/docs/system-prompts), you can use
140
- # the top-level `system` parameter — there is no `"system"` role for input
141
- # messages in the Messages API.
139
+ # [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the
140
+ # top-level `system` parameter — there is no `"system"` role for input messages in
141
+ # the Messages API.
142
142
  #
143
143
  # There is a limit of 100,000 messages in a single request.
144
144
  #
@@ -156,11 +156,16 @@ module Anthropic
156
156
  # @!attribute container
157
157
  # Container identifier for reuse across requests.
158
158
  #
159
- # @return [String, nil]
160
- optional :container, String, nil?: true
159
+ # @return [Anthropic::Models::Beta::BetaContainerParams, String, nil]
160
+ optional :container,
161
+ union: -> { Anthropic::Beta::Messages::BatchCreateParams::Request::Params::Container },
162
+ nil?: true
161
163
 
162
164
  # @!attribute context_management
163
- # Configuration for context management operations.
165
+ # Context management configuration.
166
+ #
167
+ # This allows you to control how Claude manages context across multiple requests,
168
+ # such as whether to clear function results or not.
164
169
  #
165
170
  # @return [Anthropic::Models::Beta::BetaContextManagementConfig, nil]
166
171
  optional :context_management, -> { Anthropic::Beta::BetaContextManagementConfig }, nil?: true
@@ -183,7 +188,7 @@ module Anthropic
183
188
  # for this request.
184
189
  #
185
190
  # Anthropic offers different levels of service for your API requests. See
186
- # [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details.
191
+ # [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
187
192
  #
188
193
  # @return [Symbol, Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params::ServiceTier, nil]
189
194
  optional :service_tier,
@@ -206,8 +211,7 @@ module Anthropic
206
211
  # @!attribute stream
207
212
  # Whether to incrementally stream the response using server-sent events.
208
213
  #
209
- # See [streaming](https://docs.anthropic.com/en/api/messages-streaming) for
210
- # details.
214
+ # See [streaming](https://docs.claude.com/en/api/messages-streaming) for details.
211
215
  #
212
216
  # @return [Boolean, nil]
213
217
  optional :stream, Anthropic::Internal::Type::Boolean
@@ -217,7 +221,7 @@ module Anthropic
217
221
  #
218
222
  # A system prompt is a way of providing context and instructions to Claude, such
219
223
  # as specifying a particular goal or role. See our
220
- # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
224
+ # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
221
225
  #
222
226
  # @return [String, Array<Anthropic::Models::Beta::BetaTextBlockParam>, nil]
223
227
  optional :system_,
@@ -245,7 +249,7 @@ module Anthropic
245
249
  # tokens and counts towards your `max_tokens` limit.
246
250
  #
247
251
  # See
248
- # [extended thinking](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking)
252
+ # [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking)
249
253
  # for details.
250
254
  #
251
255
  # @return [Anthropic::Models::Beta::BetaThinkingConfigEnabled, Anthropic::Models::Beta::BetaThinkingConfigDisabled, nil]
@@ -268,9 +272,9 @@ module Anthropic
268
272
  #
269
273
  # There are two types of tools: **client tools** and **server tools**. The
270
274
  # behavior described below applies to client tools. For
271
- # [server tools](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
275
+ # [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools),
272
276
  # see their individual documentation as each has its own behavior (e.g., the
273
- # [web search tool](https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
277
+ # [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).
274
278
  #
275
279
  # Each tool definition includes:
276
280
  #
@@ -333,7 +337,7 @@ module Anthropic
333
337
  # functions, or more generally whenever you want the model to produce a particular
334
338
  # JSON structure of output.
335
339
  #
336
- # See our [guide](https://docs.anthropic.com/en/docs/tool-use) for more details.
340
+ # See our [guide](https://docs.claude.com/en/docs/tool-use) for more details.
337
341
  #
338
342
  # @return [Array<Anthropic::Models::Beta::BetaTool, Anthropic::Models::Beta::BetaToolBash20241022, Anthropic::Models::Beta::BetaToolBash20250124, Anthropic::Models::Beta::BetaCodeExecutionTool20250522, Anthropic::Models::Beta::BetaCodeExecutionTool20250825, Anthropic::Models::Beta::BetaToolComputerUse20241022, Anthropic::Models::Beta::BetaMemoryTool20250818, Anthropic::Models::Beta::BetaToolComputerUse20250124, Anthropic::Models::Beta::BetaToolTextEditor20241022, Anthropic::Models::Beta::BetaToolTextEditor20250124, Anthropic::Models::Beta::BetaToolTextEditor20250429, Anthropic::Models::Beta::BetaToolTextEditor20250728, Anthropic::Models::Beta::BetaWebSearchTool20250305, Anthropic::Models::Beta::BetaWebFetchTool20250910>, nil]
339
343
  optional :tools, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::BetaToolUnion] }
@@ -380,9 +384,9 @@ module Anthropic
380
384
  #
381
385
  # @param model [Symbol, String, Anthropic::Models::Model] The model that will complete your prompt.\n\nSee [models](https://docs.anthropic
382
386
  #
383
- # @param container [String, nil] Container identifier for reuse across requests.
387
+ # @param container [Anthropic::Models::Beta::BetaContainerParams, String, nil] Container identifier for reuse across requests.
384
388
  #
385
- # @param context_management [Anthropic::Models::Beta::BetaContextManagementConfig, nil] Configuration for context management operations.
389
+ # @param context_management [Anthropic::Models::Beta::BetaContextManagementConfig, nil] Context management configuration.
386
390
  #
387
391
  # @param mcp_servers [Array<Anthropic::Models::Beta::BetaRequestMCPServerURLDefinition>] MCP servers to be utilized in this request
388
392
  #
@@ -408,11 +412,26 @@ module Anthropic
408
412
  #
409
413
  # @param top_p [Float] Use nucleus sampling.
410
414
 
415
+ # Container identifier for reuse across requests.
416
+ #
417
+ # @see Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params#container
418
+ module Container
419
+ extend Anthropic::Internal::Type::Union
420
+
421
+ # Container parameters with skills to be loaded.
422
+ variant -> { Anthropic::Beta::BetaContainerParams }
423
+
424
+ variant String
425
+
426
+ # @!method self.variants
427
+ # @return [Array(Anthropic::Models::Beta::BetaContainerParams, String)]
428
+ end
429
+
411
430
  # Determines whether to use priority capacity (if available) or standard capacity
412
431
  # for this request.
413
432
  #
414
433
  # Anthropic offers different levels of service for your API requests. See
415
- # [service-tiers](https://docs.anthropic.com/en/api/service-tiers) for details.
434
+ # [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
416
435
  #
417
436
  # @see Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params#service_tier
418
437
  module ServiceTier
@@ -429,7 +448,7 @@ module Anthropic
429
448
  #
430
449
  # A system prompt is a way of providing context and instructions to Claude, such
431
450
  # as specifying a particular goal or role. See our
432
- # [guide to system prompts](https://docs.anthropic.com/en/docs/system-prompts).
451
+ # [guide to system prompts](https://docs.claude.com/en/docs/system-prompts).
433
452
  #
434
453
  # @see Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params#system_
435
454
  module System
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ # @see Anthropic::Resources::Beta::Skills#create
7
+ class SkillCreateParams < Anthropic::Internal::Type::BaseModel
8
+ extend Anthropic::Internal::Type::RequestParameters::Converter
9
+ include Anthropic::Internal::Type::RequestParameters
10
+
11
+ # @!attribute display_title
12
+ # Display title for the skill.
13
+ #
14
+ # This is a human-readable label that is not included in the prompt sent to the
15
+ # model.
16
+ #
17
+ # @return [String, nil]
18
+ optional :display_title, String, nil?: true
19
+
20
+ # @!attribute files
21
+ # Files to upload for the skill.
22
+ #
23
+ # All files must be in the same top-level directory and must include a SKILL.md
24
+ # file at the root of that directory.
25
+ #
26
+ # @return [Array<Pathname, StringIO, IO, String, Anthropic::FilePart>, nil]
27
+ optional :files, Anthropic::Internal::Type::ArrayOf[Anthropic::Internal::Type::FileInput], nil?: true
28
+
29
+ # @!attribute betas
30
+ # Optional header to specify the beta version(s) you want to use.
31
+ #
32
+ # @return [Array<String, Symbol, Anthropic::Models::AnthropicBeta>, nil]
33
+ optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }
34
+
35
+ # @!method initialize(display_title: nil, files: nil, betas: nil, request_options: {})
36
+ # Some parameter documentations has been truncated, see
37
+ # {Anthropic::Models::Beta::SkillCreateParams} for more details.
38
+ #
39
+ # @param display_title [String, nil] Display title for the skill.
40
+ #
41
+ # @param files [Array<Pathname, StringIO, IO, String, Anthropic::FilePart>, nil] Files to upload for the skill.
42
+ #
43
+ # @param betas [Array<String, Symbol, Anthropic::Models::AnthropicBeta>] Optional header to specify the beta version(s) you want to use.
44
+ #
45
+ # @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}]
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,84 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ # @see Anthropic::Resources::Beta::Skills#create
7
+ class SkillCreateResponse < Anthropic::Internal::Type::BaseModel
8
+ # @!attribute id
9
+ # Unique identifier for the skill.
10
+ #
11
+ # The format and length of IDs may change over time.
12
+ #
13
+ # @return [String]
14
+ required :id, String
15
+
16
+ # @!attribute created_at
17
+ # ISO 8601 timestamp of when the skill was created.
18
+ #
19
+ # @return [String]
20
+ required :created_at, String
21
+
22
+ # @!attribute display_title
23
+ # Display title for the skill.
24
+ #
25
+ # This is a human-readable label that is not included in the prompt sent to the
26
+ # model.
27
+ #
28
+ # @return [String, nil]
29
+ required :display_title, String, nil?: true
30
+
31
+ # @!attribute latest_version
32
+ # The latest version identifier for the skill.
33
+ #
34
+ # This represents the most recent version of the skill that has been created.
35
+ #
36
+ # @return [String, nil]
37
+ required :latest_version, String, nil?: true
38
+
39
+ # @!attribute source
40
+ # Source of the skill.
41
+ #
42
+ # This may be one of the following values:
43
+ #
44
+ # - `"custom"`: the skill was created by a user
45
+ # - `"anthropic"`: the skill was created by Anthropic
46
+ #
47
+ # @return [String]
48
+ required :source, String
49
+
50
+ # @!attribute type
51
+ # Object type.
52
+ #
53
+ # For Skills, this is always `"skill"`.
54
+ #
55
+ # @return [String]
56
+ required :type, String
57
+
58
+ # @!attribute updated_at
59
+ # ISO 8601 timestamp of when the skill was last updated.
60
+ #
61
+ # @return [String]
62
+ required :updated_at, String
63
+
64
+ # @!method initialize(id:, created_at:, display_title:, latest_version:, source:, type:, updated_at:)
65
+ # Some parameter documentations has been truncated, see
66
+ # {Anthropic::Models::Beta::SkillCreateResponse} for more details.
67
+ #
68
+ # @param id [String] Unique identifier for the skill.
69
+ #
70
+ # @param created_at [String] ISO 8601 timestamp of when the skill was created.
71
+ #
72
+ # @param display_title [String, nil] Display title for the skill.
73
+ #
74
+ # @param latest_version [String, nil] The latest version identifier for the skill.
75
+ #
76
+ # @param source [String] Source of the skill.
77
+ #
78
+ # @param type [String] Object type.
79
+ #
80
+ # @param updated_at [String] ISO 8601 timestamp of when the skill was last updated.
81
+ end
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ # @see Anthropic::Resources::Beta::Skills#delete
7
+ class SkillDeleteParams < Anthropic::Internal::Type::BaseModel
8
+ extend Anthropic::Internal::Type::RequestParameters::Converter
9
+ include Anthropic::Internal::Type::RequestParameters
10
+
11
+ # @!attribute betas
12
+ # Optional header to specify the beta version(s) you want to use.
13
+ #
14
+ # @return [Array<String, Symbol, Anthropic::Models::AnthropicBeta>, nil]
15
+ optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }
16
+
17
+ # @!method initialize(betas: nil, request_options: {})
18
+ # @param betas [Array<String, Symbol, Anthropic::Models::AnthropicBeta>] Optional header to specify the beta version(s) you want to use.
19
+ #
20
+ # @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}]
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ # @see Anthropic::Resources::Beta::Skills#delete
7
+ class SkillDeleteResponse < Anthropic::Internal::Type::BaseModel
8
+ # @!attribute id
9
+ # Unique identifier for the skill.
10
+ #
11
+ # The format and length of IDs may change over time.
12
+ #
13
+ # @return [String]
14
+ required :id, String
15
+
16
+ # @!attribute type
17
+ # Deleted object type.
18
+ #
19
+ # For Skills, this is always `"skill_deleted"`.
20
+ #
21
+ # @return [String]
22
+ required :type, String
23
+
24
+ # @!method initialize(id:, type:)
25
+ # Some parameter documentations has been truncated, see
26
+ # {Anthropic::Models::Beta::SkillDeleteResponse} for more details.
27
+ #
28
+ # @param id [String] Unique identifier for the skill.
29
+ #
30
+ # @param type [String] Deleted object type.
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ # @see Anthropic::Resources::Beta::Skills#list
7
+ class SkillListParams < Anthropic::Internal::Type::BaseModel
8
+ extend Anthropic::Internal::Type::RequestParameters::Converter
9
+ include Anthropic::Internal::Type::RequestParameters
10
+
11
+ # @!attribute limit
12
+ # Number of results to return per page.
13
+ #
14
+ # Maximum value is 100. Defaults to 20.
15
+ #
16
+ # @return [Integer, nil]
17
+ optional :limit, Integer
18
+
19
+ # @!attribute page
20
+ # Pagination token for fetching a specific page of results.
21
+ #
22
+ # Pass the value from a previous response's `next_page` field to get the next page
23
+ # of results.
24
+ #
25
+ # @return [String, nil]
26
+ optional :page, String, nil?: true
27
+
28
+ # @!attribute source
29
+ # Filter skills by source.
30
+ #
31
+ # If provided, only skills from the specified source will be returned:
32
+ #
33
+ # - `"custom"`: only return user-created skills
34
+ # - `"anthropic"`: only return Anthropic-created skills
35
+ #
36
+ # @return [String, nil]
37
+ optional :source, String, nil?: true
38
+
39
+ # @!attribute betas
40
+ # Optional header to specify the beta version(s) you want to use.
41
+ #
42
+ # @return [Array<String, Symbol, Anthropic::Models::AnthropicBeta>, nil]
43
+ optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }
44
+
45
+ # @!method initialize(limit: nil, page: nil, source: nil, betas: nil, request_options: {})
46
+ # Some parameter documentations has been truncated, see
47
+ # {Anthropic::Models::Beta::SkillListParams} for more details.
48
+ #
49
+ # @param limit [Integer] Number of results to return per page.
50
+ #
51
+ # @param page [String, nil] Pagination token for fetching a specific page of results.
52
+ #
53
+ # @param source [String, nil] Filter skills by source.
54
+ #
55
+ # @param betas [Array<String, Symbol, Anthropic::Models::AnthropicBeta>] Optional header to specify the beta version(s) you want to use.
56
+ #
57
+ # @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}]
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,84 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ # @see Anthropic::Resources::Beta::Skills#list
7
+ class SkillListResponse < Anthropic::Internal::Type::BaseModel
8
+ # @!attribute id
9
+ # Unique identifier for the skill.
10
+ #
11
+ # The format and length of IDs may change over time.
12
+ #
13
+ # @return [String]
14
+ required :id, String
15
+
16
+ # @!attribute created_at
17
+ # ISO 8601 timestamp of when the skill was created.
18
+ #
19
+ # @return [String]
20
+ required :created_at, String
21
+
22
+ # @!attribute display_title
23
+ # Display title for the skill.
24
+ #
25
+ # This is a human-readable label that is not included in the prompt sent to the
26
+ # model.
27
+ #
28
+ # @return [String, nil]
29
+ required :display_title, String, nil?: true
30
+
31
+ # @!attribute latest_version
32
+ # The latest version identifier for the skill.
33
+ #
34
+ # This represents the most recent version of the skill that has been created.
35
+ #
36
+ # @return [String, nil]
37
+ required :latest_version, String, nil?: true
38
+
39
+ # @!attribute source
40
+ # Source of the skill.
41
+ #
42
+ # This may be one of the following values:
43
+ #
44
+ # - `"custom"`: the skill was created by a user
45
+ # - `"anthropic"`: the skill was created by Anthropic
46
+ #
47
+ # @return [String]
48
+ required :source, String
49
+
50
+ # @!attribute type
51
+ # Object type.
52
+ #
53
+ # For Skills, this is always `"skill"`.
54
+ #
55
+ # @return [String]
56
+ required :type, String
57
+
58
+ # @!attribute updated_at
59
+ # ISO 8601 timestamp of when the skill was last updated.
60
+ #
61
+ # @return [String]
62
+ required :updated_at, String
63
+
64
+ # @!method initialize(id:, created_at:, display_title:, latest_version:, source:, type:, updated_at:)
65
+ # Some parameter documentations has been truncated, see
66
+ # {Anthropic::Models::Beta::SkillListResponse} for more details.
67
+ #
68
+ # @param id [String] Unique identifier for the skill.
69
+ #
70
+ # @param created_at [String] ISO 8601 timestamp of when the skill was created.
71
+ #
72
+ # @param display_title [String, nil] Display title for the skill.
73
+ #
74
+ # @param latest_version [String, nil] The latest version identifier for the skill.
75
+ #
76
+ # @param source [String] Source of the skill.
77
+ #
78
+ # @param type [String] Object type.
79
+ #
80
+ # @param updated_at [String] ISO 8601 timestamp of when the skill was last updated.
81
+ end
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ # @see Anthropic::Resources::Beta::Skills#retrieve
7
+ class SkillRetrieveParams < Anthropic::Internal::Type::BaseModel
8
+ extend Anthropic::Internal::Type::RequestParameters::Converter
9
+ include Anthropic::Internal::Type::RequestParameters
10
+
11
+ # @!attribute betas
12
+ # Optional header to specify the beta version(s) you want to use.
13
+ #
14
+ # @return [Array<String, Symbol, Anthropic::Models::AnthropicBeta>, nil]
15
+ optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }
16
+
17
+ # @!method initialize(betas: nil, request_options: {})
18
+ # @param betas [Array<String, Symbol, Anthropic::Models::AnthropicBeta>] Optional header to specify the beta version(s) you want to use.
19
+ #
20
+ # @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}]
21
+ end
22
+ end
23
+ end
24
+ end