Skip to content
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

Support for using GH Copilot API #144

Open
meain opened this issue Jan 22, 2025 · 5 comments
Open

Support for using GH Copilot API #144

meain opened this issue Jan 22, 2025 · 5 comments

Comments

@meain
Copy link

meain commented Jan 22, 2025

Wondering how hard it would be to add support for APIs used by GH Copilot. This helps us make use of Copilot subscription with other Emacs llm frontends. chep/copilot-chat.el does make use of this if you need a reference. With the somewhat recent addition of 3.5 Sonnet, it seems like a solid option. Roo Code seems to have done something similar recently and got a good reception(from what I saw on Reddit).

@ahyatt
Copy link
Owner

ahyatt commented Jan 22, 2025

Is #113 what you are looking for? This is fairly close to finished right now.

@meain
Copy link
Author

meain commented Jan 22, 2025

GitHub models is different. It is a separate model inference API provided by GH and is not related to the Copilot subscription. Also, it does not provide access to Sonnet and has shorter context window limits for most models AFAICT.

@ahyatt
Copy link
Owner

ahyatt commented Jan 24, 2025

Thanks for the clarification. I looked around, and it doesn't look like there are docs for the API available. That doesn't mean it's not possible, but I'd have to separately reverse-engineer it, which will take some time. Because the llm package is FSF licensed, I can't just go off someone else's code.

That probably isn't something I'm going to have time for, but if there's anyone that does have FSF paperwork done, and does want to take this on, I think it'd be a reasonable thing to add. However, the lack of an API docs may mean that Github intends to make breaking changes, which is a risk factor here.

@markokocic
Copy link

Because the llm package is FSF licensed, I can't just go off someone else's code.

The chep/copilot-chat package mentioned above is MIT licensed, and MIT license is considered as an FSF compatible, meaning it can be used, bundled and distributed together with GPL code.

You are right, it may be that their API will change, but I doubt that the pace of change should be big, since there are already a lot of plugins that would break in that case.

Having support for GH Copilot would be really nice, since GH is, to my knowledge, the only AI tool that can be used free of cost for the maintainers of Open-Source projects.

@ahyatt
Copy link
Owner

ahyatt commented Jan 25, 2025

Thanks for the clarification. I'll look into this; a lot will depend on how easy it is for me to test this. I have a Github Copilot account, but whether that lets me use this functionality I don't know.

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

3 participants