pub enum ThinkingConfig {
Max,
High,
Medium,
Low,
Off,
}Expand description
The thinking/reasoning effort level requested from the model.
Maps to provider-specific parameters via ThinkingConfig::to_thinking_request.
Effort is fixed for a session preference (no adaptive re-scoring). Registry
reasoning_levels drive the picker; models without levels get binary
thinking on/off. Models that do not support reasoning are forced to [Off].
Default preference is [Max] (highest available effort).
Variants§
Max
Maximum reasoning effort (default).
Legacy config/session values "adaptive" / "auto" deserialize as Max.
High
High reasoning effort.
Medium
Medium reasoning effort.
Low
Low reasoning effort.
Off
Thinking/reasoning disabled.
Implementations§
Source§impl ThinkingConfig
impl ThinkingConfig
Sourcepub fn to_thinking_request(self) -> ThinkingRequest
pub fn to_thinking_request(self) -> ThinkingRequest
Produces a normalized ThinkingRequest from this config.
The caller (provider stream layer) converts the normalized fields into the provider-specific wire format.
Sourcepub fn as_config_str(self) -> &'static str
pub fn as_config_str(self) -> &'static str
Config key used in tui.thinking_level / UI labels.
Sourcepub fn from_config_str(value: &str) -> Self
pub fn from_config_str(value: &str) -> Self
Parse a config / registry effort string into a ThinkingConfig.
Unknown values (including legacy "adaptive") fall back to [Max].
Sourcepub fn clamp_to_supported(self, supported: &[ThinkingConfig]) -> Self
pub fn clamp_to_supported(self, supported: &[ThinkingConfig]) -> Self
Clamp this level to one supported by the model (registry reasoning_levels).
Prefers the highest remaining effort; Off is last. Empty supported
leaves the value unchanged.
Trait Implementations§
Source§impl Clone for ThinkingConfig
impl Clone for ThinkingConfig
impl Copy for ThinkingConfig
Source§impl Debug for ThinkingConfig
impl Debug for ThinkingConfig
Source§impl<'de> Deserialize<'de> for ThinkingConfig
impl<'de> Deserialize<'de> for ThinkingConfig
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 ThinkingConfig
Source§impl PartialEq for ThinkingConfig
impl PartialEq for ThinkingConfig
Source§impl Serialize for ThinkingConfig
impl Serialize for ThinkingConfig
impl StructuralPartialEq for ThinkingConfig
Auto Trait Implementations§
impl Freeze for ThinkingConfig
impl RefUnwindSafe for ThinkingConfig
impl Send for ThinkingConfig
impl Sync for ThinkingConfig
impl Unpin for ThinkingConfig
impl UnsafeUnpin for ThinkingConfig
impl UnwindSafe for ThinkingConfig
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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