copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

copilot cli returns: AggregateError: Failed to list models

Open saiaprameya opened this issue 10 months ago • 23 comments

Describe the bug

I am trying to use copilot cli enterprise. I have successfully logged in but after that none of the commands are working:

● Welcome snagaman_cisco!

● GitHub MCP Server: Connected

✗ Execution failed: AggregateError: Failed to list models

✗ Execution failed: AggregateError: Failed to list models

✗ Execution failed: AggregateError: Failed to list models

✗ Execution failed: AggregateError: Failed to list models

✗ Execution failed: AggregateError: Failed to list models

✗ Execution failed: AggregateError: Failed to list models

/model results in

Select Model

Choose the AI model to use for Copilot CLI. The selected model will be persisted and used for future sessions.

Error loading model list: AggregateError: Failed to list models

Some models are not available. For information on Copilot policies and subscription, visit: https://github.com/settings/copilot/features

I am running this from WSL2 (5.15.167.4-microsoft-standard-WSL2) on WINDOWS 11

The same thing is working from my VS CODE as plugin perfectly. This VS Code is being from WSL env.

Regards Sai

Affected version

0.0.391 Commit: e5c18e1

Steps to reproduce the behavior

copilot

/model

Expected behavior

No response

Additional context

WSL2 (5.15.167.4-microsoft-standard-WSL2) on WINDOWS 11 Enterprise

saiaprameya avatar Jan 22 '26 23:01 saiaprameya

Github: please provide better error messages. There are way more errors than you think.

credmond avatar Jan 26 '26 19:01 credmond

GitHub Copilot v0.0.395 on Linux also has this problem, just by attempting to list models with /model or /models

rakotomandimby avatar Jan 27 '26 07:01 rakotomandimby

2026-01-27T08:46:29.979Z [ERROR] Starting remote MCP client for github-mcp-server with url: https://api.individual.githubcopilot.com/mcp/readonly
2026-01-27T08:46:29.979Z [ERROR] Creating MCP client for github-mcp-server...
2026-01-27T08:46:29.981Z [ERROR] Connecting MCP client for github-mcp-server...
2026-01-27T08:46:30.245Z [ERROR] MCP transport for github-mcp-server closed
2026-01-27T08:46:30.245Z [ERROR] Failed to start MCP client for remote server github-mcp-server: TypeError: fetch failed
2026-01-27T08:46:30.245Z [ERROR] GitHub MCP server configured after authentication

rakotomandimby avatar Jan 27 '26 08:01 rakotomandimby

using vpn solved the issue

fcat97 avatar Jan 29 '26 14:01 fcat97

having the same problem on v0.0.400

Image

variable avatar Feb 01 '26 06:02 variable

@variable , the @fcat97 user reported that using a VPN is a workaround. Can you try to confirm? I do not like that kind of workaround, nor that policy to filter per IP address, though...

rakotomandimby avatar Feb 02 '26 10:02 rakotomandimby

@variable , the @fcat97 user reported that using a VPN is a workaround. Can you try to confirm? I do not like that kind of workaround, nor that policy to filter per IP address, though...

I don't understand how VPN has anything to do with this.

variable avatar Feb 03 '26 02:02 variable

Agreed, VPNs don't come in to the picture.

Could Copilot CLI start by providing better error messages?

Simple stuff like: HTTP method, URL, response code (if any), response body (if any), etc.

Telling us the models are not available, or that it's a policy issue, is completely wrong.

credmond avatar Feb 03 '26 08:02 credmond

For me, when I directly connect to Wi-Fi, it works. But if I connect with Android Hotspot, it doesn't. But using VPN with Android Hotspot, it works again. Weird I know!

I'm using copilot on Ubuntu 25.10

fcat97 avatar Feb 03 '26 09:02 fcat97

+1

Ayyoub-Ka avatar Feb 04 '26 13:02 Ayyoub-Ka

خترق

shskol92-create avatar Feb 04 '26 14:02 shskol92-create

I'm also having the issue with version v0.0.403

Image

And the logs:

2026-02-05T14:32:11.034Z [ERROR] Starting remote MCP client for github-mcp-server with url: https://api.business.githubcopilot.com/mcp/readonly 2026-02-05T14:32:11.034Z [ERROR] Creating MCP client for github-mcp-server... 2026-02-05T14:32:11.037Z [ERROR] Connecting MCP client for github-mcp-server... 2026-02-05T14:32:11.037Z [DEBUG] Creating copilot-client for integration ID copilot-developer-cli with token authentication. User-agent: copilot/0.0.403 (darwin v24.11.1) term/vscode 2026-02-05T14:32:11.280Z [INFO] No update needed, current version is 0.0.403, fetched latest release is v0.0.403 2026-02-05T14:32:11.451Z [DEBUG] Failed to initialize tools for validation: Error: Failed to list models: 403 2026-02-05T14:32:11.795Z [ERROR] MCP client for github-mcp-server connected, took 758ms 2026-02-05T14:32:11.796Z [ERROR] MCP server github-mcp-server provided instructions: The GitHub MCP Server provides tools to interact with GitHub platform.

Not sure what is happening, tried vpn, no vpn, wifi, hotspot nothing is working. I have a pro subscription with cli enabled. Thanks

mogaleaf avatar Feb 05 '26 14:02 mogaleaf

I had the same problem in MacOS, directly connecting to internet, faced with the following error

Signed in successfully as You can now use Copilot.

Select Model

Choose the AI model to use for Copilot CLI. The selected model will be persisted and used for future sessions.

Error loading model list: AggregateError: Failed to list models

Some models are not available. For information on Copilot policies and subscription, visit: https://github.com/settings/copilot/features

Search models...

sg-victorchai avatar Feb 08 '26 04:02 sg-victorchai

I'm now experiencing the same error with v0.0.406. This on a Windows 11 machine using Powershell 7.5.4 in Windows Terminal.

Image

Tjeerd-menno avatar Feb 09 '26 10:02 Tjeerd-menno

Might have the answer.

Could be an IPv6 issue.

For me, everything worked fine until I paired with my phone.

Trying to diagnose further, the API lookup over IPv6 failed

echo This works
curl -4 -I https://api.github.com
echo This fails
curl -6 -I https://api.github.com

When I disabled IPv6 through sysctl, and it then works (both ping commands), and the models return. Logging in always worked.

Fully admit, I don't know why this solution works. According to AI:

  - Those Copilot endpoints (api.*.githubcopilot.com, plus GitHub API calls) publish AAAA (IPv6) and A (IPv4) records.
  - On your tether, WSL had some IPv6 plumbing (an IPv6 address and even a default IPv6 route), but the upstream path
    was effectively unusable or inconsistent.
  - Node’s HTTP client (Copilot CLI is Node) will often try the IPv6 address first (or try multiple addresses and
    collect failures). When IPv6 is “present but broken”, you get slow timeouts / multiple connection failures, and Node
    can surface that as an AggregateError after retries.
  - Disabling IPv6 forces everything onto IPv4, so those requests stop hitting the broken path.

teh-hippo avatar Feb 10 '26 11:02 teh-hippo

Might have the answer.

Could be an IPv6 issue.

For me, everything worked fine until I paired with my phone.

Trying to diagnose further, the API lookup over IPv6 failed

echo This works
curl -4 -I https://api.github.com
echo This fails
curl -6 -I https://api.github.com

When I disabled IPv6 through sysctl, and it then works (both ping commands), and the models return. Logging in always worked.

Fully admit, I don't know why this solution works. According to AI:

  - Those Copilot endpoints (api.*.githubcopilot.com, plus GitHub API calls) publish AAAA (IPv6) and A (IPv4) records.
  - On your tether, WSL had some IPv6 plumbing (an IPv6 address and even a default IPv6 route), but the upstream path
    was effectively unusable or inconsistent.
  - Node’s HTTP client (Copilot CLI is Node) will often try the IPv6 address first (or try multiple addresses and
    collect failures). When IPv6 is “present but broken”, you get slow timeouts / multiple connection failures, and Node
    can surface that as an AggregateError after retries.
  - Disabling IPv6 forces everything onto IPv4, so those requests stop hitting the broken path.

My IPV6 works fine with api.github.com, still having the same model list problem.

variable avatar Feb 10 '26 19:02 variable

+1

GuilhermeYm avatar Feb 16 '26 21:02 GuilhermeYm

It suddenly worked fine for a day, then the next day I tried to use it again, I started having "Error loading model list: Error: Failed to list models"

Image

The tool is too unstable to use.

variable avatar Feb 22 '26 19:02 variable

I have the same issue with preRelease version GitHub Copilot CLI 0.0.417 on my MacOS Hmm, has the solution been found yet?

quangnguyenbh avatar Feb 25 '26 06:02 quangnguyenbh

updated: on macOS use workaround in this ticket https://github.com/github/copilot-cli/issues/1104 works for me!

quangnguyenbh avatar Feb 25 '26 07:02 quangnguyenbh