anomalyco / anomalyco/opencode
Incorrect URL for Github Copilot API
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with OpenCode 1.18.23 on Windows PowerShell using the listed npm installation and GitHub Copilot authentication steps. Compare the github-copilot provider's default endpoint with the baseURL shown in opencode.jsonc; done means OpenCode connects to https://api.githubcopilot.com without requiring that manual override.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, node.js, powershell, typescript
- Domain
- api, developer-experience
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 70/100