Allow custom slash commands to switch default model
Feature Request
Allow custom slash commands to execute built-in commands like /model haiku or provide a mechanism to change the session's default model programmatically.
Use case: Creating shortcut commands like /h that can both:
- Switch default model to haiku when run without args
- Run a one-off query with haiku when given args
Current behavior: The model: frontmatter in slash commands only affects that command's execution model, not the session default. Editing settings.json doesn't take effect until restart.
Desired behavior: Either:
- Live-reload
settings.jsonwhen modified - Expose a mechanism for slash commands to call built-in commands
- Add a
switch_model:frontmatter option that persists the change
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/7795
- https://github.com/anthropics/claude-code/issues/4937
- https://github.com/anthropics/claude-code/issues/12645
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
This issue has been automatically closed as a duplicate of #7795.
If this is incorrect, please re-open this issue or create a new one.
🤖 Generated with Claude Code
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.