Skip to content

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

@LaughterOnWater

Description

@LaughterOnWater

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

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions