GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — opencode: configured providers appear disconnected in model dialogs · Issue #49309 · anomalyco/opencode

opencode: configured providers appear disconnected in model dialogs #49309

New issue
Copy link
New issue
Copy link
Closed
#57007
Closed
opencode: configured providers appear disconnected in model dialogs#49309
#57007
Copy link
Assignees
simonklee

Description

@OpeOginni
OpeOginni
opened on Sep 16, 2026
Issue body actions

Description

Custom providers from opencode.json are available and their models appear in /models, but the TUI treats them as disconnected when no authenticated integration exists.

In the model picker, models with the same name are shown without provider names, so they cannot be distinguished. In the integration picker, the configured providers also look unconfigured.

Why this happens

OpenCode uses two different kinds of provider state:

  • A configured provider is enabled by opencode.json and can provide models.
  • A connected integration has a saved credential or an available environment variable.

The server correctly makes configured providers available, but the TUI's useConnected() check only looks at integration connections. The model dialog then hides provider names whenever no integration has a connection. The integration dialog also uses the absence of a connection as if the provider was not configured at all.

Expected:

  • Show the provider name beside each model.
  • Clearly mark custom providers from the config as configured.
  • Keep configured and authenticated states distinct.

Actual:

  • Models with the same name look identical.
  • Configured providers look disconnected.

Plugins

None

OpenCode version

2.0.4

Steps to reproduce

  1. Disconnect all authenticated providers.
  2. Create opencode.json with:
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "byok-one": {
      "npm": "@ai-sdk/openai",
      "name": "BYOK One",
      "options": {
        "baseURL": "https://example.com/v1",
        "apiKey": ""
      },
      "models": {
        "test-model": {
          "name": "Same Model"
        }
      }
    },
    "byok-two": {
      "npm": "@ai-sdk/openai",
      "name": "BYOK Two",
      "options": {
        "baseURL": "https://example.com/v1",
        "apiKey": ""
      },
      "models": {
        "test-model": {
          "name": "Same Model"
        }
      }
    }
  }
}
  1. Run opencode --standalone.
  2. Open /models and search for Same Model.
  3. Notice that both results have the same label and no provider name.
  4. Press Ctrl+A and notice that the BYOK providers do not appear configured.

This reproduces consistently.

Screenshot and/or share link

Model List (no differentiation between custom providers)
Image

Integration List (doesnt show custom ones as connected)
Image

Operating System

macOS (Darwin 27.0.0, arm64)

Terminal

Zed

Reacted by Philipp Gillé

Activity

  1. github-actions
    assigned
    simonklee
    on Sep 16, 2026
  2. github-actions commented on Sep 16, 2026

    @github-actions
    github-actionsBot
    on Sep 16, 2026 – with GitHub Actions
    Contributor
    More actions

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

    • V2 TUI: simplify provider labels in prompt and model picker #36270: V2 TUI: simplify provider labels in prompt and model picker — directly related to models displaying without provider names in the picker
    • Custom provider models missing from /model TUI picker provider sections in 1.18.10 — caused by recents filter #40592: Custom provider models missing from /model TUI picker provider sections — related to custom provider models not appearing correctly in the TUI model picker
    • opencode2: user-defined local provider models never enter the model catalog #42856: opencode2: user-defined local provider models never enter the model catalog — related to config-declared custom providers not being recognized correctly
  3. Ivony commented on Oct 14, 2026

    @Ivony
    Ivony
    on Oct 14, 2026
    More actions

    Adding one angle that I think makes this more than a cosmetic gap.

    The gate counts saved integration connections, not configured providers:

    function aj(t) { return t.some((r) => r.connections.length > 0) }

    (2.0.28; the same function is zi in 2.0.11 per the notes above and ej in 2.0.27 — logic unchanged across all three.)

    Providers declared in opencode.json under providers.<id> with inline settings.apiKey — the documented custom-provider / gateway recipe, and the only way to add a self-hosted gateway — do appear in /api/integration, but always with connections: []. Declaring them creates no connection.

    The consequence is that the number of configured providers and models does not move the gate at all. A setup made up entirely of self-hosted gateways computes some(...) === false permanently, no matter how many gateways or models there are:

    // /api/integration — config-declared providers
    { "id": "yunexpress", "name": "YunExpress AI Gateway", "methods": [{"type":"key"}], "connections": [] }
    { "id": "glm",        "name": "Zhipu GLM",             "methods": [{"type":"key"}], "connections": [] }
    { "id": "kimi",       "name": "Kimi For Coding",       "methods": [{"type":"key"}], "connections": [] }

    So for a user who only ever runs self-hosted models, the picker never groups and never shows provider names. Nothing they do on the configuration side changes that; they have to separately complete a /connect (or environment-credential) flow against some models.dev catalog provider.

    That requirement is the part I'd call a real defect rather than a rough edge: the docs route custom/self-hosted gateways through configuration and never mention /connect, while /connect and auth manage integration accounts for catalog providers. Following the documented path for a self-hosted gateway therefore guarantees the gate stays false — and a user whose whole setup is self-hosted may have no catalog provider to connect in the first place.

    Worth noting the server data is already correct here: the configured providers are present and enabled, they just are not counted by the gate. So this is purely about which piece of state the TUI consults.

  4. Tarquinen
    closed this as completedin #57007on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @simonklee
    simonklee

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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.