Class BetaFallbackParam.Builder
-
- All Implemented Interfaces:
public final class BetaFallbackParam.BuilderA builder for BetaFallbackParam.
-
-
Method Summary
Modifier and Type Method Description final BetaFallbackParam.Buildermodel(Model model)The model that will complete your prompt. final BetaFallbackParam.Buildermodel(JsonField<Model> model)Sets Builder.model to an arbitrary JSON value. final BetaFallbackParam.Buildermodel(String value)Sets model to an arbitrary String. final BetaFallbackParam.BuildermaxTokens(Long maxTokens)The max_tokensfor the fallback attempt that uses thisfallbacksentry'smodel, in place of the request'smax_tokens.final BetaFallbackParam.BuildermaxTokens(Long maxTokens)Alias for Builder.maxTokens. final BetaFallbackParam.BuildermaxTokens(Optional<Long> maxTokens)Alias for calling Builder.maxTokens with maxTokens.orElse(null).final BetaFallbackParam.BuildermaxTokens(JsonField<Long> maxTokens)Sets Builder.maxTokens to an arbitrary JSON value. final BetaFallbackParam.BuilderoutputConfig(BetaOutputConfig outputConfig)Output parameters for the fallback attempt that uses this fallbacksentry'smodel, combined with the request'soutput_configone field at a time.final BetaFallbackParam.BuilderoutputConfig(Optional<BetaOutputConfig> outputConfig)Alias for calling Builder.outputConfig with outputConfig.orElse(null).final BetaFallbackParam.BuilderoutputConfig(JsonField<BetaOutputConfig> outputConfig)Sets Builder.outputConfig to an arbitrary JSON value. final BetaFallbackParam.Builderspeed(BetaFallbackParam.Speed speed)The inference speed mode for the fallback attempt that uses this fallbacksentry'smodel.final BetaFallbackParam.Builderspeed(Optional<BetaFallbackParam.Speed> speed)Alias for calling Builder.speed with speed.orElse(null).final BetaFallbackParam.Builderspeed(JsonField<BetaFallbackParam.Speed> speed)Sets Builder.speed to an arbitrary JSON value. final BetaFallbackParam.Builderthinking(BetaFallbackParam.Thinking thinking)The thinking configuration for the fallback attempt that uses this fallbacksentry'smodel.final BetaFallbackParam.Builderthinking(Optional<BetaFallbackParam.Thinking> thinking)Alias for calling Builder.thinking with thinking.orElse(null).final BetaFallbackParam.Builderthinking(JsonField<BetaFallbackParam.Thinking> thinking)Sets Builder.thinking to an arbitrary JSON value. final BetaFallbackParam.Builderthinking(BetaThinkingConfigEnabled enabled)Alias for calling thinking with Thinking.ofEnabled(enabled).final BetaFallbackParam.Builderthinking(BetaThinkingConfigDisabled disabled)Alias for calling thinking with Thinking.ofDisabled(disabled).final BetaFallbackParam.Builderthinking(BetaThinkingConfigBetweenTools betweenTools)Alias for calling thinking with Thinking.ofBetweenTools(betweenTools).final BetaFallbackParam.Builderthinking(BetaThinkingConfigAdaptive adaptive)Alias for calling thinking with Thinking.ofAdaptive(adaptive).final BetaFallbackParam.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final BetaFallbackParam.BuilderenabledThinking(Long budgetTokens)Alias for calling thinking with the following: BetaThinkingConfigEnabled.builder() .budgetTokens(budgetTokens) .build()final BetaFallbackParam.BuilderputAdditionalProperty(String key, JsonValue value)final BetaFallbackParam.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final BetaFallbackParam.BuilderremoveAdditionalProperty(String key)final BetaFallbackParam.BuilderremoveAllAdditionalProperties(Set<String> keys)final BetaFallbackParambuild()Returns an immutable instance of BetaFallbackParam. -
-
Method Detail
-
model
final BetaFallbackParam.Builder model(Model model)
The model that will complete your prompt.
See models for additional details and options.
-
model
final BetaFallbackParam.Builder model(JsonField<Model> model)
Sets Builder.model to an arbitrary JSON value.
You should usually call Builder.model with a well-typed Model value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
model
final BetaFallbackParam.Builder model(String value)
Sets model to an arbitrary String.
You should usually call model with a well-typed Model constant instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
maxTokens
final BetaFallbackParam.Builder maxTokens(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.
-
maxTokens
final BetaFallbackParam.Builder maxTokens(Long maxTokens)
Alias for Builder.maxTokens.
This unboxed primitive overload exists for backwards compatibility.
-
maxTokens
final BetaFallbackParam.Builder maxTokens(Optional<Long> maxTokens)
Alias for calling Builder.maxTokens with
maxTokens.orElse(null).
-
maxTokens
final BetaFallbackParam.Builder maxTokens(JsonField<Long> maxTokens)
Sets Builder.maxTokens to an arbitrary JSON value.
You should usually call Builder.maxTokens with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
outputConfig
final BetaFallbackParam.Builder outputConfig(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.
-
outputConfig
final BetaFallbackParam.Builder outputConfig(Optional<BetaOutputConfig> outputConfig)
Alias for calling Builder.outputConfig with
outputConfig.orElse(null).
-
outputConfig
final BetaFallbackParam.Builder outputConfig(JsonField<BetaOutputConfig> outputConfig)
Sets Builder.outputConfig to an arbitrary JSON value.
You should usually call Builder.outputConfig with a well-typed BetaOutputConfig value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
speed
final BetaFallbackParam.Builder speed(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.
-
speed
final BetaFallbackParam.Builder speed(Optional<BetaFallbackParam.Speed> speed)
Alias for calling Builder.speed with
speed.orElse(null).
-
speed
final BetaFallbackParam.Builder speed(JsonField<BetaFallbackParam.Speed> speed)
Sets Builder.speed to an arbitrary JSON value.
You should usually call Builder.speed with a well-typed Speed value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
thinking
final BetaFallbackParam.Builder thinking(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.
-
thinking
final BetaFallbackParam.Builder thinking(Optional<BetaFallbackParam.Thinking> thinking)
Alias for calling Builder.thinking with
thinking.orElse(null).
-
thinking
final BetaFallbackParam.Builder thinking(JsonField<BetaFallbackParam.Thinking> thinking)
Sets Builder.thinking to an arbitrary JSON value.
You should usually call Builder.thinking with a well-typed Thinking value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
thinking
final BetaFallbackParam.Builder thinking(BetaThinkingConfigEnabled enabled)
Alias for calling thinking with
Thinking.ofEnabled(enabled).
-
thinking
final BetaFallbackParam.Builder thinking(BetaThinkingConfigDisabled disabled)
Alias for calling thinking with
Thinking.ofDisabled(disabled).
-
thinking
final BetaFallbackParam.Builder thinking(BetaThinkingConfigBetweenTools betweenTools)
Alias for calling thinking with
Thinking.ofBetweenTools(betweenTools).
-
thinking
final BetaFallbackParam.Builder thinking(BetaThinkingConfigAdaptive adaptive)
Alias for calling thinking with
Thinking.ofAdaptive(adaptive).
-
additionalProperties
final BetaFallbackParam.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
enabledThinking
final BetaFallbackParam.Builder enabledThinking(Long budgetTokens)
Alias for calling thinking with the following:
BetaThinkingConfigEnabled.builder() .budgetTokens(budgetTokens) .build()
-
putAdditionalProperty
final BetaFallbackParam.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final BetaFallbackParam.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final BetaFallbackParam.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final BetaFallbackParam.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final BetaFallbackParam build()
Returns an immutable instance of BetaFallbackParam.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.model()
-
-
-
-