anthropic 1.18.1 → 1.19.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/lib/anthropic/models/anthropic_beta.rb +3 -0
- data/lib/anthropic/models/beta/beta_usage.rb +22 -1
- data/lib/anthropic/models/beta/message_count_tokens_params.rb +22 -1
- data/lib/anthropic/models/beta/message_create_params.rb +22 -1
- data/lib/anthropic/models/beta/messages/batch_create_params.rb +26 -1
- data/lib/anthropic/resources/beta/messages.rb +9 -3
- data/lib/anthropic/version.rb +1 -1
- data/rbi/anthropic/models/anthropic_beta.rbi +2 -0
- data/rbi/anthropic/models/beta/beta_usage.rbi +36 -3
- data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +55 -0
- data/rbi/anthropic/models/beta/message_create_params.rbi +51 -0
- data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +58 -0
- data/rbi/anthropic/resources/beta/messages.rbi +17 -0
- data/sig/anthropic/models/anthropic_beta.rbs +2 -0
- data/sig/anthropic/models/beta/beta_usage.rbs +19 -3
- data/sig/anthropic/models/beta/message_count_tokens_params.rbs +16 -0
- data/sig/anthropic/models/beta/message_create_params.rbs +16 -0
- data/sig/anthropic/models/beta/messages/batch_create_params.rbs +16 -0
- data/sig/anthropic/resources/beta/messages.rbs +3 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8d358b56bdf131ba8881da469e4f43252dacc64f199da513b9af6642e5adaba3
|
|
4
|
+
data.tar.gz: 2743c7a1fea4c86ddecadf74b44ba0ca4a795bdb65e6af29ba57ef475e10e076
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 259cb9cd328c0f156212c05328439281ccceb75a7993d9832c82d8890e066146b94c8f77b1b43eacb239b54371e8f6443cc25fe28999e3a86008ebb557bb0a84
|
|
7
|
+
data.tar.gz: 8e290e95b2156263dbb4613c88a6b83dd3f33e03843f4a2b8e315553a5cd1ccb93d20e1562ee0454a523823c26ccd901a05462893765547119b9c588fd398071
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.19.0 (2026-02-07)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.18.1...v1.19.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.18.1...v1.19.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** enabling fast-mode in claude-opus-4-6 ([c86a64f](https://github.com/anthropics/anthropic-sdk-ruby/commit/c86a64f3125256dcb0acf68512654803f2505b52))
|
|
10
|
+
|
|
3
11
|
## 1.18.1 (2026-02-07)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v1.18.0...v1.18.1](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.18.0...v1.18.1)
|
data/README.md
CHANGED
|
@@ -45,6 +45,8 @@ module Anthropic
|
|
|
45
45
|
|
|
46
46
|
variant const: -> { Anthropic::Models::AnthropicBeta::SKILLS_2025_10_02 }
|
|
47
47
|
|
|
48
|
+
variant const: -> { Anthropic::Models::AnthropicBeta::FAST_MODE_2026_02_01 }
|
|
49
|
+
|
|
48
50
|
# @!method self.variants
|
|
49
51
|
# @return [Array(String, Symbol)]
|
|
50
52
|
|
|
@@ -73,6 +75,7 @@ module Anthropic
|
|
|
73
75
|
CONTEXT_MANAGEMENT_2025_06_27 = :"context-management-2025-06-27"
|
|
74
76
|
MODEL_CONTEXT_WINDOW_EXCEEDED_2025_08_26 = :"model-context-window-exceeded-2025-08-26"
|
|
75
77
|
SKILLS_2025_10_02 = :"skills-2025-10-02"
|
|
78
|
+
FAST_MODE_2026_02_01 = :"fast-mode-2026-02-01"
|
|
76
79
|
|
|
77
80
|
# @!endgroup
|
|
78
81
|
end
|
|
@@ -67,7 +67,13 @@ module Anthropic
|
|
|
67
67
|
# @return [Symbol, Anthropic::Models::Beta::BetaUsage::ServiceTier, nil]
|
|
68
68
|
required :service_tier, enum: -> { Anthropic::Beta::BetaUsage::ServiceTier }, nil?: true
|
|
69
69
|
|
|
70
|
-
# @!
|
|
70
|
+
# @!attribute speed
|
|
71
|
+
# The inference speed mode used for this request.
|
|
72
|
+
#
|
|
73
|
+
# @return [Symbol, Anthropic::Models::Beta::BetaUsage::Speed, nil]
|
|
74
|
+
required :speed, enum: -> { Anthropic::Beta::BetaUsage::Speed }, nil?: true
|
|
75
|
+
|
|
76
|
+
# @!method initialize(cache_creation:, cache_creation_input_tokens:, cache_read_input_tokens:, inference_geo:, input_tokens:, iterations:, output_tokens:, server_tool_use:, service_tier:, speed:)
|
|
71
77
|
# Some parameter documentations has been truncated, see
|
|
72
78
|
# {Anthropic::Models::Beta::BetaUsage} for more details.
|
|
73
79
|
#
|
|
@@ -88,6 +94,8 @@ module Anthropic
|
|
|
88
94
|
# @param server_tool_use [Anthropic::Models::Beta::BetaServerToolUsage, nil] The number of server tool requests.
|
|
89
95
|
#
|
|
90
96
|
# @param service_tier [Symbol, Anthropic::Models::Beta::BetaUsage::ServiceTier, nil] If the request used the priority, standard, or batch tier.
|
|
97
|
+
#
|
|
98
|
+
# @param speed [Symbol, Anthropic::Models::Beta::BetaUsage::Speed, nil] The inference speed mode used for this request.
|
|
91
99
|
|
|
92
100
|
# If the request used the priority, standard, or batch tier.
|
|
93
101
|
#
|
|
@@ -102,6 +110,19 @@ module Anthropic
|
|
|
102
110
|
# @!method self.values
|
|
103
111
|
# @return [Array<Symbol>]
|
|
104
112
|
end
|
|
113
|
+
|
|
114
|
+
# The inference speed mode used for this request.
|
|
115
|
+
#
|
|
116
|
+
# @see Anthropic::Models::Beta::BetaUsage#speed
|
|
117
|
+
module Speed
|
|
118
|
+
extend Anthropic::Internal::Type::Enum
|
|
119
|
+
|
|
120
|
+
STANDARD = :standard
|
|
121
|
+
FAST = :fast
|
|
122
|
+
|
|
123
|
+
# @!method self.values
|
|
124
|
+
# @return [Array<Symbol>]
|
|
125
|
+
end
|
|
105
126
|
end
|
|
106
127
|
end
|
|
107
128
|
|
|
@@ -120,6 +120,13 @@ module Anthropic
|
|
|
120
120
|
# @return [Anthropic::Models::Beta::BetaJSONOutputFormat, nil]
|
|
121
121
|
optional :output_format, -> { Anthropic::Beta::BetaJSONOutputFormat }, nil?: true
|
|
122
122
|
|
|
123
|
+
# @!attribute speed
|
|
124
|
+
# The inference speed mode for this request. `"fast"` enables high
|
|
125
|
+
# output-tokens-per-second inference.
|
|
126
|
+
#
|
|
127
|
+
# @return [Symbol, Anthropic::Models::Beta::MessageCountTokensParams::Speed, nil]
|
|
128
|
+
optional :speed, enum: -> { Anthropic::Beta::MessageCountTokensParams::Speed }, nil?: true
|
|
129
|
+
|
|
123
130
|
# @!attribute system_
|
|
124
131
|
# System prompt.
|
|
125
132
|
#
|
|
@@ -238,7 +245,7 @@ module Anthropic
|
|
|
238
245
|
# @return [Array<String, Symbol, Anthropic::Models::AnthropicBeta>, nil]
|
|
239
246
|
optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }
|
|
240
247
|
|
|
241
|
-
# @!method initialize(messages:, model:, context_management: nil, mcp_servers: nil, output_config: nil, output_format: nil, system_: nil, thinking: nil, tool_choice: nil, tools: nil, betas: nil, request_options: {})
|
|
248
|
+
# @!method initialize(messages:, model:, context_management: nil, mcp_servers: nil, output_config: nil, output_format: nil, speed: nil, system_: nil, thinking: nil, tool_choice: nil, tools: nil, betas: nil, request_options: {})
|
|
242
249
|
# Some parameter documentations has been truncated, see
|
|
243
250
|
# {Anthropic::Models::Beta::MessageCountTokensParams} for more details.
|
|
244
251
|
#
|
|
@@ -254,6 +261,8 @@ module Anthropic
|
|
|
254
261
|
#
|
|
255
262
|
# @param output_format [Anthropic::Models::Beta::BetaJSONOutputFormat, nil] Deprecated: Use `output_config.format` instead. See [structured outputs](https:/
|
|
256
263
|
#
|
|
264
|
+
# @param speed [Symbol, Anthropic::Models::Beta::MessageCountTokensParams::Speed, nil] The inference speed mode for this request. `"fast"` enables high output-tokens-p
|
|
265
|
+
#
|
|
257
266
|
# @param system_ [String, Array<Anthropic::Models::Beta::BetaTextBlockParam>] System prompt.
|
|
258
267
|
#
|
|
259
268
|
# @param thinking [Anthropic::Models::Beta::BetaThinkingConfigEnabled, Anthropic::Models::Beta::BetaThinkingConfigDisabled, Anthropic::Models::Beta::BetaThinkingConfigAdaptive] Configuration for enabling Claude's extended thinking.
|
|
@@ -266,6 +275,18 @@ module Anthropic
|
|
|
266
275
|
#
|
|
267
276
|
# @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}]
|
|
268
277
|
|
|
278
|
+
# The inference speed mode for this request. `"fast"` enables high
|
|
279
|
+
# output-tokens-per-second inference.
|
|
280
|
+
module Speed
|
|
281
|
+
extend Anthropic::Internal::Type::Enum
|
|
282
|
+
|
|
283
|
+
STANDARD = :standard
|
|
284
|
+
FAST = :fast
|
|
285
|
+
|
|
286
|
+
# @!method self.values
|
|
287
|
+
# @return [Array<Symbol>]
|
|
288
|
+
end
|
|
289
|
+
|
|
269
290
|
# System prompt.
|
|
270
291
|
#
|
|
271
292
|
# A system prompt is a way of providing context and instructions to Claude, such
|
|
@@ -163,6 +163,13 @@ module Anthropic
|
|
|
163
163
|
# @return [Symbol, Anthropic::Models::Beta::MessageCreateParams::ServiceTier, nil]
|
|
164
164
|
optional :service_tier, enum: -> { Anthropic::Beta::MessageCreateParams::ServiceTier }
|
|
165
165
|
|
|
166
|
+
# @!attribute speed
|
|
167
|
+
# The inference speed mode for this request. `"fast"` enables high
|
|
168
|
+
# output-tokens-per-second inference.
|
|
169
|
+
#
|
|
170
|
+
# @return [Symbol, Anthropic::Models::Beta::MessageCreateParams::Speed, nil]
|
|
171
|
+
optional :speed, enum: -> { Anthropic::Beta::MessageCreateParams::Speed }, nil?: true
|
|
172
|
+
|
|
166
173
|
# @!attribute stop_sequences
|
|
167
174
|
# Custom text sequences that will cause the model to stop generating.
|
|
168
175
|
#
|
|
@@ -333,7 +340,7 @@ module Anthropic
|
|
|
333
340
|
# @return [Array<String, Symbol, Anthropic::Models::AnthropicBeta>, nil]
|
|
334
341
|
optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }
|
|
335
342
|
|
|
336
|
-
# @!method initialize(max_tokens:, messages:, model:, container: nil, context_management: nil, inference_geo: nil, mcp_servers: nil, metadata: nil, output_config: nil, output_format: nil, service_tier: nil, stop_sequences: nil, system_: nil, temperature: nil, thinking: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil, betas: nil, request_options: {})
|
|
343
|
+
# @!method initialize(max_tokens:, messages:, model:, container: nil, context_management: nil, inference_geo: nil, mcp_servers: nil, metadata: nil, output_config: nil, output_format: nil, service_tier: nil, speed: nil, stop_sequences: nil, system_: nil, temperature: nil, thinking: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil, betas: nil, request_options: {})
|
|
337
344
|
# Some parameter documentations has been truncated, see
|
|
338
345
|
# {Anthropic::Models::Beta::MessageCreateParams} for more details.
|
|
339
346
|
#
|
|
@@ -359,6 +366,8 @@ module Anthropic
|
|
|
359
366
|
#
|
|
360
367
|
# @param service_tier [Symbol, Anthropic::Models::Beta::MessageCreateParams::ServiceTier] Determines whether to use priority capacity (if available) or standard capacity
|
|
361
368
|
#
|
|
369
|
+
# @param speed [Symbol, Anthropic::Models::Beta::MessageCreateParams::Speed, nil] The inference speed mode for this request. `"fast"` enables high output-tokens-p
|
|
370
|
+
#
|
|
362
371
|
# @param stop_sequences [Array<String>] Custom text sequences that will cause the model to stop generating.
|
|
363
372
|
#
|
|
364
373
|
# @param system_ [String, Array<Anthropic::Models::Beta::BetaTextBlockParam>] System prompt.
|
|
@@ -407,6 +416,18 @@ module Anthropic
|
|
|
407
416
|
# @return [Array<Symbol>]
|
|
408
417
|
end
|
|
409
418
|
|
|
419
|
+
# The inference speed mode for this request. `"fast"` enables high
|
|
420
|
+
# output-tokens-per-second inference.
|
|
421
|
+
module Speed
|
|
422
|
+
extend Anthropic::Internal::Type::Enum
|
|
423
|
+
|
|
424
|
+
STANDARD = :standard
|
|
425
|
+
FAST = :fast
|
|
426
|
+
|
|
427
|
+
# @!method self.values
|
|
428
|
+
# @return [Array<Symbol>]
|
|
429
|
+
end
|
|
430
|
+
|
|
410
431
|
# System prompt.
|
|
411
432
|
#
|
|
412
433
|
# A system prompt is a way of providing context and instructions to Claude, such
|
|
@@ -219,6 +219,15 @@ module Anthropic
|
|
|
219
219
|
optional :service_tier,
|
|
220
220
|
enum: -> { Anthropic::Beta::Messages::BatchCreateParams::Request::Params::ServiceTier }
|
|
221
221
|
|
|
222
|
+
# @!attribute speed
|
|
223
|
+
# The inference speed mode for this request. `"fast"` enables high
|
|
224
|
+
# output-tokens-per-second inference.
|
|
225
|
+
#
|
|
226
|
+
# @return [Symbol, Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params::Speed, nil]
|
|
227
|
+
optional :speed,
|
|
228
|
+
enum: -> { Anthropic::Beta::Messages::BatchCreateParams::Request::Params::Speed },
|
|
229
|
+
nil?: true
|
|
230
|
+
|
|
222
231
|
# @!attribute stop_sequences
|
|
223
232
|
# Custom text sequences that will cause the model to stop generating.
|
|
224
233
|
#
|
|
@@ -393,7 +402,7 @@ module Anthropic
|
|
|
393
402
|
# @return [Float, nil]
|
|
394
403
|
optional :top_p, Float
|
|
395
404
|
|
|
396
|
-
# @!method initialize(max_tokens:, messages:, model:, container: nil, context_management: nil, inference_geo: nil, mcp_servers: nil, metadata: nil, output_config: nil, output_format: nil, service_tier: nil, stop_sequences: nil, stream: nil, system_: nil, temperature: nil, thinking: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil)
|
|
405
|
+
# @!method initialize(max_tokens:, messages:, model:, container: nil, context_management: nil, inference_geo: nil, mcp_servers: nil, metadata: nil, output_config: nil, output_format: nil, service_tier: nil, speed: nil, stop_sequences: nil, stream: nil, system_: nil, temperature: nil, thinking: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil)
|
|
397
406
|
# Some parameter documentations has been truncated, see
|
|
398
407
|
# {Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params} for more
|
|
399
408
|
# details.
|
|
@@ -425,6 +434,8 @@ module Anthropic
|
|
|
425
434
|
#
|
|
426
435
|
# @param service_tier [Symbol, Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params::ServiceTier] Determines whether to use priority capacity (if available) or standard capacity
|
|
427
436
|
#
|
|
437
|
+
# @param speed [Symbol, Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params::Speed, nil] The inference speed mode for this request. `"fast"` enables high output-tokens-p
|
|
438
|
+
#
|
|
428
439
|
# @param stop_sequences [Array<String>] Custom text sequences that will cause the model to stop generating.
|
|
429
440
|
#
|
|
430
441
|
# @param stream [Boolean] Whether to incrementally stream the response using server-sent events.
|
|
@@ -475,6 +486,20 @@ module Anthropic
|
|
|
475
486
|
# @return [Array<Symbol>]
|
|
476
487
|
end
|
|
477
488
|
|
|
489
|
+
# The inference speed mode for this request. `"fast"` enables high
|
|
490
|
+
# output-tokens-per-second inference.
|
|
491
|
+
#
|
|
492
|
+
# @see Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params#speed
|
|
493
|
+
module Speed
|
|
494
|
+
extend Anthropic::Internal::Type::Enum
|
|
495
|
+
|
|
496
|
+
STANDARD = :standard
|
|
497
|
+
FAST = :fast
|
|
498
|
+
|
|
499
|
+
# @!method self.values
|
|
500
|
+
# @return [Array<Symbol>]
|
|
501
|
+
end
|
|
502
|
+
|
|
478
503
|
# System prompt.
|
|
479
504
|
#
|
|
480
505
|
# A system prompt is a way of providing context and instructions to Claude, such
|
|
@@ -32,7 +32,7 @@ module Anthropic
|
|
|
32
32
|
# Learn more about the Messages API in our
|
|
33
33
|
# [user guide](https://docs.claude.com/en/docs/initial-setup)
|
|
34
34
|
#
|
|
35
|
-
# @overload create(max_tokens:, messages:, model:, container: nil, context_management: nil, inference_geo: nil, mcp_servers: nil, metadata: nil, output_config: nil, output_format: nil, service_tier: nil, stop_sequences: nil, system_: nil, temperature: nil, thinking: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil, betas: nil, request_options: {})
|
|
35
|
+
# @overload create(max_tokens:, messages:, model:, container: nil, context_management: nil, inference_geo: nil, mcp_servers: nil, metadata: nil, output_config: nil, output_format: nil, service_tier: nil, speed: nil, stop_sequences: nil, system_: nil, temperature: nil, thinking: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil, betas: nil, request_options: {})
|
|
36
36
|
#
|
|
37
37
|
# @param max_tokens [Integer] Body param: The maximum number of tokens to generate before stopping.
|
|
38
38
|
#
|
|
@@ -56,6 +56,8 @@ module Anthropic
|
|
|
56
56
|
#
|
|
57
57
|
# @param service_tier [Symbol, Anthropic::Models::Beta::MessageCreateParams::ServiceTier] Body param: Determines whether to use priority capacity (if available) or standa
|
|
58
58
|
#
|
|
59
|
+
# @param speed [Symbol, Anthropic::Models::Beta::MessageCreateParams::Speed, nil] Body param: The inference speed mode for this request. `"fast"` enables high out
|
|
60
|
+
#
|
|
59
61
|
# @param stop_sequences [Array<String>] Body param: Custom text sequences that will cause the model to stop generating.
|
|
60
62
|
#
|
|
61
63
|
# @param system_ [String, Array<Anthropic::Models::Beta::BetaTextBlockParam>] Body param: System prompt.
|
|
@@ -134,7 +136,7 @@ module Anthropic
|
|
|
134
136
|
# Learn more about the Messages API in our
|
|
135
137
|
# [user guide](https://docs.claude.com/en/docs/initial-setup)
|
|
136
138
|
#
|
|
137
|
-
# @overload stream_raw(max_tokens:, messages:, model:, container: nil, context_management: nil, inference_geo: nil, mcp_servers: nil, metadata: nil, output_config: nil, output_format: nil, service_tier: nil, stop_sequences: nil, system_: nil, temperature: nil, thinking: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil, betas: nil, request_options: {})
|
|
139
|
+
# @overload stream_raw(max_tokens:, messages:, model:, container: nil, context_management: nil, inference_geo: nil, mcp_servers: nil, metadata: nil, output_config: nil, output_format: nil, service_tier: nil, speed: nil, stop_sequences: nil, system_: nil, temperature: nil, thinking: nil, tool_choice: nil, tools: nil, top_k: nil, top_p: nil, betas: nil, request_options: {})
|
|
138
140
|
#
|
|
139
141
|
# @param max_tokens [Integer] Body param: The maximum number of tokens to generate before stopping.
|
|
140
142
|
#
|
|
@@ -158,6 +160,8 @@ module Anthropic
|
|
|
158
160
|
#
|
|
159
161
|
# @param service_tier [Symbol, Anthropic::Models::Beta::MessageCreateParams::ServiceTier] Body param: Determines whether to use priority capacity (if available) or standa
|
|
160
162
|
#
|
|
163
|
+
# @param speed [Symbol, Anthropic::Models::Beta::MessageCreateParams::Speed, nil] Body param: The inference speed mode for this request. `"fast"` enables high out
|
|
164
|
+
#
|
|
161
165
|
# @param stop_sequences [Array<String>] Body param: Custom text sequences that will cause the model to stop generating.
|
|
162
166
|
#
|
|
163
167
|
# @param system_ [String, Array<Anthropic::Models::Beta::BetaTextBlockParam>] Body param: System prompt.
|
|
@@ -303,7 +307,7 @@ module Anthropic
|
|
|
303
307
|
# Learn more about token counting in our
|
|
304
308
|
# [user guide](https://docs.claude.com/en/docs/build-with-claude/token-counting)
|
|
305
309
|
#
|
|
306
|
-
# @overload count_tokens(messages:, model:, context_management: nil, mcp_servers: nil, output_config: nil, output_format: nil, system_: nil, thinking: nil, tool_choice: nil, tools: nil, betas: nil, request_options: {})
|
|
310
|
+
# @overload count_tokens(messages:, model:, context_management: nil, mcp_servers: nil, output_config: nil, output_format: nil, speed: nil, system_: nil, thinking: nil, tool_choice: nil, tools: nil, betas: nil, request_options: {})
|
|
307
311
|
#
|
|
308
312
|
# @param messages [Array<Anthropic::Models::Beta::BetaMessageParam>] Body param: Input messages.
|
|
309
313
|
#
|
|
@@ -317,6 +321,8 @@ module Anthropic
|
|
|
317
321
|
#
|
|
318
322
|
# @param output_format [Anthropic::Models::Beta::BetaJSONOutputFormat, nil] Body param: Deprecated: Use `output_config.format` instead. See [structured outp
|
|
319
323
|
#
|
|
324
|
+
# @param speed [Symbol, Anthropic::Models::Beta::MessageCountTokensParams::Speed, nil] Body param: The inference speed mode for this request. `"fast"` enables high out
|
|
325
|
+
#
|
|
320
326
|
# @param system_ [String, Array<Anthropic::Models::Beta::BetaTextBlockParam>] Body param: System prompt.
|
|
321
327
|
#
|
|
322
328
|
# @param thinking [Anthropic::Models::Beta::BetaThinkingConfigEnabled, Anthropic::Models::Beta::BetaThinkingConfigDisabled, Anthropic::Models::Beta::BetaThinkingConfigAdaptive] Body param: Configuration for enabling Claude's extended thinking.
|
data/lib/anthropic/version.rb
CHANGED
|
@@ -80,6 +80,12 @@ module Anthropic
|
|
|
80
80
|
end
|
|
81
81
|
attr_accessor :service_tier
|
|
82
82
|
|
|
83
|
+
# The inference speed mode used for this request.
|
|
84
|
+
sig do
|
|
85
|
+
returns(T.nilable(Anthropic::Beta::BetaUsage::Speed::TaggedSymbol))
|
|
86
|
+
end
|
|
87
|
+
attr_accessor :speed
|
|
88
|
+
|
|
83
89
|
sig do
|
|
84
90
|
params(
|
|
85
91
|
cache_creation:
|
|
@@ -101,7 +107,8 @@ module Anthropic
|
|
|
101
107
|
server_tool_use:
|
|
102
108
|
T.nilable(Anthropic::Beta::BetaServerToolUsage::OrHash),
|
|
103
109
|
service_tier:
|
|
104
|
-
T.nilable(Anthropic::Beta::BetaUsage::ServiceTier::OrSymbol)
|
|
110
|
+
T.nilable(Anthropic::Beta::BetaUsage::ServiceTier::OrSymbol),
|
|
111
|
+
speed: T.nilable(Anthropic::Beta::BetaUsage::Speed::OrSymbol)
|
|
105
112
|
).returns(T.attached_class)
|
|
106
113
|
end
|
|
107
114
|
def self.new(
|
|
@@ -129,7 +136,9 @@ module Anthropic
|
|
|
129
136
|
# The number of server tool requests.
|
|
130
137
|
server_tool_use:,
|
|
131
138
|
# If the request used the priority, standard, or batch tier.
|
|
132
|
-
service_tier
|
|
139
|
+
service_tier:,
|
|
140
|
+
# The inference speed mode used for this request.
|
|
141
|
+
speed:
|
|
133
142
|
)
|
|
134
143
|
end
|
|
135
144
|
|
|
@@ -148,7 +157,10 @@ module Anthropic
|
|
|
148
157
|
output_tokens: Integer,
|
|
149
158
|
server_tool_use: T.nilable(Anthropic::Beta::BetaServerToolUsage),
|
|
150
159
|
service_tier:
|
|
151
|
-
T.nilable(
|
|
160
|
+
T.nilable(
|
|
161
|
+
Anthropic::Beta::BetaUsage::ServiceTier::TaggedSymbol
|
|
162
|
+
),
|
|
163
|
+
speed: T.nilable(Anthropic::Beta::BetaUsage::Speed::TaggedSymbol)
|
|
152
164
|
}
|
|
153
165
|
)
|
|
154
166
|
end
|
|
@@ -186,6 +198,27 @@ module Anthropic
|
|
|
186
198
|
def self.values
|
|
187
199
|
end
|
|
188
200
|
end
|
|
201
|
+
|
|
202
|
+
# The inference speed mode used for this request.
|
|
203
|
+
module Speed
|
|
204
|
+
extend Anthropic::Internal::Type::Enum
|
|
205
|
+
|
|
206
|
+
TaggedSymbol =
|
|
207
|
+
T.type_alias { T.all(Symbol, Anthropic::Beta::BetaUsage::Speed) }
|
|
208
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
209
|
+
|
|
210
|
+
STANDARD =
|
|
211
|
+
T.let(:standard, Anthropic::Beta::BetaUsage::Speed::TaggedSymbol)
|
|
212
|
+
FAST = T.let(:fast, Anthropic::Beta::BetaUsage::Speed::TaggedSymbol)
|
|
213
|
+
|
|
214
|
+
sig do
|
|
215
|
+
override.returns(
|
|
216
|
+
T::Array[Anthropic::Beta::BetaUsage::Speed::TaggedSymbol]
|
|
217
|
+
)
|
|
218
|
+
end
|
|
219
|
+
def self.values
|
|
220
|
+
end
|
|
221
|
+
end
|
|
189
222
|
end
|
|
190
223
|
end
|
|
191
224
|
end
|
|
@@ -149,6 +149,17 @@ module Anthropic
|
|
|
149
149
|
end
|
|
150
150
|
attr_writer :output_format
|
|
151
151
|
|
|
152
|
+
# The inference speed mode for this request. `"fast"` enables high
|
|
153
|
+
# output-tokens-per-second inference.
|
|
154
|
+
sig do
|
|
155
|
+
returns(
|
|
156
|
+
T.nilable(
|
|
157
|
+
Anthropic::Beta::MessageCountTokensParams::Speed::OrSymbol
|
|
158
|
+
)
|
|
159
|
+
)
|
|
160
|
+
end
|
|
161
|
+
attr_accessor :speed
|
|
162
|
+
|
|
152
163
|
# System prompt.
|
|
153
164
|
#
|
|
154
165
|
# A system prompt is a way of providing context and instructions to Claude, such
|
|
@@ -397,6 +408,10 @@ module Anthropic
|
|
|
397
408
|
output_config: Anthropic::Beta::BetaOutputConfig::OrHash,
|
|
398
409
|
output_format:
|
|
399
410
|
T.nilable(Anthropic::Beta::BetaJSONOutputFormat::OrHash),
|
|
411
|
+
speed:
|
|
412
|
+
T.nilable(
|
|
413
|
+
Anthropic::Beta::MessageCountTokensParams::Speed::OrSymbol
|
|
414
|
+
),
|
|
400
415
|
system_:
|
|
401
416
|
Anthropic::Beta::MessageCountTokensParams::System::Variants,
|
|
402
417
|
thinking:
|
|
@@ -525,6 +540,9 @@ module Anthropic
|
|
|
525
540
|
# A schema to specify Claude's output format in responses. This parameter will be
|
|
526
541
|
# removed in a future release.
|
|
527
542
|
output_format: nil,
|
|
543
|
+
# The inference speed mode for this request. `"fast"` enables high
|
|
544
|
+
# output-tokens-per-second inference.
|
|
545
|
+
speed: nil,
|
|
528
546
|
# System prompt.
|
|
529
547
|
#
|
|
530
548
|
# A system prompt is a way of providing context and instructions to Claude, such
|
|
@@ -637,6 +655,10 @@ module Anthropic
|
|
|
637
655
|
T::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition],
|
|
638
656
|
output_config: Anthropic::Beta::BetaOutputConfig,
|
|
639
657
|
output_format: T.nilable(Anthropic::Beta::BetaJSONOutputFormat),
|
|
658
|
+
speed:
|
|
659
|
+
T.nilable(
|
|
660
|
+
Anthropic::Beta::MessageCountTokensParams::Speed::OrSymbol
|
|
661
|
+
),
|
|
640
662
|
system_:
|
|
641
663
|
Anthropic::Beta::MessageCountTokensParams::System::Variants,
|
|
642
664
|
thinking:
|
|
@@ -684,6 +706,39 @@ module Anthropic
|
|
|
684
706
|
def to_hash
|
|
685
707
|
end
|
|
686
708
|
|
|
709
|
+
# The inference speed mode for this request. `"fast"` enables high
|
|
710
|
+
# output-tokens-per-second inference.
|
|
711
|
+
module Speed
|
|
712
|
+
extend Anthropic::Internal::Type::Enum
|
|
713
|
+
|
|
714
|
+
TaggedSymbol =
|
|
715
|
+
T.type_alias do
|
|
716
|
+
T.all(Symbol, Anthropic::Beta::MessageCountTokensParams::Speed)
|
|
717
|
+
end
|
|
718
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
719
|
+
|
|
720
|
+
STANDARD =
|
|
721
|
+
T.let(
|
|
722
|
+
:standard,
|
|
723
|
+
Anthropic::Beta::MessageCountTokensParams::Speed::TaggedSymbol
|
|
724
|
+
)
|
|
725
|
+
FAST =
|
|
726
|
+
T.let(
|
|
727
|
+
:fast,
|
|
728
|
+
Anthropic::Beta::MessageCountTokensParams::Speed::TaggedSymbol
|
|
729
|
+
)
|
|
730
|
+
|
|
731
|
+
sig do
|
|
732
|
+
override.returns(
|
|
733
|
+
T::Array[
|
|
734
|
+
Anthropic::Beta::MessageCountTokensParams::Speed::TaggedSymbol
|
|
735
|
+
]
|
|
736
|
+
)
|
|
737
|
+
end
|
|
738
|
+
def self.values
|
|
739
|
+
end
|
|
740
|
+
end
|
|
741
|
+
|
|
687
742
|
# System prompt.
|
|
688
743
|
#
|
|
689
744
|
# A system prompt is a way of providing context and instructions to Claude, such
|
|
@@ -201,6 +201,15 @@ module Anthropic
|
|
|
201
201
|
end
|
|
202
202
|
attr_writer :service_tier
|
|
203
203
|
|
|
204
|
+
# The inference speed mode for this request. `"fast"` enables high
|
|
205
|
+
# output-tokens-per-second inference.
|
|
206
|
+
sig do
|
|
207
|
+
returns(
|
|
208
|
+
T.nilable(Anthropic::Beta::MessageCreateParams::Speed::OrSymbol)
|
|
209
|
+
)
|
|
210
|
+
end
|
|
211
|
+
attr_accessor :speed
|
|
212
|
+
|
|
204
213
|
# Custom text sequences that will cause the model to stop generating.
|
|
205
214
|
#
|
|
206
215
|
# Our models will normally stop when they have naturally completed their turn,
|
|
@@ -513,6 +522,8 @@ module Anthropic
|
|
|
513
522
|
T.nilable(Anthropic::Beta::BetaJSONOutputFormat::OrHash),
|
|
514
523
|
service_tier:
|
|
515
524
|
Anthropic::Beta::MessageCreateParams::ServiceTier::OrSymbol,
|
|
525
|
+
speed:
|
|
526
|
+
T.nilable(Anthropic::Beta::MessageCreateParams::Speed::OrSymbol),
|
|
516
527
|
stop_sequences: T::Array[String],
|
|
517
528
|
system_: Anthropic::Beta::MessageCreateParams::System::Variants,
|
|
518
529
|
temperature: Float,
|
|
@@ -665,6 +676,9 @@ module Anthropic
|
|
|
665
676
|
# Anthropic offers different levels of service for your API requests. See
|
|
666
677
|
# [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
|
|
667
678
|
service_tier: nil,
|
|
679
|
+
# The inference speed mode for this request. `"fast"` enables high
|
|
680
|
+
# output-tokens-per-second inference.
|
|
681
|
+
speed: nil,
|
|
668
682
|
# Custom text sequences that will cause the model to stop generating.
|
|
669
683
|
#
|
|
670
684
|
# Our models will normally stop when they have naturally completed their turn,
|
|
@@ -821,6 +835,10 @@ module Anthropic
|
|
|
821
835
|
output_format: T.nilable(Anthropic::Beta::BetaJSONOutputFormat),
|
|
822
836
|
service_tier:
|
|
823
837
|
Anthropic::Beta::MessageCreateParams::ServiceTier::OrSymbol,
|
|
838
|
+
speed:
|
|
839
|
+
T.nilable(
|
|
840
|
+
Anthropic::Beta::MessageCreateParams::Speed::OrSymbol
|
|
841
|
+
),
|
|
824
842
|
stop_sequences: T::Array[String],
|
|
825
843
|
system_: Anthropic::Beta::MessageCreateParams::System::Variants,
|
|
826
844
|
temperature: Float,
|
|
@@ -925,6 +943,39 @@ module Anthropic
|
|
|
925
943
|
end
|
|
926
944
|
end
|
|
927
945
|
|
|
946
|
+
# The inference speed mode for this request. `"fast"` enables high
|
|
947
|
+
# output-tokens-per-second inference.
|
|
948
|
+
module Speed
|
|
949
|
+
extend Anthropic::Internal::Type::Enum
|
|
950
|
+
|
|
951
|
+
TaggedSymbol =
|
|
952
|
+
T.type_alias do
|
|
953
|
+
T.all(Symbol, Anthropic::Beta::MessageCreateParams::Speed)
|
|
954
|
+
end
|
|
955
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
956
|
+
|
|
957
|
+
STANDARD =
|
|
958
|
+
T.let(
|
|
959
|
+
:standard,
|
|
960
|
+
Anthropic::Beta::MessageCreateParams::Speed::TaggedSymbol
|
|
961
|
+
)
|
|
962
|
+
FAST =
|
|
963
|
+
T.let(
|
|
964
|
+
:fast,
|
|
965
|
+
Anthropic::Beta::MessageCreateParams::Speed::TaggedSymbol
|
|
966
|
+
)
|
|
967
|
+
|
|
968
|
+
sig do
|
|
969
|
+
override.returns(
|
|
970
|
+
T::Array[
|
|
971
|
+
Anthropic::Beta::MessageCreateParams::Speed::TaggedSymbol
|
|
972
|
+
]
|
|
973
|
+
)
|
|
974
|
+
end
|
|
975
|
+
def self.values
|
|
976
|
+
end
|
|
977
|
+
end
|
|
978
|
+
|
|
928
979
|
# System prompt.
|
|
929
980
|
#
|
|
930
981
|
# A system prompt is a way of providing context and instructions to Claude, such
|
|
@@ -350,6 +350,17 @@ module Anthropic
|
|
|
350
350
|
end
|
|
351
351
|
attr_writer :service_tier
|
|
352
352
|
|
|
353
|
+
# The inference speed mode for this request. `"fast"` enables high
|
|
354
|
+
# output-tokens-per-second inference.
|
|
355
|
+
sig do
|
|
356
|
+
returns(
|
|
357
|
+
T.nilable(
|
|
358
|
+
Anthropic::Beta::Messages::BatchCreateParams::Request::Params::Speed::OrSymbol
|
|
359
|
+
)
|
|
360
|
+
)
|
|
361
|
+
end
|
|
362
|
+
attr_accessor :speed
|
|
363
|
+
|
|
353
364
|
# Custom text sequences that will cause the model to stop generating.
|
|
354
365
|
#
|
|
355
366
|
# Our models will normally stop when they have naturally completed their turn,
|
|
@@ -666,6 +677,10 @@ module Anthropic
|
|
|
666
677
|
T.nilable(Anthropic::Beta::BetaJSONOutputFormat::OrHash),
|
|
667
678
|
service_tier:
|
|
668
679
|
Anthropic::Beta::Messages::BatchCreateParams::Request::Params::ServiceTier::OrSymbol,
|
|
680
|
+
speed:
|
|
681
|
+
T.nilable(
|
|
682
|
+
Anthropic::Beta::Messages::BatchCreateParams::Request::Params::Speed::OrSymbol
|
|
683
|
+
),
|
|
669
684
|
stop_sequences: T::Array[String],
|
|
670
685
|
stream: T::Boolean,
|
|
671
686
|
system_:
|
|
@@ -818,6 +833,9 @@ module Anthropic
|
|
|
818
833
|
# Anthropic offers different levels of service for your API requests. See
|
|
819
834
|
# [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
|
|
820
835
|
service_tier: nil,
|
|
836
|
+
# The inference speed mode for this request. `"fast"` enables high
|
|
837
|
+
# output-tokens-per-second inference.
|
|
838
|
+
speed: nil,
|
|
821
839
|
# Custom text sequences that will cause the model to stop generating.
|
|
822
840
|
#
|
|
823
841
|
# Our models will normally stop when they have naturally completed their turn,
|
|
@@ -980,6 +998,10 @@ module Anthropic
|
|
|
980
998
|
T.nilable(Anthropic::Beta::BetaJSONOutputFormat),
|
|
981
999
|
service_tier:
|
|
982
1000
|
Anthropic::Beta::Messages::BatchCreateParams::Request::Params::ServiceTier::OrSymbol,
|
|
1001
|
+
speed:
|
|
1002
|
+
T.nilable(
|
|
1003
|
+
Anthropic::Beta::Messages::BatchCreateParams::Request::Params::Speed::OrSymbol
|
|
1004
|
+
),
|
|
983
1005
|
stop_sequences: T::Array[String],
|
|
984
1006
|
stream: T::Boolean,
|
|
985
1007
|
system_:
|
|
@@ -1088,6 +1110,42 @@ module Anthropic
|
|
|
1088
1110
|
end
|
|
1089
1111
|
end
|
|
1090
1112
|
|
|
1113
|
+
# The inference speed mode for this request. `"fast"` enables high
|
|
1114
|
+
# output-tokens-per-second inference.
|
|
1115
|
+
module Speed
|
|
1116
|
+
extend Anthropic::Internal::Type::Enum
|
|
1117
|
+
|
|
1118
|
+
TaggedSymbol =
|
|
1119
|
+
T.type_alias do
|
|
1120
|
+
T.all(
|
|
1121
|
+
Symbol,
|
|
1122
|
+
Anthropic::Beta::Messages::BatchCreateParams::Request::Params::Speed
|
|
1123
|
+
)
|
|
1124
|
+
end
|
|
1125
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1126
|
+
|
|
1127
|
+
STANDARD =
|
|
1128
|
+
T.let(
|
|
1129
|
+
:standard,
|
|
1130
|
+
Anthropic::Beta::Messages::BatchCreateParams::Request::Params::Speed::TaggedSymbol
|
|
1131
|
+
)
|
|
1132
|
+
FAST =
|
|
1133
|
+
T.let(
|
|
1134
|
+
:fast,
|
|
1135
|
+
Anthropic::Beta::Messages::BatchCreateParams::Request::Params::Speed::TaggedSymbol
|
|
1136
|
+
)
|
|
1137
|
+
|
|
1138
|
+
sig do
|
|
1139
|
+
override.returns(
|
|
1140
|
+
T::Array[
|
|
1141
|
+
Anthropic::Beta::Messages::BatchCreateParams::Request::Params::Speed::TaggedSymbol
|
|
1142
|
+
]
|
|
1143
|
+
)
|
|
1144
|
+
end
|
|
1145
|
+
def self.values
|
|
1146
|
+
end
|
|
1147
|
+
end
|
|
1148
|
+
|
|
1091
1149
|
# System prompt.
|
|
1092
1150
|
#
|
|
1093
1151
|
# A system prompt is a way of providing context and instructions to Claude, such
|
|
@@ -337,6 +337,8 @@ module Anthropic
|
|
|
337
337
|
T.nilable(Anthropic::Beta::BetaJSONOutputFormat::OrHash),
|
|
338
338
|
service_tier:
|
|
339
339
|
Anthropic::Beta::MessageCreateParams::ServiceTier::OrSymbol,
|
|
340
|
+
speed:
|
|
341
|
+
T.nilable(Anthropic::Beta::MessageCreateParams::Speed::OrSymbol),
|
|
340
342
|
stop_sequences: T::Array[String],
|
|
341
343
|
system_: Anthropic::Beta::MessageCreateParams::System::Variants,
|
|
342
344
|
temperature: Float,
|
|
@@ -491,6 +493,9 @@ module Anthropic
|
|
|
491
493
|
# Anthropic offers different levels of service for your API requests. See
|
|
492
494
|
# [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
|
|
493
495
|
service_tier: nil,
|
|
496
|
+
# Body param: The inference speed mode for this request. `"fast"` enables high
|
|
497
|
+
# output-tokens-per-second inference.
|
|
498
|
+
speed: nil,
|
|
494
499
|
# Body param: Custom text sequences that will cause the model to stop generating.
|
|
495
500
|
#
|
|
496
501
|
# Our models will normally stop when they have naturally completed their turn,
|
|
@@ -664,6 +669,8 @@ module Anthropic
|
|
|
664
669
|
T.nilable(Anthropic::Beta::BetaJSONOutputFormat::OrHash),
|
|
665
670
|
service_tier:
|
|
666
671
|
Anthropic::Beta::MessageCreateParams::ServiceTier::OrSymbol,
|
|
672
|
+
speed:
|
|
673
|
+
T.nilable(Anthropic::Beta::MessageCreateParams::Speed::OrSymbol),
|
|
667
674
|
stop_sequences: T::Array[String],
|
|
668
675
|
system_: Anthropic::Beta::MessageCreateParams::System::Variants,
|
|
669
676
|
temperature: Float,
|
|
@@ -822,6 +829,9 @@ module Anthropic
|
|
|
822
829
|
# Anthropic offers different levels of service for your API requests. See
|
|
823
830
|
# [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.
|
|
824
831
|
service_tier: nil,
|
|
832
|
+
# Body param: The inference speed mode for this request. `"fast"` enables high
|
|
833
|
+
# output-tokens-per-second inference.
|
|
834
|
+
speed: nil,
|
|
825
835
|
# Body param: Custom text sequences that will cause the model to stop generating.
|
|
826
836
|
#
|
|
827
837
|
# Our models will normally stop when they have naturally completed their turn,
|
|
@@ -983,6 +993,10 @@ module Anthropic
|
|
|
983
993
|
output_config: Anthropic::Beta::BetaOutputConfig::OrHash,
|
|
984
994
|
output_format:
|
|
985
995
|
T.nilable(Anthropic::Beta::BetaJSONOutputFormat::OrHash),
|
|
996
|
+
speed:
|
|
997
|
+
T.nilable(
|
|
998
|
+
Anthropic::Beta::MessageCountTokensParams::Speed::OrSymbol
|
|
999
|
+
),
|
|
986
1000
|
system_:
|
|
987
1001
|
Anthropic::Beta::MessageCountTokensParams::System::Variants,
|
|
988
1002
|
thinking:
|
|
@@ -1112,6 +1126,9 @@ module Anthropic
|
|
|
1112
1126
|
# A schema to specify Claude's output format in responses. This parameter will be
|
|
1113
1127
|
# removed in a future release.
|
|
1114
1128
|
output_format: nil,
|
|
1129
|
+
# Body param: The inference speed mode for this request. `"fast"` enables high
|
|
1130
|
+
# output-tokens-per-second inference.
|
|
1131
|
+
speed: nil,
|
|
1115
1132
|
# Body param: System prompt.
|
|
1116
1133
|
#
|
|
1117
1134
|
# A system prompt is a way of providing context and instructions to Claude, such
|
|
@@ -21,6 +21,7 @@ module Anthropic
|
|
|
21
21
|
| :"context-management-2025-06-27"
|
|
22
22
|
| :"model-context-window-exceeded-2025-08-26"
|
|
23
23
|
| :"skills-2025-10-02"
|
|
24
|
+
| :"fast-mode-2026-02-01"
|
|
24
25
|
|
|
25
26
|
module AnthropicBeta
|
|
26
27
|
extend Anthropic::Internal::Type::Union
|
|
@@ -46,6 +47,7 @@ module Anthropic
|
|
|
46
47
|
CONTEXT_MANAGEMENT_2025_06_27: :"context-management-2025-06-27"
|
|
47
48
|
MODEL_CONTEXT_WINDOW_EXCEEDED_2025_08_26: :"model-context-window-exceeded-2025-08-26"
|
|
48
49
|
SKILLS_2025_10_02: :"skills-2025-10-02"
|
|
50
|
+
FAST_MODE_2026_02_01: :"fast-mode-2026-02-01"
|
|
49
51
|
end
|
|
50
52
|
end
|
|
51
53
|
end
|
|
@@ -13,7 +13,8 @@ module Anthropic
|
|
|
13
13
|
iterations: Anthropic::Models::Beta::beta_iterations_usage?,
|
|
14
14
|
output_tokens: Integer,
|
|
15
15
|
server_tool_use: Anthropic::Beta::BetaServerToolUsage?,
|
|
16
|
-
service_tier: Anthropic::Models::Beta::BetaUsage::service_tier
|
|
16
|
+
service_tier: Anthropic::Models::Beta::BetaUsage::service_tier?,
|
|
17
|
+
speed: Anthropic::Models::Beta::BetaUsage::speed?
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
class BetaUsage < Anthropic::Internal::Type::BaseModel
|
|
@@ -35,6 +36,8 @@ module Anthropic
|
|
|
35
36
|
|
|
36
37
|
attr_accessor service_tier: Anthropic::Models::Beta::BetaUsage::service_tier?
|
|
37
38
|
|
|
39
|
+
attr_accessor speed: Anthropic::Models::Beta::BetaUsage::speed?
|
|
40
|
+
|
|
38
41
|
def initialize: (
|
|
39
42
|
cache_creation: Anthropic::Beta::BetaCacheCreation?,
|
|
40
43
|
cache_creation_input_tokens: Integer?,
|
|
@@ -44,7 +47,8 @@ module Anthropic
|
|
|
44
47
|
iterations: Anthropic::Models::Beta::beta_iterations_usage?,
|
|
45
48
|
output_tokens: Integer,
|
|
46
49
|
server_tool_use: Anthropic::Beta::BetaServerToolUsage?,
|
|
47
|
-
service_tier: Anthropic::Models::Beta::BetaUsage::service_tier
|
|
50
|
+
service_tier: Anthropic::Models::Beta::BetaUsage::service_tier?,
|
|
51
|
+
speed: Anthropic::Models::Beta::BetaUsage::speed?
|
|
48
52
|
) -> void
|
|
49
53
|
|
|
50
54
|
def to_hash: -> {
|
|
@@ -56,7 +60,8 @@ module Anthropic
|
|
|
56
60
|
iterations: Anthropic::Models::Beta::beta_iterations_usage?,
|
|
57
61
|
output_tokens: Integer,
|
|
58
62
|
server_tool_use: Anthropic::Beta::BetaServerToolUsage?,
|
|
59
|
-
service_tier: Anthropic::Models::Beta::BetaUsage::service_tier
|
|
63
|
+
service_tier: Anthropic::Models::Beta::BetaUsage::service_tier?,
|
|
64
|
+
speed: Anthropic::Models::Beta::BetaUsage::speed?
|
|
60
65
|
}
|
|
61
66
|
|
|
62
67
|
type service_tier = :standard | :priority | :batch
|
|
@@ -70,6 +75,17 @@ module Anthropic
|
|
|
70
75
|
|
|
71
76
|
def self?.values: -> ::Array[Anthropic::Models::Beta::BetaUsage::service_tier]
|
|
72
77
|
end
|
|
78
|
+
|
|
79
|
+
type speed = :standard | :fast
|
|
80
|
+
|
|
81
|
+
module Speed
|
|
82
|
+
extend Anthropic::Internal::Type::Enum
|
|
83
|
+
|
|
84
|
+
STANDARD: :standard
|
|
85
|
+
FAST: :fast
|
|
86
|
+
|
|
87
|
+
def self?.values: -> ::Array[Anthropic::Models::Beta::BetaUsage::speed]
|
|
88
|
+
end
|
|
73
89
|
end
|
|
74
90
|
end
|
|
75
91
|
end
|
|
@@ -9,6 +9,7 @@ module Anthropic
|
|
|
9
9
|
mcp_servers: ::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition],
|
|
10
10
|
output_config: Anthropic::Beta::BetaOutputConfig,
|
|
11
11
|
output_format: Anthropic::Beta::BetaJSONOutputFormat?,
|
|
12
|
+
speed: Anthropic::Models::Beta::MessageCountTokensParams::speed?,
|
|
12
13
|
system_: Anthropic::Models::Beta::MessageCountTokensParams::system_,
|
|
13
14
|
thinking: Anthropic::Models::Beta::beta_thinking_config_param,
|
|
14
15
|
tool_choice: Anthropic::Models::Beta::beta_tool_choice,
|
|
@@ -41,6 +42,8 @@ module Anthropic
|
|
|
41
42
|
|
|
42
43
|
attr_accessor output_format: Anthropic::Beta::BetaJSONOutputFormat?
|
|
43
44
|
|
|
45
|
+
attr_accessor speed: Anthropic::Models::Beta::MessageCountTokensParams::speed?
|
|
46
|
+
|
|
44
47
|
attr_reader system_: Anthropic::Models::Beta::MessageCountTokensParams::system_?
|
|
45
48
|
|
|
46
49
|
def system_=: (
|
|
@@ -78,6 +81,7 @@ module Anthropic
|
|
|
78
81
|
?mcp_servers: ::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition],
|
|
79
82
|
?output_config: Anthropic::Beta::BetaOutputConfig,
|
|
80
83
|
?output_format: Anthropic::Beta::BetaJSONOutputFormat?,
|
|
84
|
+
?speed: Anthropic::Models::Beta::MessageCountTokensParams::speed?,
|
|
81
85
|
?system_: Anthropic::Models::Beta::MessageCountTokensParams::system_,
|
|
82
86
|
?thinking: Anthropic::Models::Beta::beta_thinking_config_param,
|
|
83
87
|
?tool_choice: Anthropic::Models::Beta::beta_tool_choice,
|
|
@@ -93,6 +97,7 @@ module Anthropic
|
|
|
93
97
|
mcp_servers: ::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition],
|
|
94
98
|
output_config: Anthropic::Beta::BetaOutputConfig,
|
|
95
99
|
output_format: Anthropic::Beta::BetaJSONOutputFormat?,
|
|
100
|
+
speed: Anthropic::Models::Beta::MessageCountTokensParams::speed?,
|
|
96
101
|
system_: Anthropic::Models::Beta::MessageCountTokensParams::system_,
|
|
97
102
|
thinking: Anthropic::Models::Beta::beta_thinking_config_param,
|
|
98
103
|
tool_choice: Anthropic::Models::Beta::beta_tool_choice,
|
|
@@ -101,6 +106,17 @@ module Anthropic
|
|
|
101
106
|
request_options: Anthropic::RequestOptions
|
|
102
107
|
}
|
|
103
108
|
|
|
109
|
+
type speed = :standard | :fast
|
|
110
|
+
|
|
111
|
+
module Speed
|
|
112
|
+
extend Anthropic::Internal::Type::Enum
|
|
113
|
+
|
|
114
|
+
STANDARD: :standard
|
|
115
|
+
FAST: :fast
|
|
116
|
+
|
|
117
|
+
def self?.values: -> ::Array[Anthropic::Models::Beta::MessageCountTokensParams::speed]
|
|
118
|
+
end
|
|
119
|
+
|
|
104
120
|
type system_ = String | ::Array[Anthropic::Beta::BetaTextBlockParam]
|
|
105
121
|
|
|
106
122
|
module System
|
|
@@ -14,6 +14,7 @@ module Anthropic
|
|
|
14
14
|
output_config: Anthropic::Beta::BetaOutputConfig,
|
|
15
15
|
output_format: Anthropic::Beta::BetaJSONOutputFormat?,
|
|
16
16
|
service_tier: Anthropic::Models::Beta::MessageCreateParams::service_tier,
|
|
17
|
+
speed: Anthropic::Models::Beta::MessageCreateParams::speed?,
|
|
17
18
|
stop_sequences: ::Array[String],
|
|
18
19
|
system_: Anthropic::Models::Beta::MessageCreateParams::system_,
|
|
19
20
|
temperature: Float,
|
|
@@ -68,6 +69,8 @@ module Anthropic
|
|
|
68
69
|
Anthropic::Models::Beta::MessageCreateParams::service_tier
|
|
69
70
|
) -> Anthropic::Models::Beta::MessageCreateParams::service_tier
|
|
70
71
|
|
|
72
|
+
attr_accessor speed: Anthropic::Models::Beta::MessageCreateParams::speed?
|
|
73
|
+
|
|
71
74
|
attr_reader stop_sequences: ::Array[String]?
|
|
72
75
|
|
|
73
76
|
def stop_sequences=: (::Array[String]) -> ::Array[String]
|
|
@@ -126,6 +129,7 @@ module Anthropic
|
|
|
126
129
|
?output_config: Anthropic::Beta::BetaOutputConfig,
|
|
127
130
|
?output_format: Anthropic::Beta::BetaJSONOutputFormat?,
|
|
128
131
|
?service_tier: Anthropic::Models::Beta::MessageCreateParams::service_tier,
|
|
132
|
+
?speed: Anthropic::Models::Beta::MessageCreateParams::speed?,
|
|
129
133
|
?stop_sequences: ::Array[String],
|
|
130
134
|
?system_: Anthropic::Models::Beta::MessageCreateParams::system_,
|
|
131
135
|
?temperature: Float,
|
|
@@ -150,6 +154,7 @@ module Anthropic
|
|
|
150
154
|
output_config: Anthropic::Beta::BetaOutputConfig,
|
|
151
155
|
output_format: Anthropic::Beta::BetaJSONOutputFormat?,
|
|
152
156
|
service_tier: Anthropic::Models::Beta::MessageCreateParams::service_tier,
|
|
157
|
+
speed: Anthropic::Models::Beta::MessageCreateParams::speed?,
|
|
153
158
|
stop_sequences: ::Array[String],
|
|
154
159
|
system_: Anthropic::Models::Beta::MessageCreateParams::system_,
|
|
155
160
|
temperature: Float,
|
|
@@ -181,6 +186,17 @@ module Anthropic
|
|
|
181
186
|
def self?.values: -> ::Array[Anthropic::Models::Beta::MessageCreateParams::service_tier]
|
|
182
187
|
end
|
|
183
188
|
|
|
189
|
+
type speed = :standard | :fast
|
|
190
|
+
|
|
191
|
+
module Speed
|
|
192
|
+
extend Anthropic::Internal::Type::Enum
|
|
193
|
+
|
|
194
|
+
STANDARD: :standard
|
|
195
|
+
FAST: :fast
|
|
196
|
+
|
|
197
|
+
def self?.values: -> ::Array[Anthropic::Models::Beta::MessageCreateParams::speed]
|
|
198
|
+
end
|
|
199
|
+
|
|
184
200
|
type system_ = String | ::Array[Anthropic::Beta::BetaTextBlockParam]
|
|
185
201
|
|
|
186
202
|
module System
|
|
@@ -67,6 +67,7 @@ module Anthropic
|
|
|
67
67
|
output_config: Anthropic::Beta::BetaOutputConfig,
|
|
68
68
|
output_format: Anthropic::Beta::BetaJSONOutputFormat?,
|
|
69
69
|
service_tier: Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params::service_tier,
|
|
70
|
+
speed: Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params::speed?,
|
|
70
71
|
stop_sequences: ::Array[String],
|
|
71
72
|
stream: bool,
|
|
72
73
|
system_: Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params::system_,
|
|
@@ -117,6 +118,8 @@ module Anthropic
|
|
|
117
118
|
Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params::service_tier
|
|
118
119
|
) -> Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params::service_tier
|
|
119
120
|
|
|
121
|
+
attr_accessor speed: Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params::speed?
|
|
122
|
+
|
|
120
123
|
attr_reader stop_sequences: ::Array[String]?
|
|
121
124
|
|
|
122
125
|
def stop_sequences=: (::Array[String]) -> ::Array[String]
|
|
@@ -173,6 +176,7 @@ module Anthropic
|
|
|
173
176
|
?output_config: Anthropic::Beta::BetaOutputConfig,
|
|
174
177
|
?output_format: Anthropic::Beta::BetaJSONOutputFormat?,
|
|
175
178
|
?service_tier: Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params::service_tier,
|
|
179
|
+
?speed: Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params::speed?,
|
|
176
180
|
?stop_sequences: ::Array[String],
|
|
177
181
|
?stream: bool,
|
|
178
182
|
?system_: Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params::system_,
|
|
@@ -196,6 +200,7 @@ module Anthropic
|
|
|
196
200
|
output_config: Anthropic::Beta::BetaOutputConfig,
|
|
197
201
|
output_format: Anthropic::Beta::BetaJSONOutputFormat?,
|
|
198
202
|
service_tier: Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params::service_tier,
|
|
203
|
+
speed: Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params::speed?,
|
|
199
204
|
stop_sequences: ::Array[String],
|
|
200
205
|
stream: bool,
|
|
201
206
|
system_: Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params::system_,
|
|
@@ -226,6 +231,17 @@ module Anthropic
|
|
|
226
231
|
def self?.values: -> ::Array[Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params::service_tier]
|
|
227
232
|
end
|
|
228
233
|
|
|
234
|
+
type speed = :standard | :fast
|
|
235
|
+
|
|
236
|
+
module Speed
|
|
237
|
+
extend Anthropic::Internal::Type::Enum
|
|
238
|
+
|
|
239
|
+
STANDARD: :standard
|
|
240
|
+
FAST: :fast
|
|
241
|
+
|
|
242
|
+
def self?.values: -> ::Array[Anthropic::Models::Beta::Messages::BatchCreateParams::Request::Params::speed]
|
|
243
|
+
end
|
|
244
|
+
|
|
229
245
|
type system_ =
|
|
230
246
|
String | ::Array[Anthropic::Beta::BetaTextBlockParam]
|
|
231
247
|
|
|
@@ -16,6 +16,7 @@ module Anthropic
|
|
|
16
16
|
?output_config: Anthropic::Beta::BetaOutputConfig,
|
|
17
17
|
?output_format: Anthropic::Beta::BetaJSONOutputFormat?,
|
|
18
18
|
?service_tier: Anthropic::Models::Beta::MessageCreateParams::service_tier,
|
|
19
|
+
?speed: Anthropic::Models::Beta::MessageCreateParams::speed?,
|
|
19
20
|
?stop_sequences: ::Array[String],
|
|
20
21
|
?system_: Anthropic::Models::Beta::MessageCreateParams::system_,
|
|
21
22
|
?temperature: Float,
|
|
@@ -40,6 +41,7 @@ module Anthropic
|
|
|
40
41
|
?output_config: Anthropic::Beta::BetaOutputConfig,
|
|
41
42
|
?output_format: Anthropic::Beta::BetaJSONOutputFormat?,
|
|
42
43
|
?service_tier: Anthropic::Models::Beta::MessageCreateParams::service_tier,
|
|
44
|
+
?speed: Anthropic::Models::Beta::MessageCreateParams::speed?,
|
|
43
45
|
?stop_sequences: ::Array[String],
|
|
44
46
|
?system_: Anthropic::Models::Beta::MessageCreateParams::system_,
|
|
45
47
|
?temperature: Float,
|
|
@@ -59,6 +61,7 @@ module Anthropic
|
|
|
59
61
|
?mcp_servers: ::Array[Anthropic::Beta::BetaRequestMCPServerURLDefinition],
|
|
60
62
|
?output_config: Anthropic::Beta::BetaOutputConfig,
|
|
61
63
|
?output_format: Anthropic::Beta::BetaJSONOutputFormat?,
|
|
64
|
+
?speed: Anthropic::Models::Beta::MessageCountTokensParams::speed?,
|
|
62
65
|
?system_: Anthropic::Models::Beta::MessageCountTokensParams::system_,
|
|
63
66
|
?thinking: Anthropic::Models::Beta::beta_thinking_config_param,
|
|
64
67
|
?tool_choice: Anthropic::Models::Beta::beta_tool_choice,
|