codex icon indicating copy to clipboard operation
codex copied to clipboard

Github Copilot Provider

Open SilverMarcs opened this issue 3 months ago • 4 comments

What feature would you like to see?

It would be nice to have Github copilot as a model provider. Copilot offers an endpoint that is OpenAI compatible but requires Github authentication and token refreshing.

Are you interested in implementing this feature?

No response

Additional information

I think it was available in the non-rust version but has not been ported yet

SilverMarcs avatar Sep 15 '25 01:09 SilverMarcs

I would be open to help implementing this.

A rough plan could be:

  • Add a new copilot provider that can be enabled via configuration.
  • Implement the authentication flow to read the local GitHub token and exchange it for a temporary API token.
  • Create a client adapter for the Copilot Chat API endpoint.
  • Add a simple way in the TUI to manage sign-in and see the current status.

For the auth and client logic, I'd plan to take inspiration from Zed's implementation, which seems quite solid: https://github.com/zed-industries/zed/tree/main/crates/copilot/src

Does this seem like a reasonable approach?

benjosua avatar Nov 19 '25 11:11 benjosua

Seems good. Would be great to have model selector working seamlessly with copilots model unless it brings about serious complexity at which point setting model via cli flag might be simpler

SilverMarcs avatar Nov 19 '25 20:11 SilverMarcs

Hello @pakrym-oai,

I've implemented the GitHub Copilot provider as outlined in my previous comment.

Could I get approval from an OpenAI team member to open a PR? I want to make sure this aligns with the project roadmap before submitting.

Thanks

benjosua avatar Nov 24 '25 13:11 benjosua

Hello @pakrym-oai,

I've implemented the GitHub Copilot provider as outlined in my previous comment.

Could I get approval from an OpenAI team member to open a PR? I want to make sure this aligns with the project roadmap before submitting.

Thanks

@benjosua Do you have a branch somewhere so community could test?

flacks avatar Dec 13 '25 09:12 flacks