Skip to content

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

Closed

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

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Dec 25, 2025
  2. github-actions commented on Dec 25, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  3. MasuRii commented on Dec 25, 2025

    @MasuRii
    Author

    It's working now, I deleted the models in C:\Users\Administrator.local\state\opencode, as somehow that's the one causing issue. Is there a way to avoid this in the future please? so that I wont have to keep deleting the state.

    Image
  4. pablonification commented on Dec 26, 2025

    @pablonification

    this happens on my opencode too, try to debug this for a hour to finding out it's a global issue.

    to fix, im deleting the model.json from /Users/macbook/.local/state/opencode/model.json then suddenly it works lmao

  5. tqian86 commented on Dec 26, 2025

    @tqian86

    this happens on my opencode too, try to debug this for a hour to finding out it's a global issue.

    to fix, im deleting the model.json from /Users/macbook/.local/state/opencode/model.json then suddenly it works lmao

    On Linux, the equivalent file is ~/.cache/opencode/models.json, but deleting it has no effect. The models are still missing from the pick TUI.

  6. peaster commented on Dec 27, 2025

    @peaster

    Reproduced this and confirmed that deleting ~/.cache/opencode/models.json has no effect on Linux

  7. MasuRii commented on Dec 27, 2025

    @MasuRii
    Author

    @tqian86
    @peaster

    Try looking for the "state" folder, as I also tried to delete that in the .cache and it's not working, that's not the correct folder.

  8. akirabaruah commented on Dec 28, 2025

    @akirabaruah

    I'm on a Mac. I initially tried deleting models.json under ~/.cache/, which didn't work:

    rm ~/.cache/opencode/models.json
    

    But based on #6169 (comment) and #6169 (comment), I tried deleting the file under ~/.local/ instead, which fixed the issue for me:

    rm ~/.local/state/opencode/model.json
    

    Thanks @MasuRii 🙏

  9. rekram1-node commented on Dec 28, 2025

    @rekram1-node
    Contributor

    This is the same issue as this:
    #6251 (comment)

    there was a bug w/ the recents list for model picker. Added a fix for it, will be in next release

  10. chindris-mihai-alexandru commented on Dec 30, 2025

    @chindris-mihai-alexandru

    This issue still persists in v1.0.218.

    My setup:

    • OpenCode version: 1.0.218
    • OS: macOS 15.7.4 (Build 24G503)
    • Terminal: Warp 0.2025.12.17.17.17.02

    Configuration:
    Custom Bedrock provider with 4 models configured in opencode.json:

    {
      "provider": {
        "bedrock": {
          "npm": "@ai-sdk/amazon-bedrock",
          "name": "Amazon Bedrock",
          "options": { "region": "us-east-1" },
          "models": {
            "us.anthropic.claude-opus-4-5-20251101-v1:0": { "name": "Claude Opus 4.5 (Best)" },
            "us.anthropic.claude-sonnet-4-5-20250929-v1:0": { "name": "Claude Sonnet 4.5 (Balanced)" },
            "us.anthropic.claude-sonnet-4-20250514-v1:0": { "name": "Claude Sonnet 4 (Legacy)" },
            "us.anthropic.claude-haiku-4-5-20251001-v1:0": { "name": "Claude Haiku 4.5 (Fast)" }
          }
        }
      }
    }

    Behavior:

    • /models picker shows: Claude Opus 4.5, Claude Sonnet 4.5, Claude Sonnet 4 (and other built-in Bedrock models)
    • /models picker missing: Claude Haiku 4.5 (Fast) - my custom-named model
    • When searching "haiku" in /models, I see TWO entries in "Recent":
      • "Claude Haiku 4.5" (built-in from models.dev)
      • "Claude Haiku 4.5 (Fast)" (my custom config)

    Observations:

    • The model works perfectly when selected via search
    • All 4 models work via AWS CLI
    • The custom model just doesn't render in the main provider list

    This appears to be an incomplete fix - custom models with names similar to built-in models may be getting filtered/hidden incorrectly.

  11. Thijxx commented on Apr 3, 2026

    @Thijxx

    still broken in 1.3.13
    shows models that are not existing
    does not show models that are there
    picks a random name for models
    completely cuucuu

  12. droud-dev commented on Jun 8, 2026

    @droud-dev

    Still an issue. Especially with custom providers - my LiteLLM proxy doesn't even show up in the list of /models, even after purging .local, .cache, deleteing and re-adding, etc.

  13. ahmedfaaid commented on Jun 26, 2026

    @ahmedfaaid

    This is still an issue with 1.17.1. I don't get the full list of models with the NVIDIA provider.

  14. jhelm commented on Sep 26, 2026

    @jhelm

    This issue is still present in version 1.18.32. (MacOS 26.6.2 on a M3 Max with 64GB Ram)

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

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