Skip to content

Custom provider models missing from /model TUI picker provider sections in 1.18.10 — caused by recents filter #40592

Closed as not planned

Description

@yangwuan55

Summary

Custom provider models are still missing from the provider sections of the /model TUI picker in 1.18.10, even though they load correctly. This reproduces the symptoms of closed issues #6169 / #9520 and adds evidence for the root cause: models that appear in the picker's "Recent" list are filtered out of their provider section.

Environment

  • opencode 1.18.10 (installed via Homebrew, macOS, darwin arm64)
  • Config: two custom providers (deepseek, minimax) using "npm": "@ai-sdk/anthropic" with baseURL + apiKey
  • No project-level config; global ~/.config/opencode/opencode.json

Reproduction

  1. Define custom providers with models in ~/.config/opencode/opencode.json:
{
  "provider": {
    "deepseek": {
      "npm": "@ai-sdk/anthropic",
      "options": { "apiKey": "...", "baseURL": "https://example.com" },
      "models": { "deepseek-v4-flash": { "name": "deepseek-v4-flash" } }
    },
    "minimax": {
      "npm": "@ai-sdk/anthropic",
      "options": { "apiKey": "...", "baseURL": "https://example.com" },
      "models": { "MiniMax-M3": { "name": "minimax-m3" } }
    }
  }
}
  1. opencode models — all custom models are listed correctly (verified): deepseek/deepseek-v4-flash, minimax/MiniMax-M3.
  2. Open the TUI, invoke /model — the custom provider sections show only models.dev built-in models (deepseek/deepseek-chat, deepseek/deepseek-reasoner, deepseek/deepseek-v4-pro, minimax/MiniMax-M2, ...). The configured custom models are absent from their provider sections.
  3. Typing a search query in the picker does find the custom model; selecting it works and it appears under "Recent".

Root-cause evidence

~/.local/state/opencode/model.json (~/.cache/opencode/models.json on Linux) contains the recents/favorites state. Once a custom model is used and lands in "recent", it disappears from its provider section in the picker — matching the filtering logic that motivated the fix in #15025 (show models in provider section even when in recents/favorites), which is evidently incomplete for this case.

Workaround that confirms the mechanism: deleting ~/.local/state/opencode/model.json (backup first) temporarily restores all custom models to their provider sections. The bug recurs as soon as the model is used again and re-enters recents.

Expected behavior

Every model reported by opencode models (including custom provider models in recents/favorites) should be visible in the /model picker under its provider section.

Actual behavior

Custom provider models are only reachable via search results and the Recent section; they are absent from the provider group listings.

Workarounds (for other users)

  • Delete ~/.local/state/opencode/model.json (macOS) / ~/.cache/opencode/models.json (Linux) to restore provider-section visibility temporarily.
  • Set "model": "provider/model-id" in config to make a custom model the session default without touching the picker.
  • Use picker search — custom models are still selectable there.

Activity

  1. github-actions commented on Oct 6, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions