Class BetaFallbackParam
-
- All Implemented Interfaces:
public final class BetaFallbackParamOne entry in the
fallbackschain on a/v1/messagesrequest.modelis required. The override fields (max_tokens,thinking,output_config, andspeed) set the corresponding parameter for this attempt only and are validated as if the request were made tomodel. Any other key is rejected at parse time.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaFallbackParam.BuilderA builder for BetaFallbackParam.
public final classBetaFallbackParam.SpeedThe inference speed mode for the fallback attempt that uses this
fallbacksentry'smodel. If you leave it out, the attempt runs atfastspeed only when the request setsspeedtofastand your organization can use fast mode onmodel.Otherwise, or when you set this field to
null, the attempt runs atstandardspeed.These rules apply with the
server-side-fallback-2026-07-01beta header.public final classBetaFallbackParam.ThinkingThe thinking configuration for the fallback attempt that uses this
fallbacksentry'smodel. If you leave it out, the attempt uses the request'sthinkingwhenmodelsupports that thinkingtype.If you leave it out and the request's thinking
typeisbetween_toolsbutmodeldoesn't supportbetween_tools, the attempt usesdisabledifmodelsupports it. Otherwise, ifmodeldoesn't support the request's thinkingtype, if the request doesn't setthinking, or if you set this field tonull, the attempt uses the thinkingtypethatmodeluses when a request leaves outthinking. The request'sthinking.displaystill applies wheremodelallows it.These rules apply with the
server-side-fallback-2026-07-01beta header.
-
Method Summary
Modifier and Type Method Description final Modelmodel()The model that will complete your prompt. final Optional<Long>maxTokens()The max_tokensfor the fallback attempt that uses thisfallbacksentry'smodel, in place of the request'smax_tokens.final Optional<BetaOutputConfig>outputConfig()Output parameters for the fallback attempt that uses this fallbacksentry'smodel, combined with the request'soutput_configone field at a time.final Optional<BetaFallbackParam.Speed>speed()The inference speed mode for the fallback attempt that uses this fallbacksentry'smodel.final Optional<BetaFallbackParam.Thinking>thinking()The thinking configuration for the fallback attempt that uses this fallbacksentry'smodel.final JsonField<Model>_model()Returns the raw JSON value of model. final JsonField<Long>_maxTokens()Returns the raw JSON value of maxTokens. final JsonField<BetaOutputConfig>_outputConfig()Returns the raw JSON value of outputConfig. final JsonField<BetaFallbackParam.Speed>_speed()Returns the raw JSON value of speed. final JsonField<BetaFallbackParam.Thinking>_thinking()Returns the raw JSON value of thinking. final Map<String, JsonValue>_additionalProperties()final BetaFallbackParam.BuildertoBuilder()final BetaFallbackParamvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaFallbackParam.Builderbuilder()Returns a mutable builder for constructing an instance of BetaFallbackParam. final static BetaFallbackParamof(Model model)Returns an immutable instance of BetaFallbackParam with the required model set to the given value. final static BetaFallbackParamof(String value)Alias for calling of with Model.of(value).-
-
Method Detail
-
model
final Model model()
The model that will complete your prompt.
See models for additional details and options.
-
maxTokens
final Optional<Long> maxTokens()
The
max_tokensfor the fallback attempt that uses thisfallbacksentry'smodel, in place of the request'smax_tokens. If you leave it out or set it tonull, the attempt uses the request'smax_tokens.See the refusals and fallback guide to learn more about fallback entries.
-
outputConfig
final Optional<BetaOutputConfig> outputConfig()
Output parameters for the fallback attempt that uses this
fallbacksentry'smodel, combined with the request'soutput_configone 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_configtonullto run the attempt without a format or a task budget, at the default effort ofmodel.These rules apply with the
server-side-fallback-2026-07-01beta header.
-
speed
final Optional<BetaFallbackParam.Speed> speed()
The inference speed mode for the fallback attempt that uses this
fallbacksentry'smodel. If you leave it out, the attempt runs atfastspeed only when the request setsspeedtofastand your organization can use fast mode onmodel.Otherwise, or when you set this field to
null, the attempt runs atstandardspeed.These rules apply with the
server-side-fallback-2026-07-01beta header.
-
thinking
final Optional<BetaFallbackParam.Thinking> thinking()
The thinking configuration for the fallback attempt that uses this
fallbacksentry'smodel. If you leave it out, the attempt uses the request'sthinkingwhenmodelsupports that thinkingtype.If you leave it out and the request's thinking
typeisbetween_toolsbutmodeldoesn't supportbetween_tools, the attempt usesdisabledifmodelsupports it. Otherwise, ifmodeldoesn't support the request's thinkingtype, if the request doesn't setthinking, or if you set this field tonull, the attempt uses the thinkingtypethatmodeluses when a request leaves outthinking. The request'sthinking.displaystill applies wheremodelallows it.These rules apply with the
server-side-fallback-2026-07-01beta header.
-
_model
final JsonField<Model> _model()
Returns the raw JSON value of model.
Unlike model, this method doesn't throw if the JSON field has an unexpected type.
-
_maxTokens
final JsonField<Long> _maxTokens()
Returns the raw JSON value of maxTokens.
Unlike maxTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_outputConfig
final JsonField<BetaOutputConfig> _outputConfig()
Returns the raw JSON value of outputConfig.
Unlike outputConfig, this method doesn't throw if the JSON field has an unexpected type.
-
_speed
final JsonField<BetaFallbackParam.Speed> _speed()
Returns the raw JSON value of speed.
Unlike speed, this method doesn't throw if the JSON field has an unexpected type.
-
_thinking
final JsonField<BetaFallbackParam.Thinking> _thinking()
Returns the raw JSON value of thinking.
Unlike thinking, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaFallbackParam.Builder toBuilder()
-
validate
final BetaFallbackParam validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static BetaFallbackParam.Builder builder()
Returns a mutable builder for constructing an instance of BetaFallbackParam.
The following fields are required:
.model()
-
of
final static BetaFallbackParam of(Model model)
Returns an immutable instance of BetaFallbackParam with the required model set to the given value.
-
-
-
-