8000 Github Copilot Support · Issue #144 · sst/opencode · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Github Copilot Support #144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
davioliveira-dev opened this issue Jun 16, 2025 · 4 comments
Open

Github Copilot Support #144

davioliveira-dev opened this issue Jun 16, 2025 · 4 comments
Assignees

Comments

@davioliveira-dev
Copy link

Setting up as Open AI work, but Antrophic models doesn't shows up.

https://aider.chat/docs/llms/github.html

@thdxr thdxr self-assigned this Jun 16, 2025
@GitMurf
Copy link
GitMurf commented Jun 16, 2025

@davioliveira-dev how are you getting gh copilot to work? did you do a custom opencode.json? If so, how did you populate it to get it to work? Thanks!

@timotah
Copy link
timotah commented Jun 18, 2025

attempted configuring an opencode.json with no luck, would love to see github copilot as a provider option as it is free for students. @davioliveira-dev if you don't mind could you share how you achieved this configuration with opencode? Thanks!

@mhuggins7278
Copy link

An example would be awesome I was just saying to someone at work that I want to try this exact setup.

@thijsvdanker
Copy link
thijsvdanker commented Jun 18, 2025

This is what worked for me:

  1. generate a token with a jetbrains IDE (https://aider.chat/docs/llms/github.html#where-do-i-get-the-token)
    I got api warnings when using the token that was generated with neovims copilot.lua plugin
    You can use a EAP version like https://www.jetbrains.com/webstorm/nextversion/, install the copilot plugin and login
  2. Add copilot to the auth.json file
  3. find the models you want to use https://aider.chat/docs/llms/github.html#discover-available-models
  4. add the models to an opencode.json file in your project folder

2: Add copilot to the auth.json file

~/.local/share/opencode/auth.json

{
    "copilot": {
        "type": "api",
        "key": "{{ paste oauth token from ~/.config/github-copilot/apps.json here }}"
    }
}

4: Add the models to an opencode.json file in your project folder

Add the models to the opencode.json file in your project folder

{
    "$schema": "https://opencode.ai/config.json",
    "provider": {
        "copilot": {
            "npm": "@ai-sdk/openai-compatible",
            "options": {
                "baseURL": "https://api.githubcopilot.com"
            },
            "models": {
                "gpt-4o": {
                    "name": "gpt-4o"
                },
                "claude-3.7-sonnet": {
                    "name": "claude-3.7-sonnet"
                }
            }
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
0