GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub Copilot provider shows zero models: all models return `model_picker_enabled: false` · Issue #42083 · anomalyco/opencode

GitHub Copilot provider shows zero models: all models return model_picker_enabled: false #42083

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
GitHub Copilot provider shows zero models: all models return model_picker_enabled: false#42083
Copy link
Assignees
nexxeln

Description

@Keylessboi
Keylessboi
opened on Aug 12, 2026
Issue body actions

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 by usable() inside CopilotModels.get) without the pickerEnabled filter, or
  • Union pickerEnabled with 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
Reacted by Nick Kadutskyi, Juan de Dios Hernández, Alvaro Pastor-Sanchez, Daniel Pallares and Alejandro

Activity

  1. github-actions
    assigned
    nexxeln
    on Aug 12, 2026
  2. github-actions commented on Aug 12, 2026

    @github-actions
    github-actionsBot
    on Aug 12, 2026 – with GitHub Actions
    Contributor
    More actions

    This issue might be a duplicate of existing issues with similar symptoms. Please check:

    • GitHub Copilot models not appearing in /models after successful OAuth authentication #38812: GitHub Copilot models not appearing in /models after successful OAuth authentication — same user-facing symptom (zero models in picker after auth), possibly the same root cause
    • GitHub Copilot OAuth succeeds but provider is never registered ("Provider not found: github-copilot") #41820: GitHub Copilot OAuth succeeds but provider is never registered — similar outcome (no Copilot models available), different reported cause

    Your root-cause analysis (all models returning model_picker_enabled: false from 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.

  3. Keylessboi commented on Aug 12, 2026

    @Keylessboi
    Keylessboi
    on Aug 12, 2026
    Author
    More actions

    Related issues

    This appears to be the root cause behind several similar reports:

    • GitHub Copilot OAuth succeeds but provider is never registered ("Provider not found: github-copilot") #41820 — GitHub Copilot OAuth succeeds but provider is never registered
    • GitHub Copilot provider fails silently on Linux (v1.18.13) — OAuth token missing copilot scope, no models registered #40828 — GitHub Copilot provider fails silently on Linux (v1.18.13)
    • GitHub Copilot models not appearing in /models after successful OAuth authentication #38812 — GitHub Copilot models not appearing in /models after successful OAuth authentication
    • GitHub Copilot Free/Student plans (Auto-only) show no models: add github-copilot/auto #34644 — GitHub Copilot provider not registered/found for Copilot Student plan (Auto-only mode)

    The common thread: auth succeeds, opencode providers list shows the credential, but opencode 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 the pickerEnabled filter 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.

  4. Keylessboi commented on Aug 12, 2026

    @Keylessboi
    Keylessboi
    on Aug 12, 2026
    Author
    More actions

    Additional related issues surfaced by a preflight search (both closed, but relevant):

    • Github Copilot models wont appear after connect OAuth #41088 — Github Copilot models wont appear after connect OAuth (closed)
    • GitHub Copilot provider broken #33696 — GitHub Copilot provider broken (closed)

    These closed reports describe the same symptom. This issue (42083) documents the root cause (model_picker_enabled returning false for all models) plus a working workaround.

  5. rekram1-node commented on Aug 13, 2026

    @rekram1-node
    rekram1-node
    on Aug 13, 2026
    Member
    More actions

    Hm I'm completely unable to reproduce, are you by any chance using a business account?

  6. miju04 commented on Aug 13, 2026

    @miju04
    miju04
    on Aug 13, 2026
    More actions

    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.

    Reacted by Alejandro
  7. rekram1-node commented on Aug 14, 2026

    @rekram1-node
    rekram1-node
    on Aug 14, 2026
    Member
    More actions

    hhm what models do u have enabled in other clients then? Just the auto model??

  8. miju04 commented on Aug 14, 2026

    @miju04
    miju04
    on Aug 14, 2026
    More actions

    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.

  9. Keylessboi commented on Aug 14, 2026

    @Keylessboi
    Keylessboi
    on Aug 14, 2026
    Author
    More actions

    Yes I use auto, I also have a github student account. I apologize for the long check in.

  10. alexmatiasas commented on Sep 7, 2026

    @alexmatiasas
    alexmatiasas
    on Sep 7, 2026
    More actions

    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.

    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

  11. pipounix commented on Oct 11, 2026

    @pipounix
    pipounix
    on Oct 11, 2026
    More actions

    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 list shows an active GitHub Copilot credential) and the provider is registered (GET /api/provider → github-copilot, activation: auto), but opencode models lists zero github-copilot/* models and opencode run --model github-copilot/gpt-4.1 returns Model unavailable.

    Root cause (V2)

    In the bundled GitHub Copilot plugin, the per-model registry entry takes enabled straight from GitHub's picker field:

    // per-model builder
    status: "active", enabled: a.model_picker_enabled, /* ... */

    and the sync helper additionally applies a usable()-style filter (policy.state !== "disabled", limits, tool_calls):

    async function gQ(e, a) {
      let i = await fetch(`${e}/models`, {
        headers: a,
        signal: AbortSignal.timeout(5000),
      });
      /* ... */
    }

    GitHub's GET https://api.githubcopilot.com/models returns model_picker_enabled: false for every model on this account, so every synced model is registered as enabled: 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)

    • total models returned: 50; model_picker_enabled: true: 0; policy.state → disabled: 19, (unset): 23, enabled: 8
    • Direct POST /chat/completions → 200 for gpt-4.1, gpt-4o, gpt-4o-mini, gpt-4.1-2025-04-14, gpt-4o-* / gpt-4o-mini-* dated snapshots
    • Same endpoint → 400 model_not_supported for gpt-5-mini, kimi-k3, claude-haiku-4.5, gpt-5.4, gpt-6-*, etc.

    So, as noted in this issue, model_picker_enabled is not a reliable "usable" signal: the account works fine, the picker field is just false (free/student licenses appear to always report false). The registry enabled flag should instead derive from the usable predicate policy.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 logs failed 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:

    "providers": {
      "copilot": {
        "name": "GitHub Copilot",
        "package": "@opencode/ai/providers/openai-compatible",
        "settings": {
          "baseURL": "https://api.individual.githubcopilot.com",
          "apiKey": "<copilot oauth token>"
        },
        "models": { "gpt-4.1": {}, "gpt-4o": {}, "gpt-4o-mini": {} }
      }
    }

    This makes copilot/gpt-4.1 selectable and callable.

    Environment

    • opencode v2.0.26 (latest channel)
    • Windows (Windows_NT 10.0.17763), PowerShell / cmd
    • No plugins active
  12. thdxr commented on Oct 11, 2026

    @thdxr
    thdxr
    on Oct 11, 2026
    Member
    More actions

    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 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

    Reacted by Cardin Lee and Travis Fiorito
  13. thdxr
    closed this as not plannedon Oct 11, 2026
  14. pipounix commented on Oct 11, 2026

    @pipounix
    pipounix
    on Oct 11, 2026 via email
    More actions
    All the tests I ran were on v2; thanks for the reply. El dom, 11 oct 2026 a las 14:51, Dax ***@***.***>) escribió:
    …
    Closed #42083 <#42083> as not planned. — Reply to this email directly, view it on GitHub <#42083?email_source=notifications&email_token=AUGSSLAGLBJT5ZNZOATXT6T5TPCB7A5CNFSNUABQM5UWIORPF5TWS5BNNB2WEL2JONZXKZKFOZSW45CON52GSZTJMNQXI2LPNYXTGMRZHE3DMNJWGQYDBJTSMVQXG33OU5RW63LNMVXHJJLFOZSW45FMMZXW65DFOJPWG3DJMNVQ#event-32996656400>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AUGSSLCRGHUYWQ27XURZTQD5TPCB7AVCNFSNUABFKJSXA33TNF2G64TZHM4TONJXGM2DGMJZHNEXG43VMU5TKMJTGMYTCMRUGQ22C5QC> . Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS <https://github.com/notifications/mobile/ios/AUGSSLFJJEHKM7AGYJT6JPD5TPCB7A5CNFSNUABQM5UWIORPF5TWS5BNNB2WEL2JONZXKZKFOZSW45CON52GSZTJMNQXI2LPNYXTGMRZHE3DMNJWGQYDBJTSMVQXG33OU5RW63LNMVXHJJLFOZSW45FKMZXW65DFOJPWS33T> and Android <https://github.com/notifications/mobile/android/AUGSSLBYJMBSAHMQ72BDZVD5TPCB7A5CNFSNUABQM5UWIORPF5TWS5BNNB2WEL2JONZXKZKFOZSW45CON52GSZTJMNQXI2LPNYXTGMRZHE3DMNJWGQYDBJTSMVQXG33OU5RW63LNMVXHJJLFOZSW45FOMZXW65DFOJPWC3TEOJXWSZA>. Download it today! You are receiving this because you commented.Message ID: ***@***.***>
    --
    Reacted by Alejandro
  15. Keylessboi commented on Nov 19, 2026

    @Keylessboi
    Keylessboi
    on Nov 19, 2026
    Author
    More actions

    This is still an issue with v2 as shown above, why is it closed?

  16. rekram1-node commented on Nov 19, 2026

    @rekram1-node
    rekram1-node
    on Nov 19, 2026
    Member
    More actions

    opencode v2 supports the auto model, so if you are on the latest v2 w/ a plan that has all models model_picker_enabled: false then you will have the auto model available.

    If it isn't showing up plz open a new issue w/ the specifics of your setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @nexxeln
    nexxeln

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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.