anomalyco / anomalyco/opencode

opencode: configured providers appear disconnected in model dialogs

Open
#49,309 1 comment 0 reactions 1 assignee View on GitHub

@simonklee is already working on this.

Since Sep 16, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.