Skip to main content

Module thinking

Module thinking 

Expand description

Thinking/Reasoning Level Control

Structs§

ResolvedThinking
ThinkingConfig
Configuration for thinking/reasoning level control.
ThinkingParams
Parameters derived from a thinking level, applied to the LLM request.

Enums§

ThinkingLevel
How deeply the model should reason for a given message.

Functions§

apply_thinking_level
Convert a ThinkingLevel into concrete parameters for the LLM request.
apply_thinking_level_with_config
Convert a ThinkingLevel into 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
resolve_thinking_from_message
resolve_thinking_level
strip_thinking_directive
validate_thinking_config
Validate thinking config at startup. Call once during agent initialization to warn about unrecognized budget_tokens keys.