[Bug] Custom command model specification ignored, defaults to Sonnet instead of specified Haiku
Bug Description
i have custom command that in general should analyze my files, stage them and commit. I have used such text on the top of the command file:
---
description: Prompt committing changes to git repository
model: claude-haiku-4-5
---
# Important before all
- You must use `haiku` model for this command execution, not `sonnet` or `opus` because it is a straightforward task.
[...rest of instructions are non-related...]
But the claude code persistently uses "sonnet" (its my settings default) to execute such straightforward task. Asking the claude itself about model usage (within the same session) it responded:
I used Sonnet 4.5, which is incorrect. The /git-commit command explicitly requires using the haiku model for execution since it's a straightforward task, but I didn't switch to it.
This is a mistake - I should have been using Haiku as specified in the command configuration. The instruction says "You must use haiku model for this command execution, not sonnet or opus because it is a straightforward task."
I used claude-haiku-4-5 alias name in the model field in command md file, as per docs:
https://platform.claude.com/docs/en/about-claude/models/overview
But changing to e.g. claude-haiku-4-5-20251001 doesn't change anything
It's a bit irritating, that for simple tasks it uses higher-tier model and ignoring the command instruction about the required model choice. But it follows same file other instructions to the letter though.
---
Environment Info
- Platform: darwin
- Terminal: vscode
- Version: 2.0.64
- Feedback ID: 31cccf4f-8a7e-46cf-9ff3-05c21d22fac3
Errors
[]This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗