mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-26 02:04:37 +08:00
When the user selects 'auto' thinking level for an effort-based reasoning model (Kimi, Doubao) that has thinkingLevelMap but no thinkingFormat, the previous code fell through to `return undefined`, causing pi-agent-core to treat it as 'off' and send reasoning_effort:'none' to the API — silently disabling thinking. pi-ai's clampThinkingLevel only covers EXTENDED_THINKING_LEVELS (no 'auto'), so 'auto' cannot be forwarded verbatim. Return 'high' instead, matching the behavior for thinkingFormat models, to at least enable reasoning. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>