Can't select openrouter models from cli or config in 1.0 #2554

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

Originally created by @jdanbrown on GitHub (Nov 3, 2025).

Originally assigned to: @rekram1-node on GitHub.

Description

1. Bug: Can't select an openrouter model from cli

Worked in 0.15.31:

$ opencode -m openrouter/google/gemini-2.5-pro
# UI shows model "OpenRouter Gemini 2.5 Pro"

$ opencode -m openrouter/openai/gpt-5
# UI shows model "OpenRouter GPT-5"

$ opencode -m openrouter/anthropic/claude-sonnet-4.5
# UI shows model "OpenRouter Claude Sonnet 4.5"

Broken in 1.0.18:

$ opencode -m openrouter/google/gemini-2.5-pro
# UI shows error "Model openrouter/google is not valid", and defaults to last-used model

$ opencode -m openrouter/openai/gpt-5
# UI shows error "Model openrouter/openai is not valid", and defaults to last-used model

$ opencode -m openrouter/anthropic/claude-sonnet-4.5
# UI shows error "Model openrouter/anthropic is not valid", and defaults to last-used model

2. Bug: Can't select an openrouter model from config

Broken in 1.0.18:

// opencode.jsonc
{
  "model": "openrouter/openai/gpt-5",
}
$ opencode
# UI silently ignores "model", and defaults to last-used model

3. Works: Can select an openrouter model from /models in the UI

Works in 1.0.18:

$ opencode
# /models → "openrouter gpt-5" → enter
# The UI correctly shows "OpenRouter GPT-5", and https://openrouter.ai/activity confirms opencode is using it

### OpenCode version

1.0.18

### Steps to reproduce

(above)

### Screenshot and/or share link

_No response_

### Operating System

macOS 15.5

### Terminal

VS Code terminal
Originally created by @jdanbrown on GitHub (Nov 3, 2025). Originally assigned to: @rekram1-node on GitHub. ### Description ### 1. Bug: Can't select an openrouter model from cli Worked in 0.15.31: ```sh $ opencode -m openrouter/google/gemini-2.5-pro # UI shows model "OpenRouter Gemini 2.5 Pro" $ opencode -m openrouter/openai/gpt-5 # UI shows model "OpenRouter GPT-5" $ opencode -m openrouter/anthropic/claude-sonnet-4.5 # UI shows model "OpenRouter Claude Sonnet 4.5" ``` Broken in 1.0.18: ```sh $ opencode -m openrouter/google/gemini-2.5-pro # UI shows error "Model openrouter/google is not valid", and defaults to last-used model $ opencode -m openrouter/openai/gpt-5 # UI shows error "Model openrouter/openai is not valid", and defaults to last-used model $ opencode -m openrouter/anthropic/claude-sonnet-4.5 # UI shows error "Model openrouter/anthropic is not valid", and defaults to last-used model ``` ### 2. Bug: Can't select an openrouter model from config Broken in 1.0.18: ```jsonc // opencode.jsonc { "model": "openrouter/openai/gpt-5", } ``` ```sh $ opencode # UI silently ignores "model", and defaults to last-used model ``` ### 3. Works: Can select an openrouter model from `/models` in the UI Works in 1.0.18: ```sh $ opencode # /models → "openrouter gpt-5" → enter # The UI correctly shows "OpenRouter GPT-5", and https://openrouter.ai/activity confirms opencode is using it ### OpenCode version 1.0.18 ### Steps to reproduce (above) ### Screenshot and/or share link _No response_ ### Operating System macOS 15.5 ### Terminal VS Code terminal
yindo added the opentuibug labels 2026-02-16 17:36:12 -05:00
yindo closed this issue 2026-02-16 17:36:12 -05:00
Author
Owner

@rekram1-node commented on GitHub (Nov 3, 2025):

i bet there is an invalid split or something

@rekram1-node commented on GitHub (Nov 3, 2025): i bet there is an invalid split or something
Author
Owner

@thdxr commented on GitHub (Nov 3, 2025):

fixed

@thdxr commented on GitHub (Nov 3, 2025): fixed
Author
Owner

@jdanbrown commented on GitHub (Nov 3, 2025):

Thank you! Confirmed fixed on latest dev (0538f43f, unreleased).

@jdanbrown commented on GitHub (Nov 3, 2025): Thank you! Confirmed fixed on latest `dev` (0538f43f, unreleased).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2554