Skip to content

Model selection priority broken #17783

@gheljenor

Description

@gheljenor

Description

According to docs, --model argument from CLI has highest priority. But if i specify any model in my agent/command markdown, they always run with specified model, ignoring any --model provided.

Plugins

No response

OpenCode version

1.2.6

Steps to reproduce

  1. create .opencode/commands/my-command.md with content
---
description: Debug command
model: kimi/deepseek-ai/deepseek-v3.1
---

Say hello
  1. run opencode run --command my-command --model "kimi/deepseek-ai/deepseek-r1"

It will run with kimi/deepseek-ai/deepseek-v3.1 model

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions