pub struct SessionRpcProvider<'a> { /* private fields */ }Expand description
session.provider.* RPCs.
Implementations§
Source§impl<'a> SessionRpcProvider<'a>
impl<'a> SessionRpcProvider<'a>
Sourcepub async fn get_endpoint(&self) -> Result<ProviderEndpoint, Error>
pub async fn get_endpoint(&self) -> Result<ProviderEndpoint, Error>
Returns the provider endpoint and credentials the session is currently configured to talk to, so the caller can make inference calls directly against the same backend the session uses.
Wire method: session.provider.getEndpoint.
§Returns
A snapshot of the provider endpoint the session is currently configured to talk to.
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 get_endpoint_with_params(
&self,
params: ProviderGetEndpointRequest,
) -> Result<ProviderEndpoint, Error>
pub async fn get_endpoint_with_params( &self, params: ProviderGetEndpointRequest, ) -> Result<ProviderEndpoint, Error>
Returns the provider endpoint and credentials the session is currently configured to talk to, so the caller can make inference calls directly against the same backend the session uses.
Wire method: session.provider.getEndpoint.
§Parameters
params- Optional model identifier to scope the endpoint snapshot to.
§Returns
A snapshot of the provider endpoint the session is currently configured to talk to.
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 add(
&self,
params: ProviderAddRequest,
) -> Result<ProviderAddResult, Error>
pub async fn add( &self, params: ProviderAddRequest, ) -> Result<ProviderAddResult, Error>
Adds BYOK providers and/or models to the session’s registry at runtime, extending the additive registry built from the session’s providers/models options. Both fields are optional, so a call may add providers only, models only, or both. Within a single call providers are registered before models, so a model may reference a provider added in the same call; across calls a model may reference any provider already registered (from session creation or a prior add). A model whose referenced provider is not registered by the end of the call is rejected. Newly added models become selectable via model.list / model.switchTo and are inherited by sub-agents spawned afterwards.
Wire method: session.provider.add.
§Parameters
params- BYOK providers and/or models to add to the session’s registry at runtime. Both fields are optional; provide providers, models, or both.
§Returns
The selectable model entries synthesized for the models added by this call.
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 SessionRpcProvider<'a>
impl<'a> Clone for SessionRpcProvider<'a>
Source§fn clone(&self) -> SessionRpcProvider<'a>
fn clone(&self) -> SessionRpcProvider<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more