GitHub Copilot
GitHub Copilot is available on the Spanway gateway through the github_copilot/ model prefix. You register a GitHub Copilot model once in the gateway's config.yaml (or through the Admin UI), and every application then calls it through the gateway's OpenAI-compatible API with a Spanway virtual key. The provider credential stays on the gateway, and every request is authenticated, rate limited, logged and costed in the same way as any other provider.
The gateway translates requests and responses for GitHub Copilot natively, so provider specific parameters and errors are mapped to the OpenAI format for you.
Supported endpoints
The gateway's endpoint support matrix lists the following endpoints for GitHub Copilot. Each link explains the request shape and the gateway features that apply to that endpoint.
- OpenAI Chat Completions API (
/chat/completions) - Anthropic Messages API (
/messages) - OpenAI Responses API (
/responses) - A2A (Agent-to-Agent) protocol for agent communication (
/a2a) - Google Interactions API (
/interactions)
Model types
The bundled price map lists 43 GitHub Copilot models across these modes: Chat, Text completion, Responses, Embedding. The mode decides which gateway endpoint a model is meant for, and it is also used by the gateway's health checks to send the right kind of test request.
Environment variables
The GitHub Copilot integration reads the following environment variables. Variables marked as required are the ones the gateway's environment validation checks for this provider. You can also pass any of these values directly in spanway_params (for example api_key or api_base), and the per-model value wins over the environment.
| Variable | Required | Purpose |
|---|---|---|
GITHUB_COPILOT_TOKEN_DIR | No | Folder that holds the device sign-in tokens the gateway sends to GitHub Copilot. The gateway never sends OPENAI_API_KEY to Copilot |
GITHUB_COPILOT_ACCESS_TOKEN_FILE | No | File name of the sign-in access token inside that folder, access-token by default |
GITHUB_COPILOT_API_KEY_FILE | No | File name of the short lived Copilot key inside that folder, api-key.json by default |
Reference a variable from config.yaml with the os.environ/ prefix so that the secret never appears in the file itself. Secrets can also come from a secret manager, see secret managers.
Each developer's own Copilot seat
A shared credential sends every request through one Copilot account. With the auth type Per-user GitHub OAuth (github_copilot_auth_type: per_user_oauth on the credential), each developer connects their own Copilot seat once, and their requests to a model on that credential use their own seat. Requests from a developer who has not connected are refused with a message that says how to connect, and the gateway never shares one person's token with another.
- Open Models + Endpoints, pick the Add Model tab, choose GitHub Copilot as the Provider, set Auth Type: to Per-user GitHub OAuth, click Create credential and name it.
- Add the model on that credential, which sets
spanway_credential_nameon the deployment. - Each developer opens the LLM Credentials tab, finds the credential under Your connections, clicks Connect, enters the code from the Connect GitHub Copilot dialog on the provider's page and waits for Connected as @their-login.
Connecting and disconnecting are written to the audit log, without the token. See personal provider connections for every step, the API calls and the errors.
Models and pricing
The table lists every GitHub Copilot model in the gateway's bundled price map. Prices are shown in US dollars per 1 million tokens, computed from the per-token values the gateway uses for spend tracking. Context window sizes are the provider limits recorded in the same file. Capabilities are the supports_* flags set for each model.
Prices come from the price map bundled with this Spanway build. They are used to calculate the spend recorded for each request, key, team and user. Your negotiated rates may differ, and you can override them per deployment with custom pricing.
Model (model value) | Mode | Max input tokens | Max output tokens | Input per 1M tokens | Output per 1M tokens | Other pricing | Capabilities |
|---|---|---|---|---|---|---|---|
github_copilot/claude-fable-5 | Chat | 200,000 | 64,000 | tools, vision, reasoning, structured output | |||
github_copilot/claude-fable-5.1 | Chat | 200,000 | 64,000 | tools, vision, reasoning, structured output | |||
github_copilot/claude-haiku-4.5 | Chat | 128,000 | 16,000 | $1.00 | $5.00 | tools, vision, reasoning | |
github_copilot/claude-haiku-5.5 | Chat | 128,000 | 16,000 | $0.1 | $0.5 | tools, vision, reasoning, structured output | |
github_copilot/claude-opus-4.8 | Chat | 200,000 | 64,000 | tools, vision, reasoning, structured output | |||
github_copilot/claude-opus-4.8-fast | Chat | 200,000 | 64,000 | tools, vision, reasoning, structured output | |||
github_copilot/claude-opus-5 | Chat | 200,000 | 64,000 | tools, vision, reasoning, structured output | |||
github_copilot/claude-opus-5.5 | Chat | 200,000 | 128,000 | tools, vision, reasoning, structured output | |||
github_copilot/claude-sonnet-5 | Chat | 200,000 | 64,000 | tools, vision, reasoning, structured output | |||
github_copilot/claude-sonnet-5.5 | Chat | 200,000 | 128,000 | tools, vision, reasoning, structured output | |||
github_copilot/gemini-3.7-flash | Chat | 200,000 | 64,000 | tools, vision, reasoning | |||
github_copilot/gemini-3.8-flash | Chat | 200,000 | 65,536 | tools, vision, reasoning | |||
github_copilot/gpt-3.5-turbo | Chat | 16,384 | 4,096 | tools | |||
github_copilot/gpt-3.5-turbo-0613 | Chat | 16,384 | 4,096 | tools | |||
github_copilot/gpt-4 | Chat | 32,768 | 4,096 | tools | |||
github_copilot/gpt-4-0613 | Chat | 32,768 | 4,096 | tools | |||
github_copilot/gpt-4-o-preview | Chat | 64,000 | 4,096 | tools | |||
github_copilot/gpt-4.1 | Chat | 128,000 | 16,384 | tools, vision, structured output | |||
github_copilot/gpt-4.1-2025-04-14 | Chat | 128,000 | 16,384 | tools, vision, structured output | |||
github_copilot/gpt-4o | Chat | 64,000 | 4,096 | tools, vision | |||
github_copilot/gpt-4o-2024-05-13 | Chat | 64,000 | 4,096 | tools, vision | |||
github_copilot/gpt-4o-2024-08-06 | Chat | 64,000 | 16,384 | tools | |||
github_copilot/gpt-4o-2024-11-20 | Chat | 64,000 | 16,384 | tools, vision | |||
github_copilot/gpt-4o-mini | Chat | 64,000 | 4,096 | tools | |||
github_copilot/gpt-4o-mini-2024-07-18 | Chat | 64,000 | 4,096 | tools | |||
github_copilot/gpt-5-mini | Chat | 128,000 | 64,000 | $0.25 | $2.00 | tools, vision, structured output | |
github_copilot/gpt-5.3-codex | Responses | 128,000 | 128,000 | $1.75 | $14.00 | tools, vision, reasoning, structured output | |
github_copilot/gpt-5.4 | Chat | 272,000 | 128,000 | tools, vision, reasoning, structured output | |||
github_copilot/gpt-5.4-mini | Responses | 272,000 | 128,000 | tools, vision, reasoning, structured output | |||
github_copilot/gpt-5.5 | Responses | 272,000 | 128,000 | tools, vision, reasoning, structured output | |||
github_copilot/gpt-5.6-luna | Responses | 200,000 | 128,000 | tools, vision, reasoning, structured output | |||
github_copilot/gpt-5.6-sol | Responses | 272,000 | 128,000 | tools, vision, reasoning, structured output | |||
github_copilot/gpt-5.6-terra | Responses | 272,000 | 128,000 | tools, vision, reasoning, structured output | |||
github_copilot/gpt-6-astra | Responses | 272,000 | 128,000 | tools, vision, reasoning, structured output | |||
github_copilot/gpt-6-luna | Responses | 272,000 | 128,000 | tools, vision, reasoning, structured output | |||
github_copilot/gpt-6-sol | Responses | 272,000 | 128,000 | tools, vision, reasoning, structured output | |||
github_copilot/gpt-6.1-sol | Responses | 272,000 | 128,000 | tools, vision, reasoning, structured output | |||
github_copilot/gpt-41-copilot | Text completion | ||||||
github_copilot/kimi-k3 | Chat | 917,504 | 131,072 | tools, vision, structured output | |||
github_copilot/mai-code-1.1-flash | Responses | 128,000 | 128,000 | tools, vision, structured output | |||
github_copilot/text-embedding-3-small | Embedding | 8,191 | |||||
github_copilot/text-embedding-3-small-inference | Embedding | 8,191 | |||||
github_copilot/text-embedding-ada-002 | Embedding | 8,191 |