You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
copilot: no usable models listed — stale catalog, empty sync, no policy filtering #52983
After connecting GitHub Copilot (OAuth device flow succeeds, credential stored and active), opencode models lists zero github-copilot/* models.
Direct API checks with the stored credential show the token is valid: GET https://api.githubcopilot.com/models returns ~49 models, each annotated with policy.state (enabled / disabled) and supported_endpoints. But OpenCode never surfaces a usable one:
Dynamic sync yields nothing. With no explicit config, no github-copilot/* model appears, even though the provider is registered (GET /api/provider shows github-copilot with activation: auto) and the account has entitled models.
Explicit providers.github-copilot.models entries only survive if the ID exists in the bundled snapshot catalog. IDs such as kimi-k3, gpt-5.4-mini, gpt-5.3-codex, claude-haiku-4.5, gpt-4o, gpt-4.1 (all policy-enabled for the account, all present in the current models.dev github-copilot catalog) are silently dropped on opencode reload. Only snapshot-era IDs (e.g. gpt-5.4, claude-sonnet-5.5, gemini-3.8-flash, claude-opus-5) are kept.
The surviving snapshot IDs are all policy.state=disabled for the account, so using any of them fails: opencode run --model github-copilot/gemini-3.8-flash returns 400 model_not_supported. Snapshot IDs absent from the account's /models (e.g. kimi-k2.7-code) fail with 400 model_not_available_for_integrator "opencode".
modelID overrides break routing. An explicit entry with a modelID different from its key (e.g. key gpt-5.4 with modelID: kimi-k3) is dropped entirely: provider.no-route / Model unavailable: github-copilot/gpt-5.4.
Net effect: there is no way to select a usable Copilot model — the selectable set (stale snapshot, all policy-disabled) and the usable set (policy-enabled, missing from snapshot) do not intersect.
Plugins
None (no plugins configured; no MCP servers).
OpenCode version
2.0.22 (@opencode/cli, latest channel; verified newest published version)
opencode models → no github-copilot/* entries (only opencode/* free models).
Add explicit models under providers.github-copilot.models in ~/.config/opencode/opencode.json, then opencode reload → only snapshot-era IDs appear; current IDs (kimi-k3, gpt-5.4-mini, gpt-4o, …) are dropped.
opencode run "hi" --model github-copilot/gemini-3.8-flash → 400 {"code":"model_not_supported"}.
Screenshot and/or share link
N/A (CLI output; exact API error codes included above).
Operating System
Windows NT 10.0.26200 (win32 x64)
Terminal
PowerShell commands executed via local OpenCode server (TERM=xterm-256color)
Additional reproduction and evidence from Linux/WSL2:
Environment
OpenCode: v2.0.25, latest channel
OS: Linux under WSL2 (6.6.87.2-microsoft-standard-WSL2)
Shell: fish
Active plugin: /home/solan/src/opencode-plugins/opencode-usage
Reproduction and observations
Connect GitHub Copilot through the OAuth device flow.
opencode auth list shows an active stored GitHub Copilot OAuth credential.
The OpenCode service/API is healthy (opencode service status, /api/info).
Immediately after login, the Copilot provider had zero models. The server log repeatedly reported:
failed to sync GitHub Copilot models
cause="TimeoutError: The operation timed out."
Restarting the service temporarily repopulated 37 Copilot models, but the selectable inventory still omitted callable legacy models such as gpt-4.1 and gpt-4o-mini.
OpenCode requests using visible models such as github-copilot/claude-haiku-5.5 and github-copilot/gpt-5-mini fail with:
The requested model is not supported.
Account/API verification
Using the stored credential locally (token redacted):
GET https://api.githubcopilot.com/models returns HTTP 200.
GET https://api.github.com/copilot_internal/user reports chat_enabled: true and an individual free_educational_quota account.
Direct chat completions return HTTP 200 and COPILOT_OK for gpt-4.1 and gpt-4o-mini.
The same direct endpoint returns model_not_supported for the newer models OpenCode exposes.
This indicates the OAuth credential, entitlement, and network are working. The failure appears to be stale/incorrect Copilot model discovery or filtering: OpenCode exposes models that are not callable for this account while omitting models that GitHub accepts.
A reconnect did not resolve it; restarting the OpenCode service only refreshed the stale inventory temporarily.
GitHub Copilot Free and Student plans now only allow Auto model selection, so Copilot's /models returns every model with model_picker_enabled: false and OpenCode ends up listing no Copilot models. #34644 tracks adding a github-copilot/auto model for these plans; the fix is in progress in #55960.
If explicitly configured providers.github-copilot.models entries are still dropped after Auto ships, please open a focused issue for that part.
Activity
github-actions commentedon Oct 3, 2026
This issue might be a duplicate of existing issues. Please check:
edwardEsmerson commentedon Oct 8, 2026
Additional reproduction and evidence from Linux/WSL2:
Environment
v2.0.25, latest channel6.6.87.2-microsoft-standard-WSL2)/home/solan/src/opencode-plugins/opencode-usageReproduction and observations
opencode auth listshows an active stored GitHub Copilot OAuth credential.opencode service status,/api/info).gpt-4.1andgpt-4o-mini.github-copilot/claude-haiku-5.5andgithub-copilot/gpt-5-minifail with:Account/API verification
Using the stored credential locally (token redacted):
GET https://api.githubcopilot.com/modelsreturns HTTP 200.GET https://api.github.com/copilot_internal/userreportschat_enabled: trueand an individualfree_educational_quotaaccount.COPILOT_OKforgpt-4.1andgpt-4o-mini.model_not_supportedfor the newer models OpenCode exposes.This indicates the OAuth credential, entitlement, and network are working. The failure appears to be stale/incorrect Copilot model discovery or filtering: OpenCode exposes models that are not callable for this account while omitting models that GitHub accepts.
A reconnect did not resolve it; restarting the OpenCode service only refreshed the stale inventory temporarily.
opencode-agent commentedon Oct 17, 2026
Closing as a duplicate of #34644.
GitHub Copilot Free and Student plans now only allow Auto model selection, so Copilot's
/modelsreturns every model withmodel_picker_enabled: falseand OpenCode ends up listing no Copilot models. #34644 tracks adding agithub-copilot/automodel for these plans; the fix is in progress in #55960.If explicitly configured
providers.github-copilot.modelsentries are still dropped after Auto ships, please open a focused issue for that part.