pub enum ReasoningLevel {
None,
Minimal,
Low,
Medium,
High,
XHigh,
Max,
}Expand description
Reasoning depth requested for a model call.
Default is Medium — matches OpenAI’s reasoning_effort default and
is the level that produces useful chain-of-thought without burning
excessive latency / tokens for routine prompts.
String form is lowercase ("none", "minimal", "low", "medium",
"high", "max") so config files and CLI flags read naturally.
ValueEnum is derived so clap can parse --reasoning <level>
directly from the user-facing strings — no custom parser layer.
Variants§
None
Reasoning explicitly disabled. On providers that always reason (Grok 4, deepseek-reasoner direct), maps to “lowest available”.
Minimal
Minimum reasoning the provider exposes. OpenAI GPT-5 calls this
minimal; absent on most other providers (collapses to None or
Low).
Low
Light reasoning for simple multi-step prompts.
Medium
The default. Useful chain-of-thought without excessive cost.
High
Heavy reasoning for hard prompts.
XHigh
Between High and Max — OpenAI GPT-5.2+ xhigh, Anthropic Opus 4.7
xhigh (gated per-model). A step up from High for providers that
expose a dedicated xhigh tier. Providers without it snap down via
nearest_effort to High.
Max
Maximum reasoning the model exposes. Anthropic’s adaptive max,
OpenRouter’s max. On OpenAI Chat Completions Effort this collapses
to high (no max tier in that shape); on Gemini 3 collapses to
high (no max tier there either).
Implementations§
Trait Implementations§
Source§impl Clone for ReasoningLevel
impl Clone for ReasoningLevel
Source§fn clone(&self) -> ReasoningLevel
fn clone(&self) -> ReasoningLevel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ReasoningLevel
Source§impl Debug for ReasoningLevel
impl Debug for ReasoningLevel
Source§impl Default for ReasoningLevel
impl Default for ReasoningLevel
Source§fn default() -> ReasoningLevel
fn default() -> ReasoningLevel
Source§impl<'de> Deserialize<'de> for ReasoningLevel
impl<'de> Deserialize<'de> for ReasoningLevel
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ReasoningLevel
Source§impl Hash for ReasoningLevel
impl Hash for ReasoningLevel
Source§impl Ord for ReasoningLevel
impl Ord for ReasoningLevel
Source§fn cmp(&self, other: &ReasoningLevel) -> Ordering
fn cmp(&self, other: &ReasoningLevel) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ReasoningLevel
impl PartialEq for ReasoningLevel
Source§impl PartialOrd for ReasoningLevel
impl PartialOrd for ReasoningLevel
Source§impl Serialize for ReasoningLevel
impl Serialize for ReasoningLevel
impl StructuralPartialEq for ReasoningLevel
Source§impl ValueEnum for ReasoningLevel
impl ValueEnum for ReasoningLevel
Auto Trait Implementations§
impl Freeze for ReasoningLevel
impl RefUnwindSafe for ReasoningLevel
impl Send for ReasoningLevel
impl Sync for ReasoningLevel
impl Unpin for ReasoningLevel
impl UnsafeUnpin for ReasoningLevel
impl UnwindSafe for ReasoningLevel
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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<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