Class: Anthropic::Models::Beta::BetaFallbackParam
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::Beta::BetaFallbackParam
- Defined in:
- lib/anthropic/models/beta/beta_fallback_param.rb,
sig/anthropic/models/beta/beta_fallback_param.rbs
Defined Under Namespace
Instance Attribute Summary collapse
-
#max_tokens ⇒ Integer?
The
max_tokensfor the fallback attempt that uses thisfallbacksentry'smodel, in place of the request'smax_tokens. -
#model ⇒ Symbol, ...
The model that will complete your prompt.
-
#output_config ⇒ Anthropic::Models::Beta::BetaOutputConfig?
Output parameters for the fallback attempt that uses this
fallbacksentry'smodel, combined with the request'soutput_configone field at a time. -
#speed ⇒ Symbol, ...
The inference speed mode for the fallback attempt that uses this
fallbacksentry'smodel. -
#thinking ⇒ Anthropic::Models::Beta::BetaThinkingConfigEnabled, ...
The thinking configuration for the fallback attempt that uses this
fallbacksentry'smodel.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(model:, max_tokens: nil, output_config: nil, speed: nil, thinking: nil) ⇒ BetaFallbackParam
constructor
One entry in the
fallbackschain on a/v1/messagesrequest. - #to_hash ⇒ { model: Anthropic::Models::model, max_tokens: Integer?, output_config: Anthropic::Beta::BetaOutputConfig?, speed: Anthropic::Models::Beta::BetaFallbackParam::speed?, thinking: Anthropic::Models::Beta::BetaFallbackParam::thinking? }
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(model:, max_tokens: nil, output_config: nil, speed: nil, thinking: nil) ⇒ BetaFallbackParam
One entry in the fallbacks chain on a /v1/messages request.
model is required. The override fields (max_tokens, thinking,
output_config, and speed) set the corresponding parameter for this attempt
only and are validated as if the request were made to model. Any other key is
rejected at parse time.
Some parameter documentations has been truncated, see Anthropic::Models::Beta::BetaFallbackParam for more details.
|
|
# File 'lib/anthropic/models/beta/beta_fallback_param.rb', line 83
|
Instance Attribute Details
#max_tokens ⇒ Integer?
The max_tokens for the fallback attempt that uses this fallbacks entry's
model, in place of the request's max_tokens. If you leave it out or set it
to null, the attempt uses the request's max_tokens.
See the refusals and fallback guide to learn more about fallback entries.
26 |
# File 'lib/anthropic/models/beta/beta_fallback_param.rb', line 26 optional :max_tokens, Integer, nil?: true |
#model ⇒ Symbol, ...
The model that will complete your prompt.
See models for additional details and options.
14 |
# File 'lib/anthropic/models/beta/beta_fallback_param.rb', line 14 required :model, union: -> { Anthropic::Model } |
#output_config ⇒ Anthropic::Models::Beta::BetaOutputConfig?
Output parameters for the fallback attempt that uses this fallbacks entry's
model, combined with the request's output_config one field at a time.
format: If you leave it out, the attempt uses the request'sformat. If you set it tonull, the attempt runs without a format.effort: If you leave it out, the attempt uses the request'seffortwhenmodelsupports that level with the attempt'sthinking. If the request doesn't seteffort, ifmodeldoesn't support the level, or if you setefforttonull, the attempt runs at the default effort ofmodel.task_budget: If you leave it out, the attempt uses the request'stask_budgetwhenmodelaccepts a task budget of that size. If the request doesn't settask_budget, ifmodeldoesn't accept it, or if you settask_budgettonull, the attempt runs without a task budget.
Set output_config to null to run the attempt without a format or a task
budget, at the default effort of model.
These rules apply with the server-side-fallback-2026-07-01 beta header.
49 |
# File 'lib/anthropic/models/beta/beta_fallback_param.rb', line 49 optional :output_config, -> { Anthropic::Beta::BetaOutputConfig }, nil?: true |
#speed ⇒ Symbol, ...
The inference speed mode for the fallback attempt that uses this fallbacks
entry's model. If you leave it out, the attempt runs at fast speed only when
the request sets speed to fast and your organization can use fast mode on
model.
Otherwise, or when you set this field to null, the attempt runs at standard
speed.
These rules apply with the server-side-fallback-2026-07-01 beta header.
63 |
# File 'lib/anthropic/models/beta/beta_fallback_param.rb', line 63 optional :speed, enum: -> { Anthropic::Beta::BetaFallbackParam::Speed }, nil?: true |
#thinking ⇒ Anthropic::Models::Beta::BetaThinkingConfigEnabled, ...
The thinking configuration for the fallback attempt that uses this fallbacks
entry's model. If you leave it out, the attempt uses the request's thinking
when model supports that thinking type.
If you leave it out and the request's thinking type is between_tools but
model doesn't support between_tools, the attempt uses disabled if model
supports it. Otherwise, if model doesn't support the request's thinking
type, if the request doesn't set thinking, or if you set this field to
null, the attempt uses the thinking type that model uses when a request
leaves out thinking. The request's thinking.display still applies where
model allows it.
These rules apply with the server-side-fallback-2026-07-01 beta header.
81 |
# File 'lib/anthropic/models/beta/beta_fallback_param.rb', line 81 optional :thinking, union: -> { Anthropic::Beta::BetaFallbackParam::Thinking }, nil?: true |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/anthropic/models/beta/beta_fallback_param.rb', line 121
|
Instance Method Details
#to_hash ⇒ { model: Anthropic::Models::model, max_tokens: Integer?, output_config: Anthropic::Beta::BetaOutputConfig?, speed: Anthropic::Models::Beta::BetaFallbackParam::speed?, thinking: Anthropic::Models::Beta::BetaFallbackParam::thinking? }
34 35 36 37 38 39 40 |
# File 'sig/anthropic/models/beta/beta_fallback_param.rbs', line 34
def to_hash: -> {
model: Anthropic::Models::model,
max_tokens: Integer?,
output_config: Anthropic::Beta::BetaOutputConfig?,
speed: Anthropic::Models::Beta::BetaFallbackParam::speed?,
thinking: Anthropic::Models::Beta::BetaFallbackParam::thinking?
}
|