pub struct RuntimeConfig {
pub models: ModelsConfig,
pub credentials: AuthStore,
pub settings: RuntimeSettings,
}Expand description
Immutable configuration inputs read from any host-owned storage. Keep this object private: it contains credentials and unexpanded headers.
Fields§
§models: ModelsConfig§credentials: AuthStore§settings: RuntimeSettingsImplementations§
Source§impl RuntimeConfig
impl RuntimeConfig
Sourcepub fn auth_states(
&self,
providers: &ProviderRegistry,
values: &dyn ValueSource,
) -> BTreeMap<String, AuthState>
pub fn auth_states( &self, providers: &ProviderRegistry, values: &dyn ValueSource, ) -> BTreeMap<String, AuthState>
Resolve each provider independently, expanding its headers only if needed.
Sourcepub fn auth_status(
&self,
provider: &str,
providers: &ProviderRegistry,
values: &dyn ValueSource,
) -> AuthState
pub fn auth_status( &self, provider: &str, providers: &ProviderRegistry, values: &dyn ValueSource, ) -> AuthState
Local, provider-scoped readiness using the same rules as execution.
Sourcepub fn resolve(
&self,
request: &ModelRequest<'_>,
providers: &ProviderRegistry,
values: &dyn ValueSource,
) -> Result<ResolvedModel, ResolveError>
pub fn resolve( &self, request: &ModelRequest<'_>, providers: &ProviderRegistry, values: &dyn ValueSource, ) -> Result<ResolvedModel, ResolveError>
Select and bind a runnable model. Existing results retain their providers and loader leases even when the host later replaces this configuration.
Sourcepub fn catalog(
&self,
providers: &ProviderRegistry,
values: &dyn ValueSource,
) -> (Vec<Model>, Vec<String>)
pub fn catalog( &self, providers: &ProviderRegistry, values: &dyn ValueSource, ) -> (Vec<Model>, Vec<String>)
All configured models, including those awaiting credentials. Descriptors and diagnostics omit request headers and credential values.
Trait Implementations§
Source§impl Clone for RuntimeConfig
impl Clone for RuntimeConfig
Auto Trait Implementations§
impl Freeze for RuntimeConfig
impl RefUnwindSafe for RuntimeConfig
impl Send for RuntimeConfig
impl Sync for RuntimeConfig
impl Unpin for RuntimeConfig
impl UnsafeUnpin for RuntimeConfig
impl UnwindSafe for RuntimeConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more