Skip to content

GitHub Copilot Language model unavailable #314384

@lacaz3tte

Description

@lacaz3tte

GET /models returns 403 "forbidden: access denied" — Language model unavailable in Copilot Chat

Labels: bug copilot-chat needs-investigation


Description

Copilot Chat shows "Language model unavailable" in the top-right corner. The extension repeatedly fails to fetch the model list from api.individual.githubcopilot.com/models with HTTP 403. The issue persists across reload, re-authentication, and proxy configuration changes.


Steps to reproduce

  1. Open VS Code with Remote-WSL extension connected to Ubuntu (WSL2)
  2. Install GitHub Copilot + GitHub Copilot Chat extensions
  3. Sign in to GitHub with an active Individual subscription
  4. Open Copilot Chat panel
  5. Observe "Language model unavailable" error in top-right corner
  6. Check Output → GitHub Copilot Chat for error logs

Expected behavior

The models list loads successfully and Copilot Chat works normally.


Actual behavior

Copilot Chat output log shows repeated errors:

2026-05-05 14:56:07.542 [error] Error: Failed to fetch models (f2cd369b-c05e-4348-9e7c-7bc6d91e1ae6): forbidden: access denied
2026-05-05 14:56:08.337 [info]  Fetched model metadata in 792ms
2026-05-05 14:56:08.338 [error] Error: Failed to fetch models (26fa696b-8d4e-48c4-8e5e-debc0be1c826): forbidden: access denied

Manual curl to GET /models with a freshly obtained session token also returns HTTP/2 403:

< HTTP/2 403
< content-type: text/plain; charset=utf-8
<
forbidden: access denied

Environment

Parameter Value
OS Windows 11 + WSL2 Ubuntu 24
VS Code latest (Remote-WSL)
Subscription Individual (monthly_subscriber_quota, active)
Network Corporate network, AS9123
Token endpoint api.github.com/copilot_internal/v2/token200 OK
Models endpoint api.individual.githubcopilot.com/models403

Workarounds tried (none worked)

  • Re-signing in to GitHub
  • Setting http.proxy in VS Code settings.json
  • Setting / unsetting https_proxy env variable in WSL
  • Reloading VS Code window (Developer: Reload Window)
  • Deleting ~/.vscode-server/data/User/globalStorage/github.copilot*
  • Manual curl with session token + all required headers → same 403

Additional context

The token endpoint returns 200 OK and a valid session token with correct IP and ASN embedded. However, the subsequent call to /models consistently returns 403. This suggests the issue may be a server-side policy change on the /models endpoint rather than a client-side authentication problem.

Relevant call stack from logs:

at PS._fetchModels (~/.vscode-server/bin/.../extensions/copilot/dist/extension.js:6830:4887)
at async PS.getAllChatModels (~/.vscode-server/bin/.../extensions/copilot/dist/extension.js:6830:2254)
at async $.getAllChatEndpoints (~/.vscode-server/bin/.../extensions/copilot/dist/extension.js:6830:14849)
at async dne._provideLanguageModelChatInfo (~/.vscode-server/bin/.../extensions/copilot/dist/extension.js:1707:4253)

Metadata

Metadata

Assignees

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