#[non_exhaustive]pub enum ReasoningEffort {
Low,
Medium,
High,
}Expand description
A PORTABLE reasoning-effort intent — one canonical knob every reasoning-capable
dialect spells differently, lifted out of extra so each adapter owns its
projection (the same rule as ToolChoice/parallel_tool_calls). serde lowercase,
so "low"/"medium"/"high" on the wire and in config (providers.md §6).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Implementations§
Source§impl ReasoningEffort
impl ReasoningEffort
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
The string spelling for the dialects that take an effort string (OpenAI
Responses reasoning.effort, OpenAI Chat reasoning_effort).
Sourcepub fn budget(self) -> u32
pub fn budget(self) -> u32
The SHARED effort→thinking-token-budget table (providers.md §6) for the
budget dialects (Anthropic thinking.budget_tokens, Google thinkingBudget).
Low is the Anthropic minimum (1024), so every rung clears the floor.
Sourcepub fn floor(self) -> u32
pub fn floor(self) -> u32
The least max_tokens a budget dialect can carry this effort under: the
budget plus [REASONING_HEADROOM] for the answer. Both budget wires carve the
thinking budget OUT of the output cap (Anthropic 400s on max_tokens <= budget_tokens; Gemini silently spends the cap on thoughts and truncates the
answer — providers.md §6), so this is a property of the budget, not of a dialect.
Trait Implementations§
Source§impl Clone for ReasoningEffort
impl Clone for ReasoningEffort
impl Copy for ReasoningEffort
Source§impl Debug for ReasoningEffort
impl Debug for ReasoningEffort
Source§impl<'de> Deserialize<'de> for ReasoningEffort
impl<'de> Deserialize<'de> for ReasoningEffort
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 ReasoningEffort
Source§impl FromStr for ReasoningEffort
impl FromStr for ReasoningEffort
Source§impl PartialEq for ReasoningEffort
impl PartialEq for ReasoningEffort
Source§impl Serialize for ReasoningEffort
impl Serialize for ReasoningEffort
impl StructuralPartialEq for ReasoningEffort
Auto Trait Implementations§
impl Forget for ReasoningEffort
impl Freeze for ReasoningEffort
impl Move for ReasoningEffort
impl RefUnwindSafe for ReasoningEffort
impl Send for ReasoningEffort
impl Sync for ReasoningEffort
impl Unpin for ReasoningEffort
impl UnsafeUnpin for ReasoningEffort
impl UnwindSafe for ReasoningEffort
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,
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§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.