pub struct ProviderConfig {
pub derives: Option<String>,
pub api_protocol: Option<ApiProtocol>,
pub api_base: Option<String>,
pub api_key: Option<String>,
pub auth: Option<AuthConfig>,
pub env_prefix: Option<String>,
pub default_headers: Option<HashMap<String, String>>,
pub models: Option<HashMap<String, ModelInfo>>,
pub bridge: Option<bool>,
}Expand description
Configuration for a single provider.
All fields are Option so that partial overlays via derives work correctly:
only the fields the user explicitly sets will override the parent.
Fields§
§derives: Option<String>Inherit from another provider.
api_protocol: Option<ApiProtocol>The API protocol / adapter to use.
api_base: Option<String>Base URL for the upstream API.
api_key: Option<String>Default API key.
auth: Option<AuthConfig>Auth configuration override (e.g. custom auth methods).
env_prefix: Option<String>Environment variable prefix for auto-loading
{PREFIX}_API_KEY / {PREFIX}_BASE_URL.
default_headers: Option<HashMap<String, String>>Extra default HTTP headers sent with every request.
models: Option<HashMap<String, ModelInfo>>Per-model metadata and pricing catalog.
Keys are upstream model IDs (e.g. "gpt-4o"). Values carry optional
display name, description, context length, supported modalities, and
token pricing.
bridge: Option<bool>When true, this MCP provider is also exposed as a standalone
Streamable HTTP endpoint at POST /mcp/{name} and GET /mcp/{name}/sse.
Trait Implementations§
Source§impl Clone for ProviderConfig
impl Clone for ProviderConfig
Source§fn clone(&self) -> ProviderConfig
fn clone(&self) -> ProviderConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProviderConfig
impl Debug for ProviderConfig
Source§impl Default for ProviderConfig
impl Default for ProviderConfig
Source§fn default() -> ProviderConfig
fn default() -> 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>,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more