pub struct SessionRpcModel<'a> { /* private fields */ }Expand description
session.model.* RPCs.
Implementations§
Source§impl<'a> SessionRpcModel<'a>
impl<'a> SessionRpcModel<'a>
Sourcepub async fn get_current(&self) -> Result<CurrentModel, Error>
pub async fn get_current(&self) -> Result<CurrentModel, Error>
Gets the currently selected model for the session.
Wire method: session.model.getCurrent.
§Returns
The currently selected model and reasoning effort for the session.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn switch_to(
&self,
params: ModelSwitchToRequest,
) -> Result<ModelSwitchToResult, Error>
pub async fn switch_to( &self, params: ModelSwitchToRequest, ) -> Result<ModelSwitchToResult, Error>
Switches the session to a model and optional reasoning configuration.
Wire method: session.model.switchTo.
§Parameters
params- Target model identifier and optional reasoning effort, summary, and capability overrides.
§Returns
The model identifier active on the session after the switch.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn set_reasoning_effort(
&self,
params: ModelSetReasoningEffortRequest,
) -> Result<ModelSetReasoningEffortResult, Error>
pub async fn set_reasoning_effort( &self, params: ModelSetReasoningEffortRequest, ) -> Result<ModelSetReasoningEffortResult, Error>
Updates the session’s reasoning effort without changing the selected model.
Wire method: session.model.setReasoningEffort.
§Parameters
params- Reasoning effort level to apply to the currently selected model.
§Returns
Update the session’s reasoning effort without changing the selected model. Use switchTo instead when you also need to change the model. The runtime stores the effort on the session and applies it to subsequent turns.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Trait Implementations§
Source§impl<'a> Clone for SessionRpcModel<'a>
impl<'a> Clone for SessionRpcModel<'a>
Source§fn clone(&self) -> SessionRpcModel<'a>
fn clone(&self) -> SessionRpcModel<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more