pub struct ProviderConfig {
pub name: Option<String>,
pub base_url: Option<String>,
pub api_key: Option<String>,
pub api: Option<String>,
pub headers: Option<BTreeMap<String, String>>,
pub auth_header: Option<bool>,
pub models: Vec<ModelDefinition>,
}Expand description
A provider entry in models.json. The fields mirror the TS ProviderConfig
one-for-one; v1 honors base_url/api_key/headers/auth_header/models,
and ignores api values other than anthropic-messages (documented).
Fields§
§name: Option<String>§base_url: Option<String>§api_key: Option<String>§api: Option<String>§headers: Option<BTreeMap<String, String>>§auth_header: Option<bool>true ⇒ wrap api_key as Authorization: Bearer <key> (mirrors
upstream provider-composer.ts authHeader).
models: Vec<ModelDefinition>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 (const: unstable) · 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