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 Forget for RuntimeConfig
impl Freeze for RuntimeConfigwhere
*const u8 is !null: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<String, ProviderConfig>>: Freeze,
*const LeafNode<String, Credential> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Credential)>>: Freeze,
PhantomData<u8>: Freeze,
impl Move for RuntimeConfig
impl RefUnwindSafe for RuntimeConfig
impl Send for RuntimeConfigwhere
RawTable<usize>: Send,
RawVecInner: Send,
NodeRef<Owned, String, String, LeafOrInternal>: Send,
BoxRaw<(String, String)>: Send,
NodeRef<Owned, ThinkingLevel, Option<String>, LeafOrInternal>: Send,
BoxRaw<(ThinkingLevel, Option<String>)>: Send,
NodeRef<Owned, String, Credential, LeafOrInternal>: Send,
BoxRaw<(String, Credential)>: Send,
impl Sync for RuntimeConfigwhere
RawTable<usize>: Sync,
RawVecInner: Sync,
NodeRef<Owned, String, String, LeafOrInternal>: Sync,
BoxRaw<(String, String)>: Sync,
NodeRef<Owned, ThinkingLevel, Option<String>, LeafOrInternal>: Sync,
BoxRaw<(ThinkingLevel, Option<String>)>: Sync,
NodeRef<Owned, String, Credential, LeafOrInternal>: Sync,
BoxRaw<(String, Credential)>: Sync,
impl Unpin for RuntimeConfigwhere
*const u8 is !null: Unpin,
*const LeafNode<String, String> is !null: Unpin,
Box<(String, String)>: Unpin,
*const LeafNode<ThinkingLevel, Option<String>> is !null: Unpin,
Box<(ThinkingLevel, Option<String>)>: Unpin,
*const LeafNode<String, Credential> is !null: Unpin,
Box<(String, Credential)>: Unpin,
impl UnsafeUnpin for RuntimeConfigwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<String, ProviderConfig>>: UnsafeUnpin,
*const LeafNode<String, Credential> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Credential)>>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for RuntimeConfigwhere
NonNull<u8>: UnwindSafe,
RawVecInner: UnwindSafe,
BTreeMap<String, String>: UnwindSafe,
BTreeMap<ThinkingLevel, Option<String>>: UnwindSafe,
BTreeMap<String, Credential>: UnwindSafe,
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