[BUG] /insights command fails with INVALID_PARAMETER model error
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When running the /insights command, all insight facets fail to generate with an INVALID_PARAMETER error. The error message indicates that the model being used (claude-opus-4-6) is not in the list of accepted model identifiers. All sections (project_areas, interaction_style, what_works, friction_analysis, suggestions, on_the_horizon, fun_ending, at_a_glance) return the same error instead of generating
What Should Happen?
The /insights command should successfully analyze my Claude Code sessions and generate personalized insights across all facets including project areas, interaction style, what works well, friction points, suggestions for improvement, and other sections. The report should contain meaningful AI-generated analysis, not error messages.
Error Messages/Logs
{
"errorId": "INVALID_PARAMETER",
"domain": "app",
"category": "USER",
"message": "Invalid parameter:\"requestBody\" does not match all of the required types [\"model\" must be one of [hubgpt-chat-completions-sonnet-3-5, hubgpt-chat-completions-sonnet-3-7,
hubgpt-chat-completions-sonnet-4, hubgpt-chat-completions-claude-sonnet-4, hubgpt-chat-completions-claude-sonnet-4.5, hubgpt-chat-completions-claude-sonnet-4-5,
hubgpt-chat-completions-claude-sonnet-3-7, claude-3-5-haiku-20241022, claude-3-5-haiku-latest, claude-sonnet-4-20250514, claude-sonnet-4-latest, claude-sonnet-4.5, claude-sonnet-4-5]]",
"longMessage": "Invalid parameter:\"requestBody\" does not match all of the required types [\"model\" must be one of [hubgpt-chat-completions-sonnet-3-5,
hubgpt-chat-completions-sonnet-3-7, hubgpt-chat-completions-sonnet-4, hubgpt-chat-completions-claude-sonnet-4, hubgpt-chat-completions-claude-sonnet-4.5,
hubgpt-chat-completions-claude-sonnet-4-5, hubgpt-chat-completions-claude-sonnet-3-7, claude-3-5-haiku-20241022, claude-3-5-haiku-latest, claude-sonnet-4-20250514, claude-sonnet-4-latest,
claude-sonnet-4.5, claude-sonnet-4-5]]",
"statusCode": 400
}
Steps to Reproduce
- Have an active Claude Code installation with usage history (multiple sessions with messages and commits)
- Run the
/insightscommand in any Claude Code session - Wait for the insights report to generate
- Observe that all insight facets return INVALID_PARAMETER errors
- Check the generated HTML report at ~/.claude/usage-data/report.html - all sections will be empty
- The raw stats (session count, message count, etc.) display correctly, but all AI-generated narrative sections fail
Claude Model
Sonnet (default)
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.38 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
The error suggests that the insights generation system is attempting to use the model ID claude-opus-4-6,
but this identifier is not in the API's accepted model list. The accepted list includes variations like
claude-sonnet-4-latest, claude-sonnet-4.5, claude-sonnet-4-5, etc., but not claude-opus-4-6.
This appears to be a model configuration mismatch in the insights generation code. The issue affects 100%
of insight facet generation, making the feature essentially non-functional.
Generated report path: ~/.claude/usage-data/report.html
Session data analyzed: 52 sessions, 222 messages, 426h, 40 commits (2025-12-23 to 2026-02-10)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗