Skip to content

/model TUI picker does not display all custom provider models (models load correctly but don't appear in UI) #6169

@MasuRii

Description

@MasuRii

Description

Custom models defined in opencode.jsonc under custom providers are correctly loaded by OpenCode (verified via opencode models --verbose), but many of them do not appear in the /model TUI picker dialog.

Key observation: Models that have been used recently appear in the "Recent" section, proving they are functional. However, when scrolling through the provider sections in the picker, many models are missing from the list.

Evidence

Models loaded (via opencode models): 23 models across 3 providers
Models visible in /model picker: ~15 models (varies based on Recent section)

Provider Models in Config Models in /model Picker Missing
aistudio (custom) 7 2 (+ some in Recent) 5
myproxy (custom) 12 ~8 ~4
opencode (built-in) 4 4 0

Example missing models:

  • aistudio/gemini-2.5-pro - loads correctly, not in picker
  • aistudio/gemini-3-pro-preview - loads correctly, not in picker
  • myproxy/antigravity/claude-opus-4-5 - loads correctly, not in picker

OpenCode version

1.0.201

Steps to reproduce

  1. Create a custom provider in opencode.jsonc with multiple models:
{
  "provider": {
    "myproxy": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "My Custom Proxy",
      "options": {
        "baseURL": "http://127.0.0.1:8000/v1"
      },
      "models": {
        "model-a": { "name": "Model A", "limit": { "context": 100000, "output": 8192 } },
        "model-b": { "name": "Model B", "limit": { "context": 100000, "output": 8192 } },
        "model-c": { "name": "Model C", "limit": { "context": 100000, "output": 8192 } },
        "model-d": { "name": "Model D", "limit": { "context": 100000, "output": 8192 } },
        "model-e": { "name": "Model E", "limit": { "context": 100000, "output": 8192 } },
        "model-f": { "name": "Model F", "limit": { "context": 100000, "output": 8192 } },
        "model-g": { "name": "Model G", "limit": { "context": 100000, "output": 8192 } }
      }
    }
  }
}
  1. Run opencode models to verify all models are loaded correctly
  2. Launch OpenCode TUI and type /model
  3. Scroll through the provider section - observe that not all models appear

Expected behavior

All models returned by opencode models should be visible in the /model TUI picker under their respective provider sections.

Actual behavior

Only a subset of custom provider models appear in the picker. The missing models:

  • Are correctly parsed and loaded (confirmed via opencode models --verbose)
  • Work correctly when set as "model" in config
  • Appear in "Recent" section after being used
  • Simply don't render in the provider list of the /model dialog

Workaround

You can still use missing models by:

  1. Setting them directly in config: "model": "myproxy/model-name"
  2. Using them once, then selecting from "Recent" section

Screenshot and/or share link

Image Image

Operating System

Windows 10 (Build 22631)

Terminal

Windows Terminal / VS Code Integrated Terminal


Additional context

Potentially related code: The model picker is implemented in packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx. The filtering logic intentionally removes models that are in "Recent" or "Favorites" to avoid duplication, but there may be an additional issue causing other models to not render.

Debug info:

  • All 23 models load correctly via Provider.list()
  • The sync.data.provider array contains all providers and models
  • Issue appears to be in the TUI rendering/display layer, not config parsing

Metadata

Metadata

Assignees

Labels

opentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions