pub enum ReasoningStrategy {
None,
Effort,
OpenRouterShape,
}Expand description
How to put ReasoningLevel onto the wire for a given provider.
Variants§
None
Provider exposes no reasoning controls (Together, DeepInfra pass-through). Adapter sends nothing extra.
Effort
Standard reasoning_effort: "low"|"medium"|"high" field
(OpenAI Chat Completions, Groq for gpt-oss, Cerebras for
gpt-oss-120b, Fireworks for Qwen 3, etc.).
OpenRouterShape
OpenRouter’s normalized reasoning: {effort: "..."} nested
object. Supports low, medium, high, max. None becomes
{exclude: true} (suppresses reasoning).
Implementations§
Source§impl ReasoningStrategy
impl ReasoningStrategy
Sourcepub fn render(&self, level: ReasoningLevel) -> Option<Value>
pub fn render(&self, level: ReasoningLevel) -> Option<Value>
Render a ReasoningLevel to the JSON fragment that should be
merged into the /chat/completions request body. Returns None
if there’s nothing to add (strategy is None, or the level is
None for a provider that signals via field omission).
Trait Implementations§
Source§impl Clone for ReasoningStrategy
impl Clone for ReasoningStrategy
Source§fn clone(&self) -> ReasoningStrategy
fn clone(&self) -> ReasoningStrategy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ReasoningStrategy
Source§impl Debug for ReasoningStrategy
impl Debug for ReasoningStrategy
impl Eq for ReasoningStrategy
Source§impl PartialEq for ReasoningStrategy
impl PartialEq for ReasoningStrategy
Source§fn eq(&self, other: &ReasoningStrategy) -> bool
fn eq(&self, other: &ReasoningStrategy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ReasoningStrategy
Auto Trait Implementations§
impl Freeze for ReasoningStrategy
impl RefUnwindSafe for ReasoningStrategy
impl Send for ReasoningStrategy
impl Sync for ReasoningStrategy
impl Unpin for ReasoningStrategy
impl UnsafeUnpin for ReasoningStrategy
impl UnwindSafe for ReasoningStrategy
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
Mutably borrows from an owned value. Read more
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
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>
Converts
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>
Converts
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