Expand description
GitHub Copilot provider implementation.
Copilot uses a two-step authentication flow:
- Exchange a GitHub OAuth/PAT token for a short-lived Copilot session token
via
https://api.github.com/copilot_internal/v2/token. - Use the session token to make OpenAI-compatible chat completion requests to the Copilot proxy endpoint.
The session token is cached and automatically refreshed when it expires. GitHub Enterprise Server is supported via a configurable base URL.
Structsยง
- Copilot
Provider - GitHub Copilot provider that wraps OpenAI-compatible streaming.