pub enum ReasoningLevel {
Off,
Adaptive,
Low,
Medium,
High,
XHigh,
Max,
Ultra,
UltraCode,
}Expand description
A named reasoning / thinking depth level.
Ordering is from least to most intensive; Off < Adaptive < Low < … < Ultra.
Variants§
Off
No reasoning / thinking output.
Adaptive
Model decides reasoning depth automatically (Anthropic adaptive path).
Low
Low reasoning budget.
Medium
Medium reasoning budget.
High
High reasoning budget.
XHigh
Extra-high reasoning budget (above high, below max).
Max
Maximum named level (below ultra).
Ultra
Ultra — highest intensity, only a subset of Codex models supports this.
UltraCode
Anthropic-only logical xhigh plus standing workflow mode.
Implementations§
Source§impl ReasoningLevel
impl ReasoningLevel
Sourcepub fn parse(s: &str) -> Option<ReasoningLevel>
pub fn parse(s: &str) -> Option<ReasoningLevel>
Parse a level from its canonical logical/config string.
Returns None for unknown strings; callers must not silently fallback.
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
The canonical logical/config representation.
Provider request planners own wire conversion. In particular, Codex
logical Ultra uses the exact catalog’s multi-agent wire effort (e.g.
Astra xhigh, Sol max) plus foreground proactive mode.
Sourcepub fn to_legacy_budget(self) -> Option<u32>
pub fn to_legacy_budget(self) -> Option<u32>
Convert to the legacy Anthropic token budget used by the enabled+budget_tokens
request shape. Returns None for levels that have no meaningful numeric
mapping (Max and Ultra are Codex execution modes, not numeric budgets).
Sourcepub fn from_legacy_budget(budget: u32) -> ReasoningLevel
pub fn from_legacy_budget(budget: u32) -> ReasoningLevel
Build from a legacy token budget value (Anthropic path).
0 → Adaptive, positive values → their tier. Does not produce Max
or Ultra — those are provider-named levels, never inferred from a budget.
Sourcepub fn requires_codex_support(self) -> bool
pub fn requires_codex_support(self) -> bool
All levels that are strictly above XHigh (require Codex-specific support).
Sourcepub fn requires_anthropic_support(self) -> bool
pub fn requires_anthropic_support(self) -> bool
Whether this level requires exact Anthropic mode capability evidence.
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 Display for ReasoningLevel
impl Display for ReasoningLevel
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,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ReasoningLevel
impl PartialEq for ReasoningLevel
Source§impl PartialOrd for ReasoningLevel
impl PartialOrd for ReasoningLevel
impl StructuralPartialEq 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
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
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<'a, T> Prefix<&'a [T], T> for T
impl<'a, T> Prefix<&'a [T], T> for T
Source§fn take_prefix(&self, haystack: &'a [T]) -> Option<(T, &'a [T])>
fn take_prefix(&self, haystack: &'a [T]) -> Option<(T, &'a [T])>
Source§fn skip_prefix(&self, haystack: Parent) -> Option<Parent>
fn skip_prefix(&self, haystack: Parent) -> Option<Parent>
impl<T> ThreadSafetyMarker for Twhere
T: Send,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more