copilot cli returns: AggregateError: Failed to list models
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
I had the same issue, and running this command NODE_TLS_REJECT_UNAUTHORIZED=0 copilot solved that issue, temporarily. But with some bash alias alias copilot="NODE_TLS_REJECT_UNAUTHORIZED=0 copilot", you can make it definitive. Not a clean fix, but it worked in my case.
First, I want to apologize for such a late follow up here especially as this is an understandably frustrating experience. 🙇
I would love to follow up with anyone here who is continuing to have problems with latest 1.0.x release since several efforts since GA to improve this experience including:
/modelpicker has been revamped to provide more information about models unavailable due to policy or plan- retrieving models from Copilot API has been made more resilient
Beyond this, we have recognize there are several different network and SSL/TLS factors that have impacted users:
- Are you in a corporate environment with firewall rules around subscription based routes?
- Do you have custom SSL/TLS certificates in your system store that conflict with Mozilla CA bundle?
- Is this a product bug that updating to a newer version will fix?
@andyfeller I am still experiencing this issue on the latest 1.0.40 release.
I am running GitHub Copilot CLI on a Windows Server 2022 virtual machine which is behind a corporate firewall, however I don't know the details of that firewall's setup, and can confirm that the copilot extensions for VS, VSCode, Neovim, and SSMS work as expected.
We use self-signed TLS certificates which may conflict with Mozilla CA bundle. This has caused issues in the past with unrelated services such as cargo.
I don't receive any error when launching the Copilot CLI, however when I attempt to prompt I receive:
✗ Execution failed: Error: Failed to list models
Likewise, when executing /model, I receive:
✗ Error loading model list: Error: Failed to list models