Run GitHub Copilot as the gateway's upstream. You sign in with GitHub instead of an API key, TokenBeaver slims each request, and savings show as capacity — tokens and requests reclaimed, honestly framed.
There are two distinct setups. This page is mainly about the first.
Set the gateway's provider to copilot. The gateway talks to Copilot on your behalf using your GitHub sign-in — no API key. Your OpenAI-compatible agent points at the gateway as usual.
If you use Copilot's own BYOK setting, point Copilot's custom endpoint at the gateway instead. Full steps are on the providers page.
No API key — the gateway uses a GitHub token. It looks for one in this order: GITHUB_TOKEN → GH_TOKEN → gh auth token. Then set the provider to copilot (restart required).
Restart the gateway after changing the provider.
Run gh auth login in a terminal (or set GITHUB_TOKEN), then open TokenBeaver: Settings and pick copilot from the provider dropdown. Restart to apply.
By default the gateway uses the individual Copilot endpoint (https://api.individual.githubcopilot.com as the fallback). On a business or enterprise plan it falls back to the business endpoint — this path is experimental, and it depends on your org allowing programmatic API access (see troubleshooting).
Copilot speaks the OpenAI wire protocol. It works on /v1/chat/completions; sending an Anthropic /v1/messages request returns HTTP 400. Point your agent at the gateway in OpenAI-compatible mode — use OPENAI_BASE_URL, not ANTHROPIC_BASE_URL.
Copilot is treated as capacity: the dashboard shows tokens and requests saved, and it forces the capacity view when Copilot is more than half your traffic. You won't see a verified dollar figure, and Copilot savings don't count toward the Pro guarantee's dollar leg.
This is an upfront owner decision: Copilot's credits-based billing makes a token→dollar conversion unverifiable, so we don't claim dollars we can't verify. You still get the real benefit — the same answers from fewer tokens, so your Copilot allowance goes further.
no_github_token / invalid_github_tokengh auth login (or set GITHUB_TOKEN / GH_TOKEN) and restart the gateway.saml_required (403)org_policy_blocked (403, business)Open a GitHub issue → · Questions? Support
Email [email protected] or visit the support page — a real developer will get back to you.