Description
This issue appears on Windows machine: once installed, the authentication to the Github copilot works (auth list command confirms that) however opencode itself is trying to connect to the copilot-api.github.com site, which is incorrect.
This affects VSCode extension, terminal and Windows application running on the same PC.
The fix:
- replace content of opencode.jsonc file located in .../.config/opencode/ directory with this one:
{ "$schema": "https://opencode.ai/config.json", "autoupdate": false, "provider": { "github-copilot": { "options": { "baseURL": "https://api.githubcopilot.com" } } } }
Plugins
None
OpenCode version
1.18.23 also tested on 1.18.20
Steps to reproduce
- Open PowerShell.
- install Node.JS f not present (npm command won't work otherwise)
- Run
npm install -g opencode-ai
- Connect to the gihub copilot (generate the code and open https://github.com/login/device to authenticate)
- Open opencode and try any command. You will get an error "Cannot connect to API: was there a typo in the url or port?"
Screenshot and/or share link
No response
Operating System
Windows 11
Terminal
Windows PowerShell 7
Description
This issue appears on Windows machine: once installed, the authentication to the Github copilot works (auth list command confirms that) however opencode itself is trying to connect to the copilot-api.github.com site, which is incorrect.
This affects VSCode extension, terminal and Windows application running on the same PC.
The fix:
{ "$schema": "https://opencode.ai/config.json", "autoupdate": false, "provider": { "github-copilot": { "options": { "baseURL": "https://api.githubcopilot.com" } } } }Plugins
None
OpenCode version
1.18.23 also tested on 1.18.20
Steps to reproduce
npm install -g opencode-aiScreenshot and/or share link
No response
Operating System
Windows 11
Terminal
Windows PowerShell 7