'model' field in slash command appears to be ignored [Version: 0.6.4] #1634

Closed
opened 2026-02-16 17:31:50 -05:00 by yindo · 3 comments
Owner

Originally created by @Sewer56 on GitHub (Sep 6, 2025).

Originally assigned to: @rekram1-node on GitHub.

Image Image

Description

The model field in slash command YAML frontmatter appears to be ignored, causing commands to fall back to the default model without any user notification.

This is documented in the [commands[(https://opencode.ai/docs/commands/) section of the docs, suggesting that the docs are out of sync.

Steps to Reproduce

  1. Create .opencode/command/test.md:

    ---
    description: "Test command with specific model"
    agent: plan
    model: cerebras/qwen-3-coder-480b
    ---
    
    This is a test command.
    
  2. Run the command: /test

  3. Observe that the command executes with the default model instead of the specified model

Tested with cerebras/qwen-3-coder-480b, github-copilot/claude-sonnet-4 and anthropic/claude-sonnet-4-20250514. Neither of the 3 models worked in the 'model' field.

Originally created by @Sewer56 on GitHub (Sep 6, 2025). Originally assigned to: @rekram1-node on GitHub. <img width="1192" height="261" alt="Image" src="https://github.com/user-attachments/assets/3dd34551-e32a-4e03-8b3e-bc5b0f50879c" /> <img width="1320" height="148" alt="Image" src="https://github.com/user-attachments/assets/a7502791-0cf1-44ea-b6f1-b44672b6e77f" /> ### Description The `model` field in slash command YAML frontmatter appears to be ignored, causing commands to fall back to the default model without any user notification. This is documented in the [commands[(https://opencode.ai/docs/commands/) section of the docs, suggesting that the docs are out of sync. ### Steps to Reproduce 1. Create `.opencode/command/test.md`: ```markdown --- description: "Test command with specific model" agent: plan model: cerebras/qwen-3-coder-480b --- This is a test command. ``` 2. Run the command: `/test` 3. Observe that the command executes with the default model instead of the specified model Tested with `cerebras/qwen-3-coder-480b`, `github-copilot/claude-sonnet-4` and `anthropic/claude-sonnet-4-20250514`. Neither of the 3 models worked in the 'model' field.
yindo closed this issue 2026-02-16 17:31:50 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Sep 6, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #2460: 'model' field in slash command appears to be ignored [Version: 0.6.4] - This is an identical issue with the same title, description, and steps to reproduce that was recently closed
  • #2335: Chosen model is not used for command - This was about the model selection being ignored when running custom commands, which appears to be related to the same underlying issue with model field handling

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Sep 6, 2025): This issue might be a duplicate of existing issues. Please check: - #2460: 'model' field in slash command appears to be ignored [Version: 0.6.4] - This is an identical issue with the same title, description, and steps to reproduce that was recently closed - #2335: Chosen model is not used for command - This was about the model selection being ignored when running custom commands, which appears to be related to the same underlying issue with model field handling Feel free to ignore if none of these address your specific case.
Author
Owner

@Sewer56 commented on GitHub (Sep 6, 2025):

NOT a duplicate of #2335. This is the opposite issue.
I accidentally fell for the bot message and closed last one- oops.

Rather than the model selected not being used in commands- here the model override defined in commands is not being used.

I haven't yet bisected to determine if the fix for 2335 is the cause, or whatever other commit it may be- I'm currently travelling 😅, hence have not yet started proper debugging.

@Sewer56 commented on GitHub (Sep 6, 2025): NOT a duplicate of [#2335](https://github.com/sst/opencode/issues/2335). This is the opposite issue. I accidentally fell for the bot message and closed last one- oops. Rather than the model selected not being used in commands- here the model override defined in commands is not being used. I haven't yet bisected to determine if the fix for 2335 is the cause, or whatever other commit it may be- I'm currently travelling 😅, hence have not yet started proper debugging.
Author
Owner

@rekram1-node commented on GitHub (Sep 6, 2025):

I just fixed this yesterday: https://github.com/sst/opencode/pull/2448

will ship w/ next release

@rekram1-node commented on GitHub (Sep 6, 2025): I just fixed this yesterday: https://github.com/sst/opencode/pull/2448 will ship w/ next release
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1634