Model selection in /command incorrectly changes the default model #5775

Closed
opened 2026-02-16 17:56:40 -05:00 by yindo · 0 comments
Owner

Originally created by @isomoes on GitHub (Jan 14, 2026).

Originally assigned to: @rekram1-node on GitHub.

Bug Description

When executing a /command that specifies a different model than the current default, after the command completes, the default model setting is incorrectly changed to the model specified in the command.

Steps to Reproduce

  1. Select a default model (e.g., glm-4.7) in OpenCode settings
  2. Use a /command that specifies a different model with open subtask: true, for example:
    /command zhipuai-coding-plan/glm-4.6 open subtask: true
    
  3. Wait for the command to finish running
  4. Check the default model setting

Expected Behavior

The default model should remain as glm-4.7 (the originally selected model). The model specified in the command (glm-4.6) should only be used for that specific subtask execution.

Actual Behavior

The default model setting changes from glm-4.7 to glm-4.6 after the command completes.

Impact

Users lose their preferred default model setting when using commands that specify different models, requiring them to manually reset their preferred model after each command execution.

Environment

  • OpenCode (1.1.19)

Ref

Originally created by @isomoes on GitHub (Jan 14, 2026). Originally assigned to: @rekram1-node on GitHub. ## Bug Description When executing a `/command` that specifies a different model than the current default, after the command completes, the default model setting is incorrectly changed to the model specified in the command. ## Steps to Reproduce 1. Select a default model (e.g., `glm-4.7`) in OpenCode settings 2. Use a `/command` that specifies a different model with `open subtask: true`, for example: ``` /command zhipuai-coding-plan/glm-4.6 open subtask: true ``` 3. Wait for the command to finish running 4. Check the default model setting ## Expected Behavior The default model should remain as `glm-4.7` (the originally selected model). The model specified in the command (`glm-4.6`) should only be used for that specific subtask execution. ## Actual Behavior The default model setting changes from `glm-4.7` to `glm-4.6` after the command completes. ## Impact Users lose their preferred default model setting when using commands that specify different models, requiring them to manually reset their preferred model after each command execution. ## Environment - OpenCode (1.1.19) ## Ref - https://github.com/anomalyco/opencode/pull/6668
yindo closed this issue 2026-02-16 17:56:40 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#5775