github-copilot provider calls the GitHub Copilot API with the models your
Copilot plan includes (Free, Pro, Pro+, Max, Business, or Enterprise). Usage
draws on the plan’s GitHub AI Credits, not a model vendor’s API key.
The type is github-copilot, not copilot, so it is not confused with
Microsoft Copilot.
Configure
The credential is a GitHub OAuth token (gho_...) for an account with Copilot
access:
config.yaml:
Getting a token
Any GitHub OAuth token for the account works, for example:model_not_supported, even when /models
lists it.
Business and Enterprise
Individual plans (Free, Pro, Pro+, Max) use the default base URL,https://api.githubcopilot.com. A Business or Enterprise seat may be served
from another endpoint; set it when requests fail with 401 or
model_not_supported:
endpoints.api in the reply of
curl -H "Authorization: Bearer $GITHUB_COPILOT_API_KEY" https://api.github.com/copilot_internal/user.
Models
GoModel lists models from Copilot’s/models. Models your plan lists but the
account has not enabled (policy disabled) are left out; enable them in your
Copilot settings and they
appear on the next model refresh.
To serve only some of them, filter
the list:
GITHUB_COPILOT_MODELS is a fallback list, used only when /models fails or
is empty; CONFIGURED_PROVIDER_MODELS_MODE=allowlist makes it the only list
and skips /models.
Chat completions and Responses on every model
Copilot serves GPT-5 and later only on/responses, and Claude, Kimi, and
older GPT models only on /chat/completions. GoModel reads each model’s
endpoints from /models and serves both APIs on every model:
Until GoModel has read a model’s endpoints, for example while
/models is
unreachable, the model is sent to /chat/completions.
A chat request to a Responses-only model is rejected with 400 when it carries
a field the translation cannot map exactly (for example logit_bias); send it
to /v1/responses instead.
Embeddings (text-embedding-3-small) are supported. Copilot only accepts a list
as input, so a single string is wrapped into a one-element list.