Incorrect URL for Github Copilot API
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 70/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- github, node.js, powershell, typescript
- Domain
- api, developer-experience
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.
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
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- Avg merge
- 7h 20m
- Merged PRs (30d)
- 358
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.
More from anomalyco/opencode
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
[FEATURE]: Bump gitlab-ai-provider to 6.15.1 on v2 (Fable 5.1, GPT-6 Astra, workflow reconnect fix) Open
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
All issues in anomalyco/opencode
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100