fix: gate extended thinking to Opus models only
Haiku (and Sonnet) reject the thinking parameter - only claude-opus-*
supports adaptive thinking. Guard at two layers:
- chatTools.ts: derive enableThinking from selectedModel.startsWith("claude-opus")
so the flag is false for Quick (Haiku) and true for Deep/Draft (Opus)
- claude.ts: secondary guard on both the flag and model name so a
misconfigured caller can never send thinking to a non-Opus model;
same guard on the stream.on("thinking") listener for consistency
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| Repository | Davemaina1/iroh_ |
|---|---|
| Author | Davemaina1 <dmain7015@gmail.com> |
| Authored | |
| Parents | 1f973e7d |
| Stats | 2 files changed , +6 , -6 |
| Part of | Claude-only provider lock-in (no Gemini, Opus-gated thinking) |
Capture this commit into my fork
Download a Markdown prompt that tells Claude how to port this
exact commit into your working tree. Run it via
claude -p < capture-commit-4fbd7517.md
from inside the repo you want the change in.