#[non_exhaustive]pub enum BodyRewrite {
None,
HuggingFaceRouter,
DeepSeek,
Mira,
Perplexity,
Mistral,
LlamaCpp,
Moonshot,
OpenRouter,
Ollama,
}Expand description
Dialect-specific transformation of the serialized chat request.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
None
Send the OpenAI-compatible body unchanged.
HuggingFaceRouter
Hugging Face’s router: qualify the model identifier for sub-providers that demand one (Fireworks).
DeepSeek
DeepSeek: forced tool choices dropped while the model thinks. Its
reasoning field is Quirks::reasoning_field.
Mira
Mira’s gateway: content-part arrays flattened to strings.
Perplexity
Perplexity: text-only content arrays sent as one string.
Mistral
Mistral: the forced tool choice relaxed to auto beside a structured
response format, and its own content chunks.
LlamaCpp
llama.cpp: refuse a specific-function tool choice, which
llama-server silently treats as auto.
Moonshot
Moonshot: refuse a specific-function tool choice and coerce
required to auto with a steering message.
OpenRouter
OpenRouter: model ids name the upstream vendor (anthropic/...),
which decides what a request carries.
Ollama
Ollama’s OpenAI-compatible API: a refusal of num_ctx and
options, which only the native route can send.
Trait Implementations§
Source§impl Clone for BodyRewrite
impl Clone for BodyRewrite
impl Copy for BodyRewrite
Source§impl Debug for BodyRewrite
impl Debug for BodyRewrite
impl Eq for BodyRewrite
Source§impl PartialEq for BodyRewrite
impl PartialEq for BodyRewrite
impl StructuralPartialEq for BodyRewrite
Auto Trait Implementations§
impl Freeze for BodyRewrite
impl RefUnwindSafe for BodyRewrite
impl Send for BodyRewrite
impl Sync for BodyRewrite
impl Unpin for BodyRewrite
impl UnsafeUnpin for BodyRewrite
impl UnwindSafe for BodyRewrite
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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