pub struct ProviderProfile {
pub name: &'static str,
pub base_url: &'static str,
pub api_key_env: &'static str,
pub extra_headers: &'static [(&'static str, &'static str)],
pub reasoning_strategy: ReasoningStrategy,
pub reasoning_extraction: ReasoningExtraction,
pub max_tokens_param: MaxTokensParam,
pub disable_parallel_tool_calls_for: &'static [&'static str],
}Expand description
Static description of one OpenAI-compatible provider.
Fields§
§name: &'static strProvider identifier as it appears in model IDs (e.g. "groq" for
groq/qwen-qwq-32b). Lowercased; matched case-insensitively.
base_url: &'static strDefault base URL for /chat/completions and friends. The trailing
/v1 (or equivalent) is included so adapter code just appends
/chat/completions etc.
api_key_env: &'static strDefault env var holding the API key. User config can override.
extra_headers: &'static [(&'static str, &'static str)]Headers always sent in addition to Authorization: Bearer ....
OpenRouter requires HTTP-Referer + X-Title for its analytics
dashboard; everyone else uses an empty list.
reasoning_strategy: ReasoningStrategyHow to render ReasoningLevel into the request body.
reasoning_extraction: ReasoningExtractionWhere reasoning content lives in the streaming response.
max_tokens_param: MaxTokensParamWhich completion-budget parameter this provider accepts in
/chat/completions.
disable_parallel_tool_calls_for: &'static [&'static str]Model IDs that support tools but must be forced to single tool-call mode because the provider default enables unsupported parallel calls.
Trait Implementations§
Source§impl Clone for ProviderProfile
impl Clone for ProviderProfile
Source§fn clone(&self) -> ProviderProfile
fn clone(&self) -> ProviderProfile
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ProviderProfile
impl RefUnwindSafe for ProviderProfile
impl Send for ProviderProfile
impl Sync for ProviderProfile
impl Unpin for ProviderProfile
impl UnsafeUnpin for ProviderProfile
impl UnwindSafe for ProviderProfile
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