Skip to content

Github Copilot models disappear when a Go/Zen API key is also stored #55082

Open

Description

@TsubasaBE

Description

I can't use my Copilot subscription and my Go/Zen key at the same time. Whichever way I set it up, as soon as both credentials are stored, all github-copilot models vanish from opencode models and trying to run one gives Model unavailable. The Go/Zen models keep working fine. Nothing in the logs.

Re-auth of Copilot doesn't fix it, service restart doesn't fix it. The provider is just gone from /api/model and /api/provider while both credential types are in the store.

The only way I got Copilot back was deleting the console rows directly:

opencode service stop
sqlite3 ~/.local/share/opencode/opencode.db \
  "DELETE FROM credential WHERE integration_id IN ('opencode-go','opencode');"
opencode service start

After that: 29 models again. But of course now Go is gone, so I'm forced to pick one.

Plugins

None

OpenCode version

2.0.28

Steps to reproduce

  1. opencode auth login github-copilot → complete the device flow
  2. opencode models | grep -c github-copilot → shows 29
  3. Add any opencode-go (or opencode) API key credential, e.g. opencode auth import with:
    [{"id":"x","integrationID":"opencode-go","label":"Go","active":true,"value":{"type":"key","key":"sk-anything"}}]
  4. opencode models | grep -c github-copilot → 0
  5. opencode run -m github-copilot/kimi-k3 "hi" → Model unavailable: github-copilot/kimi-k3
  6. opencode run -m opencode-go/kimi-k3 "hi" → works fine

Screenshot and/or share link

No response

Operating System

Debian 13 (Trixie)

Terminal

Ghostty and WezTerm (same result in both)

Activity

  1. opencode-agent commented on Oct 13, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed steps. I tried them on 2.0.28 (Linux, clean profile, no plugins) and couldn't reproduce this:

    • With only a GitHub Copilot credential, opencode models listed the github-copilot models.
    • After importing an opencode-go key exactly as in your step 3 (and then an opencode key as well), the github-copilot models were still listed, also after restarting the background service.
    • opencode run -m github-copilot/kimi-k3 "hi" still found the model. It only failed when the request reached GitHub, because my test token was fake.

    One thing I couldn't test: with a placeholder key, OpenCode can't load your provider configuration from the OpenCode Console (the log shows OpencodeConsole.SignedOut). If the problem comes from what the Console sends back for a real Go/Zen account, my test wouldn't show it.

    Could you help narrow it down?

    • Does it still happen if the Go/Zen credential really is a dummy key like sk-anything, or only with your real key?
    • With both credentials stored, please run opencode service restart and then opencode run -m github-copilot/kimi-k3 "hi". Then share the matching lines from ~/.local/share/opencode/log/opencode.log, especially any containing OpenCode provider config, GitHub Copilot or ModelUnavailable. Please remove any keys or tokens first.
    • Do you have an opencode.json / opencode.jsonc (global or in the project), or any OPENCODE_* environment variables set?
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