pub struct ModelSwitchToRequest {Show 14 fields
pub compaction_decision: Option<String>,
pub context_tier: Option<ContextTier>,
pub defer_if_model_change_queued: Option<bool>,
pub model_capabilities: Option<ModelCapabilitiesOverride>,
pub model_change_scope: Option<String>,
pub model_id: String,
pub picker_persistence: Option<ModelPickerPersistenceRequest>,
pub reasoning_effort: Option<String>,
pub reasoning_summary: Option<ReasoningSummary>,
pub repo_scope: Option<String>,
pub require_available: Option<bool>,
pub run_compaction_preflight: Option<bool>,
pub source: Option<ModelChangeSource>,
pub verbosity: Option<Verbosity>,
}Expand description
Target model identifier and optional reasoning effort, summary, capability overrides, and context tier.
Experimental. This type is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases.
Fields§
§compaction_decision: Option<String>Explicit response to a model-switch compaction preflight. Omit to request a confirmation projection when compaction is necessary.
context_tier: Option<ContextTier>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.
defer_if_model_change_queued: Option<bool>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).
model_capabilities: Option<ModelCapabilitiesOverride>Override individual model capabilities resolved by the runtime
model_change_scope: Option<String>Settings scope used when persisting the selected model.
model_id: StringModel selection id to switch to, as returned by list. A bare id (e.g. claude-sonnet-4.6) names a Copilot (CAPI) model; a provider-qualified id (provider/id, e.g. acme/claude-sonnet) targets a registry BYOK model.
picker_persistence: Option<ModelPickerPersistenceRequest>Optional settings context and explicit-override flags used to persist a picker selection.
reasoning_effort: Option<String>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. When omitted, no effort override is applied.
reasoning_summary: Option<ReasoningSummary>Reasoning summary mode to request for supported model clients
repo_scope: Option<String>Optional repository settings scope to persist after the switch commits.
require_available: Option<bool>Require the target to be currently available and enabled before applying the switch.
run_compaction_preflight: Option<bool>When true, evaluate context-window compaction policy before applying the switch.
source: Option<ModelChangeSource>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.
verbosity: Option<Verbosity>Output verbosity level to request for supported models
Trait Implementations§
Source§impl Clone for ModelSwitchToRequest
impl Clone for ModelSwitchToRequest
Source§fn clone(&self) -> ModelSwitchToRequest
fn clone(&self) -> ModelSwitchToRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more