Repository navigation
Description
Summary
After completing the GitHub Copilot device-flow login in the TUI, the stored credential is valid (the Copilot API returns the user's model list), but OpenCode never exposes any github-copilot/* model: GET /api/model keeps returning only opencode/* models, and selecting any Copilot model fails with Model unavailable. No sync error is logged.
Environment
- opencode version: v2.1.3
- OS: Linux 6.18.54.1-microsoft-standard-WSL2 (x86_64, WSL2)
- Terminal: xterm-256color (TERM_PROGRAM unset)
- Shell: /bin/bash
- Install/channel: latest
- Active plugins: none found in config
Reproduction
- Run
/connectin the TUI, choose GitHub Copilot → Login with GitHub Copilot → GitHub.com, complete the device flow in the browser. Server logs the credential as created (integrationIDgithub-copilot, typeoauth, activetrue). opencode auth listshowsGitHub Copilot stored.opencode modelslists only the 9opencode/*free models; nogithub-copilot/*entries appear.- Run any Copilot model:
opencode run --model github-copilot/gpt-5-mini "hi"→ immediateError: Model unavailable: github-copilot/gpt-5-mini(server logsSessionRunnerModel.ModelUnavailableError). GET /api/providershowsgithub-copilotwithactivation: "auto"(before config) — setting an explicitproviders: {"github-copilot": {}}in~/.config/opencode/opencode.jsonand callingopencode reloadflips activation toenabled, but no models appear.- Force a service restart: same result.
Expected Behavior
The CLI docs state OpenCode "fetches the account's current model list after login and whenever the active Copilot account changes" and that a failed sync is logged as failed to sync GitHub Copilot models. Expected: github-copilot models from the account become selectable in /models and via opencode run --model github-copilot/<id>.
Actual Behavior
No Copilot model ever becomes available in any client (TUI, opencode run, GET /api/model), both via the shared background service and --standalone mode. Notably, no failed to sync GitHub Copilot models warning is logged — the sync attempt appears to be silently skipped or swallowed.
Additional Context
Evidence that the account and token are valid (i.e., not an entitlement problem):
- Directly calling Copilot's API with the stored OAuth token returns 48 models:
GET https://api.individual.githubcopilot.com/modelswithAuthorization: Bearer <stored token>→ HTTP 200, 48 model entries. - The cached models.dev catalog in the background service (
kvkeymodels-dev:catalog) containsgithub-copilotwith 36 models. - The integration endpoint reports a live connection:
GET /api/integration/github-copilot→connections: [{type: credential, active}]. GET /api/provider/github-copilotshows the provider without any account-resolved models.
Completely reproducible across: shared service restart, opencode reload, opencode auth switch <integration> <label>, explicit provider activation in config, and a fresh --standalone server. Workarounds tried (none made models appear): config activation, auth switch, service restart, standalone mode.
Activity
opencode-agent commentedon Oct 22, 2026
Thanks for the thorough report and for checking the Copilot API directly with the stored token.
In 2.1.3 the
failed to sync GitHub Copilot modelswarning is only logged when the request to Copilot's/modelsfails. Since you saw no warning, the sync most likely worked and the models were filtered out afterwards. A known cause: on some Copilot plans (Free / Student, which only allow Auto model selection),/modelsreturnsmodel_picker_enabled: falsefor every model, and OpenCode then hides all of them.Could you tell us:
GET https://api.individual.githubcopilot.com/modelsresponse you already fetched, how many models have"model_picker_enabled": true. For example:... | jq '[.data[] | select(.model_picker_enabled == true)] | length'You can reply here, or edit the issue. If you edit it, please also leave a comment saying you've updated it so we know you're done.
Possibly related issues, ordered by likelihood:
model_picker_enabled: false. The sync succeeds and nothing is logged, thenModel unavailable.github-copilot/automodel (being worked on in feat(core): add GitHub Copilot auto model #55960). providers: GitHub Copilot model sync never runs after login, no models listed #51928, a near-identical report, was closed as a duplicate of it.setup()is slow hides all Copilot models (unlikely, since you have no plugins).opencode-agent commentedon Oct 25, 2026
We're closing this for now because we haven't heard back. We needed your Copilot plan and how many models in your
/modelsresponse have"model_picker_enabled": true. Without those we can't tell whether this is the known auto-only plan problem or something new.If you're on Copilot Free or Student, follow #57955 and #34644 (a
github-copilot/automodel for those plans is being worked on in #55960). If your plan is different, or some models do havemodel_picker_enabled: true, reply here with those details and we'll reopen this. Thanks again for the detailed report.