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
for protocol, endpoint, headers, credentials and model metadata.
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§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 Forget for ProviderConfig
impl Freeze for ProviderConfigwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const LeafNode<String, String> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, String)>>: Freeze,
PhantomData<ModelDefinition>: Freeze,
impl Move for ProviderConfig
impl RefUnwindSafe for ProviderConfig
impl Send for ProviderConfig
impl Sync for ProviderConfig
impl Unpin for ProviderConfig
impl UnsafeUnpin for ProviderConfigwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const LeafNode<String, String> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, String)>>: UnsafeUnpin,
PhantomData<ModelDefinition>: UnsafeUnpin,
impl UnwindSafe for ProviderConfigwhere
RawVecInner: UnwindSafe,
BTreeMap<String, String>: UnwindSafe,
BTreeMap<ThinkingLevel, Option<String>>: UnwindSafe,
NonNull<u8>: 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