pub struct ProviderConfig {
pub model: CompactString,
pub api_key: Option<String>,
pub base_url: Option<String>,
pub standard: ApiStandard,
}Expand description
Remote provider configuration.
Any model name is valid — the standard field (or auto-detection from
base_url) determines which API protocol to use. Local models are handled
by the built-in registry, not by this config.
Fields§
§model: CompactStringModel identifier sent to the remote API.
api_key: Option<String>API key for remote providers. Supports ${ENV_VAR} expansion at the
daemon layer.
base_url: Option<String>Base URL for the remote provider endpoint.
standard: ApiStandardAPI protocol standard. Defaults to OpenAI if omitted.
Implementations§
Source§impl ProviderConfig
impl ProviderConfig
Sourcepub fn effective_standard(&self) -> ApiStandard
pub fn effective_standard(&self) -> ApiStandard
Resolve the effective API standard.
Returns Anthropic if the field is explicitly set to Anthropic,
or if base_url contains “anthropic”. Otherwise OpenAI.
Trait Implementations§
Source§impl Clone for ProviderConfig
impl Clone for ProviderConfig
Source§fn clone(&self) -> ProviderConfig
fn clone(&self) -> ProviderConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProviderConfig
impl Debug for ProviderConfig
Source§impl<'de> Deserialize<'de> for ProviderConfig
impl<'de> Deserialize<'de> for ProviderConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ProviderConfig
impl RefUnwindSafe for ProviderConfig
impl Send for ProviderConfig
impl Sync for ProviderConfig
impl Unpin for ProviderConfig
impl UnsafeUnpin for ProviderConfig
impl UnwindSafe for ProviderConfig
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