Skip to main content

fluers_core/
thinking.rs

1//! Model reasoning effort ("thinking") configuration.
2//!
3//! Mirrors `ThinkingLevel` from `pi-agent-core`.
4
5use serde::{Deserialize, Serialize};
6
7/// How much extended reasoning the model should emit.
8///
9/// `Off` disables it, `Minimal` keeps it brief, `High` asks for thorough
10/// reasoning. The agent loop maps this onto provider-specific knobs.
11#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize)]
12#[serde(rename_all = "lowercase")]
13pub enum ThinkingLevel {
14    /// No extended reasoning.
15    Off,
16    /// Brief reasoning.
17    Minimal,
18    /// (default) Balanced reasoning.
19    #[default]
20    Medium,
21    /// Thorough reasoning.
22    High,
23}
24
25impl ThinkingLevel {
26    /// Returns `true` when reasoning is enabled at all.
27    #[must_use]
28    pub const fn is_enabled(self) -> bool {
29        !matches!(self, Self::Off)
30    }
31}