/insights command ignores ANTHROPIC_MODEL env var, hardcodes claude-opus-5
Status Open
Reported on v2.1.226
Maintainer reply None cached
Activity 0 comments · opened Aug 10, 2026
Summary
The /insights built-in command hardcodes claude-opus-5 as its model, ignoring the ANTHROPIC_MODEL environment variable and the user's selected model.
Steps to Reproduce
- Set
ANTHROPIC_MODEL=claude-sonnet-4-6in shell environment (e.g..zshrc) - Confirm selected model is Sonnet 4.6 in the Claude Code session
- Run
/insights - Observe API request goes to
claude-opus-5
Expected Behavior
/insights should respect ANTHROPIC_MODEL (or the session-selected model) the same way normal prompts do.
Actual Behavior
The command uses claude-opus-5 regardless of configured model. Confirmed via strings on the binary — buildInsightsResponsePrompt and claude-opus-5 are co-located, indicating the model is pinned at compile time.
Environment
- Claude Code version: 2.1.226
- Platform: macOS (darwin arm64)
ANTHROPIC_MODEL:claude-sonnet-4-6
Impact
Users who configure a specific model (cost, latency, or policy reasons) get silently billed at Opus 5 rates whenever they use /insights. No warning or override mechanism is exposed.