Feature request: Github Copilot?
Is it possible? I am not familiar with their APIs etc.
Due to corporate policies it is the only LLM (service) that we can use on our codebases.
@anderssv yeah would love this - as far as I know copilot models are not available yet via api (would need to ask microsoft for this). Would be good to put in a feature request with them as I agree would be great.
Seems they just released a Language Server SDK, is that a viable route? https://github.blog/changelog/2025-02-10-copilot-language-server-sdk-is-now-available/
Would be really nice as Copilot now have support for both Gemini and Claude too. 😄
FYI Copilot uses an OpenAI compatible API, but has special auth. If someone were to build this provider there is a reference python implementation in LiteLLM that was just merged:
https://github.com/BerriAI/litellm/pull/8577
I expect one could copy the existing OpenAI provider with the custom auth mechanism from that PR and things should work!
I am in the same boat that for legal reasons we can also only use GitHub copilot and I would love to use this
Some guys at aider made some workarounds exposing the internal Copilot API in VSCode as a proxy
Not sure in the long run if it's worth it (it could break anytime), and on the legal side if it's even ok but worth taking a look if you're interested
https://github.com/Aider-AI/aider/issues/2227#issuecomment-2675006637 https://github.com/Aider-AI/aider/issues/2227#issuecomment-2708095212 https://github.com/Aider-AI/aider/pull/3273
While we wait (totally understand, wish I had the time to help), I recommend checking out VSCode Copilot Agent mode. It is similar in certain aspects, and getting ok results with it pointing it at a folder of Java/Kotlin projects: https://code.visualstudio.com/blogs/2025/02/24/introducing-copilot-agent-mode
I added support for this in https://github.com/block/goose/pull/1926 if anyone wants to help test
@rockwotj Can I help testing it?
I'm not set up for rust development, but I suppose it's not that hard to build it.
- clone
- checkout the branch
- execute
somebuilding command that, after burning down my decade old I3, gives me a binary?
Or just simpler to wait for someone with dev env?
Yeah @BenceBakos some being cargo build --release. You'll need a working rust toolchain setup, which is pretty painless with https://rustup.rs/
@rockwotj
cargo build --release:
...
= note: /usr/bin/ld: cannot find -lxcb: No such file or directory
collect2: error: ld returned 1 exit status
error: could not compile `goose-server` (bin "goosed") due to 1 previous error
I am not sure how your system is setup. github.com/copilot might be good at resolving. Assuming you're on linux you are missing libxcb
sudo apt-get install libx11-dev
Might do the trick or you need another system dependency.
You could also just build the goose cli and not build the server which I guess needs X11 support for something...
@rockwotj
I did:
sudo apt-get install libx11-dev
then I got error:
error: rustc 1.79.0 is not supported by the following packages:
[email protected] requires rustc 1.81.0
[email protected] requires rustc 1.81.0
[email protected] requires rustc 1.81.0
[email protected] requires rustc 1.81.0
[email protected] requires rustc 1.81
[email protected] requires rustc 1.80.1
[email protected] requires rustc 1.81
[email protected] requires rustc 1.81
[email protected] requires rustc 1.81
[email protected] requires rustc 1.81
Either upgrade rustc or select compatible dependency versions with
`cargo update <name>@<current-ver> --precise <compatible-ver>`
where `<compatible-ver>` is the latest version supporting rustc 1.79.0
did this:
rustup update stable
And now I'm getting error:
error[E0463]: can't find crate for `git_version_macro`
--> /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/git-version-0.3.9/src/lib.rs:26:9
|
26 | pub use git_version_macro::{git_submodule_versions, git_version};
I got the same error:
= note: some arguments are omitted. use `--verbose` to show all linker arguments
= note: /usr/bin/ld: cannot find -lxcb: No such file or directory
collect2: error: ld returned 1 exit status
error: could not compile `goose-cli` (bin "goose") due to 1 previous error
The fix was to install libxcb1-dev
sudo apt install libxcb1-dev
@SoAG did you test it? I am still unable to build it.
i would love to have this feature in goose