Class SessionModelSwitchToRequest
java.lang.Object
com.github.copilot.generated.rpc.SessionModelSwitchToRequest
@CopilotExperimental
@Generated("copilot-sdk-codegen")
public final class SessionModelSwitchToRequest
extends Object
Target model identifier and optional reasoning effort, summary, capability overrides, and context tier.
Required inputs are constructor arguments. Optional inputs have fluent setters.
- Since:
- 1.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionSessionModelSwitchToRequest(String modelId) Creates a request with its required inputs. -
Method Summary
Modifier and TypeMethodDescriptionReturns theautoTierproperty.Returns thecompactionDecisionproperty.Returns thecontextTierproperty.Returns thedeferIfModelChangeQueuedproperty.Returns themodelCapabilitiesproperty.Returns themodelChangeScopeproperty.Returns themodelIdproperty.Returns thepickerPersistenceproperty.Returns theproviderIdproperty.Returns thereasoningEffortproperty.Returns thereasoningSummaryproperty.Returns therepoScopeproperty.Returns therequireAvailableproperty.Returns therunCompactionPreflightproperty.Returns thesourceproperty.Returns theverbosityproperty.setAutoTier(AutoTier value) Sets theautoTierproperty.setCompactionDecision(String value) Sets thecompactionDecisionproperty.setContextTier(ContextTier value) Sets thecontextTierproperty.Sets thedeferIfModelChangeQueuedproperty.Sets themodelCapabilitiesproperty.setModelChangeScope(String value) Sets themodelChangeScopeproperty.Sets thepickerPersistenceproperty.setProviderId(String value) Sets theproviderIdproperty.setReasoningEffort(String value) Sets thereasoningEffortproperty.Sets thereasoningSummaryproperty.setRepoScope(String value) Sets therepoScopeproperty.setRequireAvailable(Boolean value) Sets therequireAvailableproperty.setRunCompactionPreflight(Boolean value) Sets therunCompactionPreflightproperty.setSource(ModelChangeSource value) Sets thesourceproperty.setVerbosity(Verbosity value) Sets theverbosityproperty.
-
Constructor Details
-
SessionModelSwitchToRequest
Creates a request with its required inputs.- Parameters:
modelId- Model id to switch to, as returned by `list`. Include providerId to select an exact catalog entry when providers share the id. Without providerId, a bare id retains incumbent selection behavior; a registry-qualified id (`provider/id`, e.g. `acme/claude-sonnet`) targets a BYOK model.
-
-
Method Details
-
getModelId
Returns themodelIdproperty.- Returns:
- Model id to switch to, as returned by `list`. Include providerId to select an exact catalog entry when providers share the id. Without providerId, a bare id retains incumbent selection behavior; a registry-qualified id (`provider/id`, e.g. `acme/claude-sonnet`) targets a BYOK model.
-
getAutoTier
Returns theautoTierproperty.- Returns:
- Optional Auto routing preference to stage atomically with selecting `auto`. Pass null to return to provider-default Auto routing. This field is rejected when `modelId` is not `auto`.
-
getReasoningEffort
Returns thereasoningEffortproperty.- Returns:
- Reasoning effort level to use for the model. CAPI values are model-defined and validated against the selected model; BYOK providers may define additional values. "none" disables reasoning. Pass null to clear any session effort override and fall back to the model's default. When omitted, the session's current effort is kept.
-
getReasoningSummary
Returns thereasoningSummaryproperty.- Returns:
- Reasoning summary mode to request for supported model clients
-
getVerbosity
Returns theverbosityproperty.- Returns:
- Output verbosity level to request for supported models
-
getModelCapabilities
Returns themodelCapabilitiesproperty.- Returns:
- Override individual model capabilities resolved by the runtime
-
getContextTier
Returns thecontextTierproperty.- Returns:
- Explicit context tier for the selected model. `"default"` / `"long_context"` apply the requested tier; omit this field to use normal model behavior with no explicit tier.
-
getSource
Returns thesourceproperty.- Returns:
- Origin to record on the effective `session.model_change` event for trusted in-process calls. Transport SDK calls are always recorded as `sdk`, regardless of this value.
-
getDeferIfModelChangeQueued
Returns thedeferIfModelChangeQueuedproperty.- Returns:
- When true, defer this switch (enqueue it) if another model change is already queued, even when no turn is active — so it drains last (FIFO) and wins over the already-queued change. Intended for genuine user-initiated model selections; internal restore/reapply switches omit it and apply immediately when no turn is active. When no other model change is queued this has no effect (a switch still applies immediately unless a turn is active).
-
getCompactionDecision
Returns thecompactionDecisionproperty.- Returns:
- Explicit response to a model-switch compaction preflight. Omit to request a confirmation projection when compaction is necessary.
-
getRunCompactionPreflight
Returns therunCompactionPreflightproperty.- Returns:
- When true, evaluate context-window compaction policy before applying the switch.
-
getRepoScope
Returns therepoScopeproperty.- Returns:
- Optional repository settings scope to persist after the switch commits.
-
getModelChangeScope
Returns themodelChangeScopeproperty.- Returns:
- Settings scope used when persisting the selected model.
-
getRequireAvailable
Returns therequireAvailableproperty.- Returns:
- Require the target to be currently available and enabled before applying the switch.
-
getPickerPersistence
Returns thepickerPersistenceproperty.- Returns:
- Optional settings context and explicit-override flags used to persist a picker selection.
-
getProviderId
Returns theproviderIdproperty.- Returns:
- Provider id from the selected list entry's provider reference. Selects this exact provider/model pair; an unavailable pair fails rather than using another provider. Omit for deterministic legacy bare-model selection.
-
setAutoTier
Sets theautoTierproperty.- Parameters:
value- Optional Auto routing preference to stage atomically with selecting `auto`. Pass null to return to provider-default Auto routing. This field is rejected when `modelId` is not `auto`.- Returns:
- this request
-
setReasoningEffort
Sets thereasoningEffortproperty.- Parameters:
value- Reasoning effort level to use for the model. CAPI values are model-defined and validated against the selected model; BYOK providers may define additional values. "none" disables reasoning. Pass null to clear any session effort override and fall back to the model's default. When omitted, the session's current effort is kept.- Returns:
- this request
-
setReasoningSummary
Sets thereasoningSummaryproperty.- Parameters:
value- Reasoning summary mode to request for supported model clients- Returns:
- this request
-
setVerbosity
Sets theverbosityproperty.- Parameters:
value- Output verbosity level to request for supported models- Returns:
- this request
-
setModelCapabilities
Sets themodelCapabilitiesproperty.- Parameters:
value- Override individual model capabilities resolved by the runtime- Returns:
- this request
-
setContextTier
Sets thecontextTierproperty.- Parameters:
value- Explicit context tier for the selected model. `"default"` / `"long_context"` apply the requested tier; omit this field to use normal model behavior with no explicit tier.- Returns:
- this request
-
setSource
Sets thesourceproperty.- Parameters:
value- Origin to record on the effective `session.model_change` event for trusted in-process calls. Transport SDK calls are always recorded as `sdk`, regardless of this value.- Returns:
- this request
-
setDeferIfModelChangeQueued
Sets thedeferIfModelChangeQueuedproperty.- Parameters:
value- When true, defer this switch (enqueue it) if another model change is already queued, even when no turn is active — so it drains last (FIFO) and wins over the already-queued change. Intended for genuine user-initiated model selections; internal restore/reapply switches omit it and apply immediately when no turn is active. When no other model change is queued this has no effect (a switch still applies immediately unless a turn is active).- Returns:
- this request
-
setCompactionDecision
Sets thecompactionDecisionproperty.- Parameters:
value- Explicit response to a model-switch compaction preflight. Omit to request a confirmation projection when compaction is necessary.- Returns:
- this request
-
setRunCompactionPreflight
Sets therunCompactionPreflightproperty.- Parameters:
value- When true, evaluate context-window compaction policy before applying the switch.- Returns:
- this request
-
setRepoScope
Sets therepoScopeproperty.- Parameters:
value- Optional repository settings scope to persist after the switch commits.- Returns:
- this request
-
setModelChangeScope
Sets themodelChangeScopeproperty.- Parameters:
value- Settings scope used when persisting the selected model.- Returns:
- this request
-
setRequireAvailable
Sets therequireAvailableproperty.- Parameters:
value- Require the target to be currently available and enabled before applying the switch.- Returns:
- this request
-
setPickerPersistence
Sets thepickerPersistenceproperty.- Parameters:
value- Optional settings context and explicit-override flags used to persist a picker selection.- Returns:
- this request
-
setProviderId
Sets theproviderIdproperty.- Parameters:
value- Provider id from the selected list entry's provider reference. Selects this exact provider/model pair; an unavailable pair fails rather than using another provider. Omit for deterministic legacy bare-model selection.- Returns:
- this request
-