pub struct ProviderProfile {
pub name: &'static str,
pub base_url: &'static str,
pub api_key_env: &'static str,
pub key_hint: Option<&'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.
key_hint: Option<&'static str>Where to get an API key, appended to the “missing key” error so the
message is actionable. None falls back to just naming the env var.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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