Class SetModelOptions
java.lang.Object
com.github.copilot.rpc.SetModelOptions
Optional settings for a model switch.
All setter methods return this for method chaining. model is
required. Every other option is optional; an unset option leaves the
corresponding session state unchanged.
session.setModel(new SetModelOptions().setModel("auto").setAutoTier(AutoTier.INTELLIGENCE)).get();
- Since:
- 1.6.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the requested Auto routing preference.getModel()Gets the target model ID.Gets the model capability overrides.Gets the reasoning effort level.Gets the reasoning summary mode.booleanGets whether the request returns to provider-default Auto routing.setAutoTier(AutoTier autoTier) Requests an Auto routing preference alongside the model switch.Sets the model to switch to.setModelCapabilities(ModelCapabilitiesOverride modelCapabilities) Sets per-property overrides for model capabilities.setReasoningEffort(String reasoningEffort) Sets the reasoning effort level.setReasoningSummary(String reasoningSummary) Sets the reasoning summary mode.setResetAutoTier(boolean resetAutoTier) Requests a return to the provider's default Auto routing.
-
Constructor Details
-
SetModelOptions
public SetModelOptions()
-
-
Method Details
-
getModel
Gets the target model ID.- Returns:
- the model ID, or
nullwhen none has been set
-
setModel
Sets the model to switch to. This option is required.- Parameters:
model- the model ID (e.g.,"gpt-5.4"or"auto")- Returns:
- this options object for method chaining
-
getReasoningEffort
Gets the reasoning effort level.- Returns:
- the reasoning effort level, or
nullto use the default
-
setReasoningEffort
Sets the reasoning effort level.- Parameters:
reasoningEffort- reasoning effort level (e.g.,"low","medium","high","xhigh","max");nullto use the default- Returns:
- this options object for method chaining
-
getReasoningSummary
Gets the reasoning summary mode.- Returns:
- the reasoning summary mode, or
nullto use the default
-
setReasoningSummary
Sets the reasoning summary mode.- Parameters:
reasoningSummary- reasoning summary mode ("none","concise", or"detailed");nullto use the default- Returns:
- this options object for method chaining
-
getModelCapabilities
Gets the model capability overrides.- Returns:
- the capability overrides, or
nullto use runtime defaults
-
setModelCapabilities
Sets per-property overrides for model capabilities.- Parameters:
modelCapabilities- the capability overrides;nullto use runtime defaults- Returns:
- this options object for method chaining
-
getAutoTier
Gets the requested Auto routing preference.- Returns:
- the requested tier, or
nullwhen no tier was requested
-
setAutoTier
Requests an Auto routing preference alongside the model switch.The runtime records the request and commits it only when a later user turn using the
automodel successfully obtains a usable model from the provider. UsesetResetAutoTier(boolean)to return to the provider's default Auto routing instead.- Parameters:
autoTier- the routing preference to request;nullto leave the current preference unchanged- Returns:
- this options object for method chaining
-
isResetAutoTier
Gets whether the request returns to provider-default Auto routing.- Returns:
truewhen the request clears the Auto routing preference
-
setResetAutoTier
Requests a return to the provider's default Auto routing.This differs from leaving
setAutoTier(AutoTier)unset, which keeps the current preference. It cannot be combined with an explicit tier.- Parameters:
resetAutoTier-trueto return to provider-default Auto routing- Returns:
- this options object for method chaining
-