/models shows all available models rather than those restricted in opencode.json. #2958

Open
opened 2026-02-16 17:38:00 -05:00 by yindo · 5 comments
Owner

Originally created by @LaughterOnWater on GitHub (Nov 18, 2025).

Originally assigned to: @rekram1-node on GitHub.

Description

Windows 10, wsl -d kali-linux, opencode v1.0.67

Pro Claude, openrouter and zen authorized per specifications with opencode auth login .

opencode.json at project base.

When selecting a model /models from within opencode, every single model available from all three providers shows in the model list, making it frustrating to attempt to choose the correct preferred model in the /models dialog box.

opencode.json:

{
  "$schema": "https://opencode.ai/config.json",

  "provider": {
    "openrouter": {
      "models": {
        "qwen/qwen3-coder:free": {},
        "moonshotai/kimi-k2:free": {},
        "x-ai/grok-code-fast-1": {},
        "z-ai/glm-4.6": {},
        "google/gemini-2.5-flash-image": {}
      }
    },

    "opencode": {
      "models": {
        "grok-code-fast-1": {},
        "big-pickle": {}
      }
    },

    "anthropic": {
      "models": {
        "claude-4-5-sonnet-latest": {},
        "claude-4-5-haiku-latest": {}
      }
    }
  },

  "model": "zen/grok-code-fast-1",
  "small_model": "zen/big-pickle"
}

OpenCode version

1.0.67

Steps to reproduce

  1. Windows 10, wsl -d kali-linux (or your preferred linux dist)

Pro Claude, openrouter and zen authorized with opencode auth login .

  1. Put the opencode.json in the project root.

  2. Navigate to project path cd /mnt/e/coding/test-bed/ (my project root).

  3. Type opencode.

The opencode interface appears.

  1. Type \models.

Every single possible openrouter, anthropic and zen model shows in the list rather than just the selected ones.

Screenshot and/or share link

Image

Operating System

windows 10, wsl, kali-linux

Terminal

windows powershell

Originally created by @LaughterOnWater on GitHub (Nov 18, 2025). Originally assigned to: @rekram1-node on GitHub. ### Description Windows 10, `wsl -d kali-linux`, opencode v1.0.67 Pro Claude, openrouter and zen authorized per specifications with `opencode auth login` . opencode.json at project base. When selecting a model `/models` from within opencode, _every_ single model available from all three providers shows in the model list, making it frustrating to attempt to choose the correct preferred model in the /models dialog box. opencode.json: ``` { "$schema": "https://opencode.ai/config.json", "provider": { "openrouter": { "models": { "qwen/qwen3-coder:free": {}, "moonshotai/kimi-k2:free": {}, "x-ai/grok-code-fast-1": {}, "z-ai/glm-4.6": {}, "google/gemini-2.5-flash-image": {} } }, "opencode": { "models": { "grok-code-fast-1": {}, "big-pickle": {} } }, "anthropic": { "models": { "claude-4-5-sonnet-latest": {}, "claude-4-5-haiku-latest": {} } } }, "model": "zen/grok-code-fast-1", "small_model": "zen/big-pickle" } ``` ### OpenCode version 1.0.67 ### Steps to reproduce 1. Windows 10, `wsl -d kali-linux` (or your preferred linux dist) Pro Claude, openrouter and zen authorized with `opencode auth login` . 2. Put the opencode.json in the project root. 3. Navigate to project path `cd /mnt/e/coding/test-bed/` (my project root). 4. Type `opencode`. The opencode interface appears. 5. Type `\models`. Every single possible openrouter, anthropic and zen model shows in the list rather than just the selected ones. ### Screenshot and/or share link <img width="422" height="342" alt="Image" src="https://github.com/user-attachments/assets/fcc19c92-7ea8-4f5f-b72d-3a66377ae591" /> ### Operating System windows 10, wsl, kali-linux ### Terminal windows powershell
yindo added the discussion label 2026-02-16 17:38:00 -05:00
Author
Owner

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

this is expected behavior

I guess we can have some way for you to changet that tho

@rekram1-node commented on GitHub (Nov 18, 2025): this is expected behavior I guess we can have some way for you to changet that tho
Author
Owner

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

also the model ids you have at the bottom are wrong they should be:

opencode/

not

zen/

@rekram1-node commented on GitHub (Nov 18, 2025): also the model ids you have at the bottom are wrong they should be: opencode/ not zen/
Author
Owner

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

what if we had a whitelist per provider and itd only show those

@rekram1-node commented on GitHub (Nov 18, 2025): what if we had a whitelist per provider and itd only show those
Author
Owner

@LaughterOnWater commented on GitHub (Nov 19, 2025):

@rekram1-node
Thanks for your response. I'll fix the zen thing!

There must be a reason, so I'll ask... Why do we list specific models as in the below example, if these are not the only ones we want to show in the interface? [ Edit: I think I answered my own question. Things move fast, and you're already gearing toward that. ]

"openrouter": {
      "models": {
        "qwen/qwen3-coder:free": {},
        "moonshotai/kimi-k2:free": {},
        "x-ai/grok-code-fast-1": {},
        "z-ai/glm-4.6": {},
        "google/gemini-2.5-flash-image": {}
      }
@LaughterOnWater commented on GitHub (Nov 19, 2025): @rekram1-node Thanks for your response. I'll fix the zen thing! There must be a reason, so I'll ask... Why _do_ we list specific models as in the below example, if these are not the only ones we want to show in the interface? [ Edit: I think I answered my own question. Things move fast, and you're already gearing toward that. ] ``` "openrouter": { "models": { "qwen/qwen3-coder:free": {}, "moonshotai/kimi-k2:free": {}, "x-ai/grok-code-fast-1": {}, "z-ai/glm-4.6": {}, "google/gemini-2.5-flash-image": {} } ```
Author
Owner

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

The models come from the models.dev api so there are openrouter models u didnt list that we merge in, additionally u can define custom models that have traits from real models with special settings or names

So normally the model field here is to override settings, define custom models, etc

@rekram1-node commented on GitHub (Nov 19, 2025): The models come from the models.dev api so there are openrouter models u didnt list that we merge in, additionally u can define custom models that have traits from real models with special settings or names So normally the model field here is to override settings, define custom models, etc
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2958