Class SetModelOptions

java.lang.Object
com.github.copilot.rpc.SetModelOptions

public class SetModelOptions extends Object
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 Details

    • SetModelOptions

      public SetModelOptions()
  • Method Details

    • getModel

      public String getModel()
      Gets the target model ID.
      Returns:
      the model ID, or null when none has been set
    • setModel

      public SetModelOptions setModel(String model)
      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

      public String getReasoningEffort()
      Gets the reasoning effort level.
      Returns:
      the reasoning effort level, or null to use the default
    • setReasoningEffort

      public SetModelOptions setReasoningEffort(String reasoningEffort)
      Sets the reasoning effort level.
      Parameters:
      reasoningEffort - reasoning effort level (e.g., "low", "medium", "high", "xhigh", "max"); null to use the default
      Returns:
      this options object for method chaining
    • getReasoningSummary

      public String getReasoningSummary()
      Gets the reasoning summary mode.
      Returns:
      the reasoning summary mode, or null to use the default
    • setReasoningSummary

      public SetModelOptions setReasoningSummary(String reasoningSummary)
      Sets the reasoning summary mode.
      Parameters:
      reasoningSummary - reasoning summary mode ("none", "concise", or "detailed"); null to use the default
      Returns:
      this options object for method chaining
    • getModelCapabilities

      public ModelCapabilitiesOverride getModelCapabilities()
      Gets the model capability overrides.
      Returns:
      the capability overrides, or null to use runtime defaults
    • setModelCapabilities

      public SetModelOptions setModelCapabilities(ModelCapabilitiesOverride modelCapabilities)
      Sets per-property overrides for model capabilities.
      Parameters:
      modelCapabilities - the capability overrides; null to use runtime defaults
      Returns:
      this options object for method chaining
    • getAutoTier

      @CopilotExperimental public AutoTier getAutoTier()
      Gets the requested Auto routing preference.
      Returns:
      the requested tier, or null when no tier was requested
    • setAutoTier

      @CopilotExperimental public SetModelOptions setAutoTier(AutoTier autoTier)
      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 auto model successfully obtains a usable model from the provider. Use setResetAutoTier(boolean) to return to the provider's default Auto routing instead.

      Parameters:
      autoTier - the routing preference to request; null to leave the current preference unchanged
      Returns:
      this options object for method chaining
    • isResetAutoTier

      @CopilotExperimental public boolean isResetAutoTier()
      Gets whether the request returns to provider-default Auto routing.
      Returns:
      true when the request clears the Auto routing preference
    • setResetAutoTier

      @CopilotExperimental public SetModelOptions setResetAutoTier(boolean resetAutoTier)
      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 - true to return to provider-default Auto routing
      Returns:
      this options object for method chaining