[BUG] Using --prompt causes the wrong model to be selected. #5936

Open
opened 2026-02-16 17:58:32 -05:00 by yindo · 0 comments
Owner

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

Originally assigned to: @rekram1-node on GitHub.

Description

When you just run opencode, it launches with the default model which the user has selected. This is good.

But when you then run opencode --prompt "What is this repo?", instead of exactly the same behavior but with the prompt, it launches with Gemini 3 Pro via Github as the provider.

Adding --prompt has nothing to do with the model. So forcing this model which will often fail, is an undesirable and unrelated outcome that appears to be a bug.

Plugins

No response

OpenCode version

1.1.20

Steps to reproduce

opencode --prompt "What is this repo?"

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @arkaydeus on GitHub (Jan 14, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description When you just run `opencode`, it launches with the default model which the user has selected. This is good. But when you then run `opencode --prompt "What is this repo?"`, instead of exactly the same behavior but with the prompt, it launches with Gemini 3 Pro via Github as the provider. Adding `--prompt` has nothing to do with the model. So forcing this model which will often fail, is an undesirable and unrelated outcome that appears to be a bug. ### Plugins _No response_ ### OpenCode version 1.1.20 ### Steps to reproduce opencode --prompt "What is this repo?" ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the bug label 2026-02-16 17:58:32 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#5936