GitHub Copilot
Use your paid GitHub Copilot subscription in Empryo: sign in with a device code, watch the monthly allowance, run Claude, GPT and Gemini at no extra cost.
Copy & share
Loading sections…
Connect MCP or install the Empryo skillSection exports contain only that heading’s content. Markdown and text links fetch the selected content directly, without the rest of the page.
If you pay for GitHub Copilot, Empryo can use it. Claude Opus/Sonnet, GPT-4o, GPT-5.4, o-series, Gemini 2.5 Pro - all included in your Copilot subscription, no extra cost.
Unofficial integration using the same internal API as VS Code. Not endorsed by GitHub. Use at your own risk.
Setup
- 1Sign in
/login copilotA device-code flow (RFC 8628): Empryo shows a short code, opens
github.com/login/device, and waits while you approve. The resulting token is written to your system keychain. No IDE required. - 2Use it
Press
Ctrl+L, pickcopilot, choose a model.empryo --headless --model copilot/claude-sonnet-4.6 "explain this file"
Enterprise seats
A Copilot seat can live on a GitHub that is not github.com — GitHub Enterprise Cloud with data residency (a *.ghe.com tenant) or a self-hosted Enterprise Server. Those tenants serve every leg of the flow from their own hostnames, and a token minted on one GitHub means nothing on another, so the host is part of the sign-in rather than a setting applied afterwards:
/login copilot octocorp.ghe.com/login copilot enterprise asks for the host instead, and /login lists GitHub Copilot (Enterprise) as its own row on both the TUI picker and the desktop dialog. Headless takes it in the same position:
empryo --headless --login copilot octocorp.ghe.comGive the tenant root. api. and copilot-api. hosts are derived from it — pasting one folds back to the root rather than being taken literally:
| You are on | Device login | REST + token exchange | Inference |
|---|---|---|---|
| github.com | github.com | api.github.com | api.githubcopilot.com |
octocorp.ghe.com | octocorp.ghe.com | api.octocorp.ghe.com | copilot-api.octocorp.ghe.com |
| Enterprise Server | your host | <host>/api/v3 | whatever the token exchange names |
The host is saved next to the credential as copilotHost, and COPILOT_GITHUB_DOMAIN overrides it for one run or a CI image. Signing out returns the lane to public github.com. Business and Enterprise seats on github.com need none of this — their proxy already comes back in the token exchange and has always been followed.
The device flow uses the shared editor OAuth app id. If your enterprise registers its own app for editor clients, set COPILOT_OAUTH_CLIENT_ID to it. A *.ghe.com hostname does not by itself change which integrations your admin permits.
Reusing an IDE token instead
If you already signed in to Copilot in VS Code or JetBrains, that token works too:
jq -r '."github.com".oauth_token' ~/.config/github-copilot/apps.json
empryo --set-key copilot <token>On Windows the path is ~\AppData\Local\github-copilot\apps.json. /keys inside the TUI does the same thing.
The credential must come from a classic OAuth App, which is what both paths above produce. Tokens minted by a GitHub App (client ids starting Ov23li) are rejected by Copilot's token exchange with a 404, so a fine-grained PAT will not work here.
Which models your seat can actually run
Copilot's catalog lists every model GitHub sells, not the ones your seat may use. A plan with no premium allowance (Copilot Free, free_limited_copilot) routes only the base GPT line — gpt-4.1 and gpt-4o. Every other id answers:
The requested model is not supported.Empryo rewrites that refusal with the reason and your seat SKU instead of passing it through, because GitHub's own message names neither. Claude, Gemini and the GPT-5 line need a paid Copilot plan.
Models whose terms you have not accepted yet (policy.state: disabled — most new SKUs) are accepted automatically on first use, the same call the official editor extensions make when you pick the model there.
Two wire formats
Copilot is the only provider whose endpoint varies per model, and Empryo follows the supported_endpoints its /models declares:
| Models | Endpoint |
|---|---|
gpt-5.5, gpt-5.6-*, mai-code-* | /responses only |
gpt-5.4, gpt-5-mini | both — Empryo takes /responses |
Claude, Gemini, Kimi, gpt-4.1, gpt-4o | /chat/completions |
The Responses lane runs with store: false and encrypted reasoning replay, so a multi-step agent turn keeps its reasoning across tool calls. The mapping is cached on disk, so a --headless run resuming a saved model encodes the right wire before it opens any picker.
Reasoning effort comes from Copilot's own per-model ladder (/effort), which is not always the vendor's: Copilot's Claude SKUs take low|medium|high|max, gpt-5.6 adds none.
Usage and quota
Copilot bills a monthly allowance, not tokens, so the number that matters is how much of the month is left. GitHub reports it and Empryo shows it next to the relay subscription meters, in the same gauge:
Subscription · copilot
● pro octocat
▸ premium [▰▰▰▰▰▱▱▱▱▱] 50% ↺ 12d
chat [▰▱▱▱▱▱▱▱▱▱] 10% ↺ 12d
completions [▱▱▱▱▱▱▱▱▱▱] 0% ↺ 12d editor onlyThree allowances come back, and they are not equivalent:
| Allowance | What spends it |
|---|---|
premium | Premium model requests — what an Empryo turn costs on a paid seat |
chat | Chat requests — what an Empryo turn costs on a Free seat |
completions | Inline ghost text in an editor. Empryo never spends this. |
That last row is why completions is drawn dimmed and marked *editor only*: a spent completions cap says nothing about whether your next turn will go through, so it must never read as "your plan is spent".
Allowances your plan does not carry are omitted rather than drawn empty. A Free seat has no premium budget, and GitHub reports it as zero-of-zero — rendering that verbatim would paint a full red bar for a limit that does not exist.
Where it shows, on every surface that can carry a plan meter:
| Surface | What appears |
|---|---|
| Terminal status bar | Ambient gauge beside the context bar, on a copilot/* model |
/usage → Plan | Every allowance, with the gating one marked |
| Desktop status bar | Same gauge; click opens the Usage drawer |
| Desktop Usage drawer | A Copilot card beside the relay and DevPass meters |
| Headless | A copilot: warning on stderr after a turn that leaves an allowance nearly spent |
The status bar carries one plan meter, and it follows the model: a copilot/* turn shows the Copilot allowance, a proxy/* turn shows the relay window. They are never both true at once, so they never compete for the slot.
Numbers are cached for five minutes; they only move monthly, and GitHub's Acceptable Use Policies discourage chatty automation against their servers.
Context windows follow your seat
Copilot resells these models and caps them under their native windows. A plain seat gets Claude Opus at 200k where Anthropic serves 1M. Seats with the extended-context capability get more, and GitHub reports the number per account rather than per model.
Empryo reads both numbers Copilot publishes for each model and keeps them apart:
| Copilot reports | Empryo uses it for |
|---|---|
max_context_window_tokens | the window shown in the model picker |
max_prompt_tokens | how much of that window an input may occupy, which is what compaction budgets against |
Collapsing them made every extended-context model read as its input half. If your seat has the 1M capability, open the picker once so the live listing lands, and the larger window appears. Until then Empryo falls back to a table of plain-seat numbers, which is the safe direction to be wrong in: an overstated window means compaction never fires and Copilot rejects the turn.
Where the list comes from
Three tiers, in order, and a lower one only fills what the one above did not answer:
| Tier | Source | What it contributes |
|---|---|---|
| 1 | /models on your seat | The SKUs your plan was sold, with its real windows, prompt ceilings, output caps, effort ladders and endpoint lanes |
| 2 | models.dev | Models Copilot serves *somebody* — including SKUs a plan without the capability never lists. Windows are clamped to what Copilot resells the model at |
| 3 | The shipped table | Last resort, when both are unreachable |
Signing in replaces the seat: /login copilot drops the previous account's cached catalog (memory and copilot-models.json) and re-lists immediately, so a Free seat's numbers never survive an upgrade or an account switch.
Which rows a human is offered is GitHub's call, not a guess: the listing carries model_picker_enabled per model, and Empryo filters on it exactly as the official client does. Where no listing exists to ask — a cold start, a catalog-only row — a name pattern stands in for it (copilot-search-*, exec-agent-*, trajectory-*, the -picker / -secondary / -tertiary shadow deployments).
The client Empryo identifies as, and the line it will not cross
CAPI needs to know which protocol dialect is calling, and it answers differently for different client generations. This is not cosmetic: GitHub's 1M-token context windows are scoped in its own changelog to "Visual Studio Code and Copilot CLI", and a seat entitled to them is served them on the same model ids — claude-opus-5 comes back as 264k to one client and 1,000,000 to another, from one account, minutes apart. The difference was the contract version and the intent: X-GitHub-Api-Version: 2026-08-01 (the value the official CAPI client negotiates) and a listing that asks as model-access rather than as a chat turn.
So Empryo sends a current Editor-Version / Editor-Plugin-Version, Copilot-Integration-Id: vscode-chat and that API version. A listing goes out as model-access, a turn as conversation-agent, and a request carrying images declares Copilot-Vision-Request.
Because the extended windows arrive on the base ids, there is nothing to pick and nothing to synthesize — a seat with the capability simply reads 1M in the picker, and a seat without it reads what it was sold. Empryo never invents a -1m row.
The User-Agent says `Empryo/<version>`. It is not GitHub Copilot Chat and does not claim to be — the Acceptable Use Policies prohibit "fraudulently misrepresenting your identity", and every third-party Copilot client in the wild names itself here. For the same reason Empryo sends no VScode-MachineId, VScode-SessionId or Editor-Device-Id: the official client sends real ones, ours could only be fabricated, and a synthetic hardware id is a counterfeit installation rather than a protocol dialect. Measured on a real seat, sending them changed the catalog not at all.
Every part of the identity is overridable, because it is GitHub's to change and yours to test:
| Variable | Default |
|---|---|
COPILOT_EDITOR_VERSION | vscode/1.130.0 |
COPILOT_PLUGIN_VERSION | 0.58.0 |
COPILOT_INTEGRATION_ID | vscode-chat |
COPILOT_API_VERSION | 2026-08-01 |
COPILOT_INTEGRATION_ID=copilot-cli empryo --list-models copilot asks GitHub the same question as a different client, and the source: line says which tier answered.
Request discipline
Nothing in GitHub's terms forbids reaching Copilot from a third-party client — Section J (AI Features) governs individual seats and names no required interface. What the terms *do* name is volume: the Acceptable Use Policies prohibit "excessive automated bulk activity" and "undue burden on our servers through automated means", and Section H lets GitHub suspend API access for request rates it judges excessive, at its sole discretion.
A turn here is the same shape as a turn in Copilot CLI or the VS Code extension: one agent loop, one request per step, x-initiator: agent when the step follows a tool result. The only call that isn't part of that loop is the model listing, because a UI can trigger it with nobody asking — so that is the one thing throttled, and it is throttled harder than the client GitHub ships:
| VS Code extension | Empryo | |
|---|---|---|
| Model listing | refresh every 10 min, skipped while the window is inactive | cached 30 min, never twice inside 1 min |
| Turn requests | one per agent step | one per agent step |
| Quota poll | on demand | at most every 5 min, only on a copilot/* model |
Concretely:
- One listing per minute per process, floor. Every picker open, cache invalidation and login collapses into one question; a sign-in is the single event allowed to bypass it.
- A 429 or 403 is a stop, not a retry. Empryo backs off for
Retry-After(or 15 minutes), serves the seat's last listing from disk, and says so once. - A refused credential is probed once. The GitHub-App fallback runs a single time per token per process, never in a loop.
- Quota is read at most every five minutes, and only for a
copilot/*model.
Legal position
GitHub restructured its terms on 27 April 2026. What governs Copilot now depends on your seat:
| Seat | Governed by |
|---|---|
| Business, Enterprise | GitHub Copilot Product Specific Terms |
| Everything else | Section J (AI Features) of the GitHub Terms of Service |
Section J covers ownership of input and output, model training and the opt-out, disclaimers and indemnity. It places no restriction on which client you use. The constraints that do apply come from elsewhere in the agreement:
The official route
Since mid-2026 GitHub ships a supported path that did not exist when this integration was written:
| Package | What it is |
|---|---|
| `@github/copilot` | The official Copilot CLI |
| `@github/copilot-sdk` | MIT-licensed TypeScript SDK that drives that CLI over JSON-RPC |
If being on a sanctioned integration matters more to you than running Copilot models inside Empryo's own agent loop, that SDK is the route GitHub endorses. Empryo's provider talks to the chat endpoint directly instead, which is what lets Copilot models use the same tools, Genome and compaction as every other provider.
Re-verify if GitHub publishes updated terms after 2026-08-02.