Skip to main content

Module thinking

Module thinking 

Source
Expand description

Thinking configuration and utilities Translated from /data/home/swei/claudecode/openclaudecode/src/utils/config.ts (thinking section) and /data/home/swei/claudecode/openclaudecode/src/utils/thinking.ts

Enums§

ThinkingConfig
Thinking configuration types

Functions§

find_thinking_trigger_positions
Find positions of “ultrathink” keyword in text for UI highlighting/notification Returns a vector of (word, start, end) tuples
has_ultrathink_keyword
Check if text contains the “ultrathink” keyword (case insensitive, word boundary)
is_ultrathink_enabled
Check if ultrathink is enabled This checks the build-time feature flag and runtime GrowthBook flag Note: In Rust, we use environment variable AI_ULTRATHINK instead of bun:bundle feature
model_supports_adaptive_thinking
Check if model supports adaptive thinking Adaptive thinking is supported by a subset of Claude 4 models
model_supports_thinking
Provider-aware thinking support detection Note: This references getCanonicalName and getAPIProvider which need model utilities
should_enable_thinking_by_default
Check if thinking should be enabled by default