[BUG] Claude code fails when I set a model to use for custom commands

Resolved 💬 3 comments Opened Aug 11, 2025 by rezaalavi Closed Aug 12, 2025

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: Claude Code
  • Claude CLI version: 1.0.72 (Claude Code)-->
  • Operating System: Arch Linux
  • Terminal: Kitty

Bug Description

I defined a new command and set the model in front matter to sonnet following the instruction from https://docs.anthropic.com/en/docs/claude-code/slash-commands

The command returns an invalid model name error:
API Error: 404 {"type":"error","error":{"type":"not_found_error","message":"model:
Sonnet"}}

Expected Behavior

To use sonnet for this command

Actual Behavior

Return API Error: 404 {"type":"error","error":{"type":"not_found_error","message":"model:
Sonnet"}}
And the task fails

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗