Skip to content

tui: model picker shows only subset of declared custom provider models #62447

Closed as not planned

Description

@esponapule

Summary

The TUI model picker only displays 3 of 7 models configured under a custom @ai-sdk/openai-compatible Ollama provider, even though the server's /api/model endpoint returns all 7. Reproducible after a full TUI restart and service restart.

Environment

Reproduction

  1. Configure a custom provider in ~/.config/opencode/opencode.jsonc using @ai-sdk/openai-compatible pointing at a remote Ollama instance, with 7 explicitly declared models (see config snippet below).
  2. Start opencode TUI and open the model picker (Ctrl+P → model selection).
  3. Observe that only 3 of the 7 models appear under the provider group.
  4. Verify server-side data: opencode api get /api/model returns all 7 models.
  5. Verify the remote Ollama serves all 7: curl http://<host>:11434/v1/models returns all 7.
  6. Fully quit and relaunch the TUI (/exit then opencode) — issue persists.
  7. Restart the background service (opencode service restart) — issue persists.

Expected Behavior

All 7 declared models should appear in the TUI model picker under the provider group, matching what /api/model returns.

Actual Behavior

Only 3 of 7 models are shown: Qwen 2.5 Coder 7B, Llama 3.1, Llama 3.1 8B. The remaining 4 (Qwythos 9B Claude Mythos 5, Gemma 4 E4B, Qwen 3.5 9B, Qwen 3.5 4B) are missing from the picker despite being returned by the API.

Additional Context

Config snippet (~/.config/opencode/opencode.jsonc):

"providers": {
  "ollama-windows": {
    "package": "aisdk:@ai-sdk/openai-compatible",
    "name": "Ollama (Windows laptop)",
    "settings": {
      "baseURL": "http://192.168.1.222:11434/v1"
    },
    "models": {
      "qwythos-9b-claude-mythos-1m": {
        "modelID": "hf.co/empero-ai/Qwythos-9B-Claude-Mythos-5-1M-GGUF:Q4_K_M",
        "name": "Qwythos 9B Claude Mythos 5 (1M, served at 32k)",
        "limit": { "context": 32768, "output": 8192 }
      },
      "gemma4:e4b": { "name": "Gemma 4 E4B", "limit": { "context": 32768, "output": 8192 } },
      "qwen3.5:9b": { "name": "Qwen 3.5 9B", "limit": { "context": 32768, "output": 8192 } },
      "qwen3.5:4b": { "name": "Qwen 3.5 4B", "limit": { "context": 32768, "output": 8192 } },
      "qwen2.5-coder:7b": { "name": "Qwen 2.5 Coder 7B", "limit": { "context": 32768, "output": 8192 } },
      "llama3.1:latest": { "name": "Llama 3.1", "limit": { "context": 32768, "output": 8192 } },
      "llama3.1:8b": { "name": "Llama 3.1 8B", "limit": { "context": 32768, "output": 8192 } }
    }
  }
}

Server verification (all 7 returned):

$ opencode api get /api/model | python3 -c "..."
ollama-windows 7 -> ['qwythos-9b-claude-mythos-1m', 'gemma4:e4b', 'qwen3.5:9b', 'qwen3.5:4b', 'qwen2.5-coder:7b', 'llama3.1:latest', 'llama3.1:8b']

Remote Ollama verification (all 7 served):

$ curl http://192.168.1.222:11434/v1/models
llama3.1:8b, llama3.1:latest, qwen3.5:4b, qwen2.5-coder:7b, qwen3.5:9b, gemma4:e4b, hf.co/empero-ai/Qwythos-9B-Claude-Mythos-5-1M-GGUF:Q4_K_M

Additional notes:

  • All 7 models have identical capabilities (tools: true, input: [text, image], output: [text]), status: active, enabled: true.
  • The same issue affects the local ollama (MINT) provider: 5 of 8 models shown instead of 8.
  • There was a transient DNS outage (getaddrinfo ENOTFOUND opencode.ai) between 14:41–15:01 local that caused "failed to load OpenCode provider config" 39 times. DNS recovered and the service fired provider.updated/model.updated events, but the TUI still only shows the subset.
  • No project-level opencode.json override exists. No filters in tui.jsonc or cli.json.
  • The models-dev:v2:catalog kv cache (11MB) exists but contains no ollama/ollama-windows provider entries.

Activity

  1. opencodejr commented on Nov 6, 2026

    @opencodejr
    Contributor

    Thanks for the detailed report and for checking /api/model and the Ollama endpoint.

    In the TUI model picker, with an empty search, a model that is already listed under Favorites or Recent at the top is removed from its provider group, so it never appears twice. That's intended. If you've used Qwythos 9B, Gemma 4 E4B, Qwen 3.5 9B and Qwen 3.5 4B recently, or favorited them, they may simply be in those sections instead of under Ollama (Windows laptop). The same would explain the 3 models missing from your MINT ollama provider.

    Could you check and let us know:

    1. With the search box empty, do the 4 missing models appear under Favorites or Recent at the top of the picker?
    2. If you type part of a missing model's name (e.g. gemma) into the search box, does it show up?
    3. If they don't appear anywhere, please attach a screenshot of the whole picker list, scrolled from top to bottom.

    You can reply here with the details, or edit the issue. If you edit it, please also leave a comment saying you've updated it so we know you're done.

    Related issues, ordered by how likely they are to be the same thing:

  2. esponapule commented on Nov 6, 2026

    @esponapule
    Author

    the 4 missing models appear in a search and in the recent list. but not under the header "Windows Laptop"

  3. opencodejr commented on Nov 6, 2026

    @opencodejr
    Contributor

    Thanks for checking. Unfortunately a search finding them doesn't tell us much on its own. While something is typed in the search box, the picker skips the Favorites and Recent sections and lists every model under its provider. So the 4 models would show up in a search either way.

    What we still need to know:

    1. With the search box empty, scroll to the top of the picker. Are Qwythos 9B, Gemma 4 E4B, Qwen 3.5 9B and Qwen 3.5 4B listed under Favorites or Recent?
    2. If they aren't listed anywhere with the search empty, please attach a screenshot of the whole picker list, scrolled from top to bottom.

    If they are under Recent or Favorites, the picker is working as designed: models in those sections are moved out of their provider group rather than shown twice. #60267 asks for that behaviour to change. If they really don't appear anywhere without a search, that's a bug and we'll look into it.

  4. esponapule commented on Nov 6, 2026

    @esponapule
    Author

    the 4 missing models appear in a search and in the recent list. but not under the header "Windows Laptop"
    They don't appear anywhere without a search, but after a search, they do appear in the recent.

  5. opencodejr commented on Nov 7, 2026

    @opencodejr
    Contributor

    Thanks for checking. I tried this on 2.2.5 with your ollama-windows provider config (all 7 models, same IDs and modelID). With an empty search, all 7 models showed up in the picker. My test setup had no connected integration, though, so the picker showed a flat list without the Favorites, Recent and provider headers you see.

    For your setup, what you describe matches how the TUI picker is built in 2.2.5. With the search box empty, a model in Favorites or Recent is shown only in that section at the top and removed from its provider group, so it isn't listed twice. When you type a search, those sections are skipped and every model is listed under its provider, which is why the 4 models reappear under Ollama (Windows laptop) then. The Recent list keeps every model you've used, so a provider can look like it has only a few models left. Your MINT ollama provider is in the same situation.

    So this seems to work as designed rather than being a bug. If you'd like the provider groups to always list every model, with Recent and Favorites as extra shortcuts, that would be a feature request. #60267 asks for the same change in the desktop app.

    One case would be a real bug: a model you have never used or favorited that appears nowhere in the picker with the search empty. If you can show that, please reply here with a screenshot of the whole list (search empty, scrolled from top to bottom) and say which model is missing.

  6. opencodejr commented on Nov 10, 2026

    @opencodejr
    Contributor

    Closing this for now because we haven't heard back. On 2.2.5 the picker lists all 7 of your configured models. When the search is empty, models under Recent or Favorites are shown only there and not under their provider, which is why Ollama (Windows laptop) looked incomplete until you searched. That's how the picker is designed. If you'd like provider groups to always list every model, #60267 asks for that change in the desktop app.

    If you find a model you have never used or favorited that doesn't appear anywhere with the search empty, please comment here with a screenshot of the whole list and say which model is missing. We can reopen the issue then. Thanks for the detailed report!

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

Metadata

Metadata

Assignees

No one assigned

    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