Repository navigation
GitHub Copilot provider shows zero models: all models return model_picker_enabled: false #42083
Description
Summary
On opencode 1.18.15 (Arch package), the github-copilot provider never appears in the model picker. opencode auth login -p github-copilot works (auth succeeds), but opencode models github-copilot returns "Provider not found", and /models in the TUI shows no Copilot models.
Root cause
In packages/opencode/src/plugin/github-copilot/copilot.ts, the models() hook returns only models where result.pickerEnabled.has(model.api.id):
return CopilotModels.get(...)
.then((result) => {
models = result.models
return Object.fromEntries(
Object.entries(result.models).filter(([, model]) => result.pickerEnabled.has(model.api.id)),
)
})pickerEnabled (built in models.ts:257) is the set of models with model_picker_enabled: true in the API response:
pickerEnabled: new Set([...remote].filter(([, item]) => item.model_picker_enabled).map(([id]) => id)),GitHub's GET https://api.githubcopilot.com/models currently returns model_picker_enabled: false for every single model — even ones that are policy.state: "enabled" and fully usable. So pickerEnabled is always empty, the filter drops everything, and the provider surfaces zero models.
Evidence
Using a valid, freshly-authenticated Copilot OAuth token (device flow, client_id=Ov23li8tweQw6odWQebz):
HTTP 200, total models: 47
policy states: disabled: 18 | none: 23 (internal: copilot-search-*, exec-agent-*) | enabled: 6
model_picker_enabled=true: 0
The 6 policy.state: "enabled" models (gpt-4o, gpt-5-mini, claude-haiku-4.5, gpt-4.1, mai-code-1-flash, mai-code-1.1-flash) pass the existing usable() check (models.ts:207), and chat completions against them work fine:
POST https://api.githubcopilot.com/chat/completions → 200, "Hi there! ..."
So the account/subscription is fine — the filter is the problem. Note: exchanging the OAuth token for a Copilot session token via api.github.com/copilot_internal/v2/token and using that against /models returns 403, so the session-token route is not a workaround either.
Suggested fix
Filter by the already-existing usable() predicate (policy.state !== "disabled" + has max_output_tokens/max_prompt_tokens + has tool_calls) instead of, or in addition to, model_picker_enabled. Either:
- Return
result.models(already filtered byusable()insideCopilotModels.get) without thepickerEnabledfilter, or - Union
pickerEnabledwith the usable set.
model_picker_enabled appears to be a deprecated/no-longer-reliable signal from GitHub's API.
Workaround
A local plugin overriding the provider's models() hook to return all usable models (same usable() criteria, no picker filter) restores all 25 available Copilot models:
// ~/.config/opencode/plugins/copilot-picker-fix.js
export const CopilotPickerFix = async () => ({
provider: {
id: "github-copilot",
async models(provider, ctx) {
if (ctx.auth?.type !== "oauth") return provider.models
const base = ctx.auth.enterpriseUrl
? `https://copilot-api.${ctx.auth.enterpriseUrl.replace(/^https?:\/\//, "").replace(/\/$/, "")}`
: "https://api.githubcopilot.com"
const r = await fetch(`${base}/models`, {
headers: { Authorization: `Bearer ${ctx.auth.refresh}`, "User-Agent": "opencode/1.18.15", "X-GitHub-Api-Version": "2026-06-01" },
signal: AbortSignal.timeout(5000),
})
if (!r.ok) return provider.models
const j = await r.json()
const models = {}
for (const m of j.data || []) {
if (m.policy?.state === "disabled") continue
const lim = m.capabilities?.limits
if (!lim?.max_output_tokens || !lim?.max_prompt_tokens) continue
if (m.capabilities?.supports?.tool_calls === undefined) continue
const isMsg = m.supported_endpoints?.includes("/v1/messages")
models[m.id] = {
id: m.id, providerID: "github-copilot",
api: { id: m.id, url: isMsg ? `${base}/v1` : base, npm: isMsg ? "@ai-sdk/anthropic" : "@ai-sdk/github-copilot" },
status: "active",
limit: { context: lim.max_context_window_tokens ?? lim.max_prompt_tokens, input: lim.max_prompt_tokens, output: lim.max_output_tokens },
capabilities: { temperature: true, reasoning: true, attachment: true, toolcall: m.capabilities.supports.tool_calls, input: { text: true, audio: false, image: !!m.capabilities.supports.vision, video: false, pdf: false }, output: { text: true, audio: false, image: false, video: false, pdf: false }, interleaved: false },
family: m.capabilities.family, name: m.name, cost: { input: 0, output: 0, cache: { read: 0, write: 0 } }, options: {}, headers: {},
release_date: m.version.startsWith(`${m.id}-`) ? m.version.slice(m.id.length + 1) : m.version,
}
}
return models
},
},
})Environment
- opencode 1.18.15-1 (Arch Linux package)
- GitHub Copilot subscription: active (chat completions return 200)
- OAuth apps tested: opencode's own (
Ov23li8tweQw6odWQebz) and the VSCode Copilot app (Iv1.b507a08c87ecfe98) — same result either way
Activity
github-actions commentedon Aug 12, 2026
This issue might be a duplicate of existing issues with similar symptoms. Please check:
Your root-cause analysis (all models returning
model_picker_enabled: falsefrom GitHub's API) is a distinct and well-evidenced finding. If the maintainers confirm this is a separate underlying cause, it warrants its own fix. It may also explain some of the symptoms reported in the issues above.Keylessboi commentedon Aug 12, 2026
Related issues
This appears to be the root cause behind several similar reports:
The common thread: auth succeeds,
opencode providers listshows the credential, butopencode models github-copilot→ "Provider not found" and the picker is empty.This issue documents the actual root cause (all models return
model_picker_enabled: false, so thepickerEnabledfilter empties the list) with raw API evidence and a working local-plugin workaround. If the maintainers want to consolidate, this is the issue with the diagnosis.Keylessboi commentedon Aug 12, 2026
Additional related issues surfaced by a preflight search (both closed, but relevant):
These closed reports describe the same symptom. This issue (42083) documents the root cause (
model_picker_enabledreturning false for all models) plus a working workaround.rekram1-node commentedon Aug 13, 2026
Hm I'm completely unable to reproduce, are you by any chance using a business account?
miju04 commentedon Aug 13, 2026
I've encountered this exact same issue with my private GitHub student license, where no models appear even though I am authenticated. Interestingly, with my Copilot license through work, I don’t experience this problem at all, and models are listed correctly.
This leads me to believe that the difference might be tied to how different Copilot licenses apply restrictions, especially with features like the model picker. It seems that student licenses might handle model availability differently or have inconsistencies in how permissions are reflected.
rekram1-node commentedon Aug 14, 2026
hhm what models do u have enabled in other clients then? Just the
automodel??miju04 commentedon Aug 14, 2026
Ah yes, i did that. And this seems to be the only correct way for github student, i just found this community post update about the student license only be able to work with the auto model picker.
Keylessboi commentedon Aug 14, 2026
Yes I use auto, I also have a github student account. I apologize for the long check in.
alexmatiasas commentedon Sep 7, 2026
So am I, I'm using the free version of Gh copilot though, I was asking claude, wth, man? And here I am, looks like it needs to be hardcoded in the opencode.json configuration, seems like a patch, but I decided to use alternatives like Gemini or Groq that works around the issue, even with free accounts
pipounix commentedon Oct 11, 2026
Confirming this persists on opencode v2.0.26 (latest channel, Windows) with a GitHub Copilot Free (
free_limited_copilot) account, and adding the V2 code path.Symptom
OAuth device flow succeeds (
opencode auth listshows an active GitHub Copilot credential) and the provider is registered (GET /api/provider→github-copilot,activation: auto), butopencode modelslists zerogithub-copilot/*models andopencode run --model github-copilot/gpt-4.1returnsModel unavailable.Root cause (V2)
In the bundled GitHub Copilot plugin, the per-model registry entry takes
enabledstraight from GitHub's picker field:and the sync helper additionally applies a
usable()-style filter (policy.state !== "disabled", limits,tool_calls):GitHub's
GET https://api.githubcopilot.com/modelsreturnsmodel_picker_enabled: falsefor every model on this account, so every synced model is registered asenabled: false(and the models that survive the usable() filter are hidden/disabled). Nothing is selectable, even though many of those models are fully callable.Account/API evidence (token redacted)
model_picker_enabled: true: 0;policy.state→disabled: 19, (unset): 23,enabled: 8POST /chat/completions→ 200 forgpt-4.1,gpt-4o,gpt-4o-mini,gpt-4.1-2025-04-14,gpt-4o-*/gpt-4o-mini-*dated snapshots400 model_not_supportedforgpt-5-mini,kimi-k3,claude-haiku-4.5,gpt-5.4,gpt-6-*, etc.So, as noted in this issue,
model_picker_enabledis not a reliable "usable" signal: the account works fine, the picker field is justfalse(free/student licenses appear to always report false). The registryenabledflag should instead derive from the usable predicatepolicy.state+ limits +tool_calls, or the picker field should not gate registration at all.Separately, the sync uses
AbortSignal.timeout(5000). On slower networks this aborts and logsfailed to sync GitHub Copilot models(TimeoutError), matching the reports in #52983.V2 workaround (no plugin needed)
A separate provider pointing directly at the Copilot endpoint makes the working models selectable:
This makes
copilot/gpt-4.1selectable and callable.Environment
v2.0.26(latest channel)Windows_NT 10.0.17763), PowerShell / cmdthdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊
pipounix commentedon Oct 11, 2026