Expand description
Thinking/Reasoning Level Control
Allows users to control how deeply the model reasons per message,
trading speed for depth. Levels range from Off (fastest, most concise)
to Max (deepest reasoning, slowest).
Users can set the level via:
- Inline directive:
/think:highat the start of a message - Agent config:
[agent.thinking]section withdefault_level
Resolution hierarchy (highest priority first):
- Inline directive (
/think:<level>) - Session override (reserved for future use)
- Agent config (
agent.thinking.default_level) - Global default (
Medium)
Structs§
- Resolved
Thinking - Thinking
Config - Configuration for thinking/reasoning level control.
- Thinking
Params - Parameters derived from a thinking level, applied to the LLM request.
Enums§
- Thinking
Level - How deeply the model should reason for a given message.
Functions§
- apply_
thinking_ level - Convert a
ThinkingLevelinto concrete parameters for the LLM request. - apply_
thinking_ level_ with_ config - Convert a
ThinkingLevelinto parameters, resolving native extended thinking from the provided config. - clamp_
temperature - Clamp a temperature value to the valid range
[0.0, 2.0]. - parse_
thinking_ directive - Parse a
/think:<level>directive from the start of a message. - resolve_
thinking_ from_ message - resolve_
thinking_ level - Resolve the effective thinking level using the priority hierarchy:
- validate_
thinking_ config - Validate thinking config at startup. Call once during agent initialization to warn about unrecognized budget_tokens keys.