Support model selection via text prompt syntax (e.g., /model sonnet-5)
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Currently, switching between different models (e.g., Sonnet or Haiku) in Claude Code requires exiting the active prompt workflow to change configuration settings or restarting the CLI with different flags. This creates friction when a user wants to quickly test how a different model handles a specific prompt, benchmark responses, or optimize token usage on the fly without disrupting their current terminal session.
Proposed Solution
Introduce a inline command or syntax prefix/suffix directly within the text prompt to temporarily or permanently switch models for that interaction.
For example:
- Using a slash command before the prompt:
/model sonnet-5 Explain this code blocks structure. - Using a trailing flag:
Refactor this function --model fable-5
This feature would allow seamless, dynamic model selection instantly within the regular prompt flow, significantly improving developer velocity and testing flexibility.
Alternative Solutions
_No response_
Priority
Critical - Blocking my work
Feature Category
CLI commands and flags
Use Case Example
_No response_
Additional Context
_No response_