pub struct FireworksProvider;Expand description
Provider for Fireworks-hosted models (fireworks/* slugs), served behind the
OpenAI-compatible /chat/completions schema.
Why: gives build_request a Fireworks-correct normalisation profile so the
wire payload matches what Fireworks accepts (no OpenRouter-only directives).
What: zero-sized marker type implementing Provider.
Test: fireworks::tests::*.
Implementations§
Trait Implementations§
Source§impl Clone for FireworksProvider
impl Clone for FireworksProvider
Source§fn clone(&self) -> FireworksProvider
fn clone(&self) -> FireworksProvider
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FireworksProvider
impl Debug for FireworksProvider
Source§impl Default for FireworksProvider
impl Default for FireworksProvider
Source§fn default() -> FireworksProvider
fn default() -> FireworksProvider
Source§impl Provider for FireworksProvider
impl Provider for FireworksProvider
Source§fn map_tool_choice(&self, choice: ToolChoice) -> Value
fn map_tool_choice(&self, choice: ToolChoice) -> Value
Translate a neutral ToolChoice into OpenAI-dialect wire JSON.
Why: Fireworks uses the OpenAI tool_choice spelling (string policies +
{type:function, function:{name}} object), identical to OpenRouter.
What: the OpenAI mapping.
Test: fireworks::tests::map_tool_choice_scalars.
Source§fn extract_usage(&self, response: &ChatResponse) -> TokenUsage
fn extract_usage(&self, response: &ChatResponse) -> TokenUsage
Extract canonical token usage from a Fireworks response.
Why: Fireworks returns the standard OpenAI usage block, already
normalised into ChatResponse.usage by the shared adapter’s parse.
What: delegates to ChatResponse::token_usage (identical to the other
OpenAI-dialect providers).
Test: fireworks::tests::extract_usage_maps_fields.
Source§fn supports_native_tools(&self) -> bool
fn supports_native_tools(&self) -> bool
Source§fn supports_prompt_caching(&self) -> bool
fn supports_prompt_caching(&self) -> bool
cache_control
prompt-cache breakpoints (#2156). Read moreSource§fn wants_detailed_usage(&self) -> bool
fn wants_detailed_usage(&self) -> bool
Auto Trait Implementations§
impl Freeze for FireworksProvider
impl RefUnwindSafe for FireworksProvider
impl Send for FireworksProvider
impl Sync for FireworksProvider
impl Unpin for FireworksProvider
impl UnsafeUnpin for FireworksProvider
impl UnwindSafe for FireworksProvider
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