pub enum Reasoning {
Off,
Effort(ReasoningEffort),
Budget(u32),
}Expand description
What to ask a reasoning-capable model to do with its thinking.
This is a request, not a capability: Some(_) says what the caller wants
and None says nothing at all, leaving the model’s own default alone.
Whether the endpoint can carry it is the provider’s business — a provider
that cannot say this on the wire drops it rather than making every caller
ask first.
Where the model does honour it, its thinking comes back on a separate channel
(LlmResponse::reasoning / LlmStreamEvent::Reasoning).
Variants§
Off
Don’t think — for models that let reasoning be turned off. The one setting a small, fast model usually wants, and the one an effort-only knob cannot express.
Effort(ReasoningEffort)
Think at one of the provider’s named effort levels.
Budget(u32)
Think within a hard budget of reasoning tokens.
Trait Implementations§
impl Copy for Reasoning
Source§impl<'de> Deserialize<'de> for Reasoning
impl<'de> Deserialize<'de> for Reasoning
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Accepts a level ("high") or a token budget (2000) — one parser for
every host, so a bad value is refused the same way with the same message
wherever it was written.