GitHub Copilot App
Last updated
Copilot's agent sessions are limited to the small, curated model list GitHub ships in the app. Add Tempr Gateway as a BYOK provider and those same agent sessions can use any model on your gateway allowlist, well beyond whatever GitHub has decided to enable that month.
GitHub controls which models appear in Copilot's picker by default, and rolls new ones out on its own schedule. A Tempr-backed provider entry puts every model you've configured (including ones Copilot hasn't added yet, or never will) directly in that same picker.
BYOK covers the app's model-powered agent sessions only. Inline code completions in your editor still use Copilot's own service. Your organization needs the "Enable custom models (BYOK)" admin policy turned on, and a recent version of the Copilot app.
-
Create a virtual key
In the Portal, create a Gateway virtual key. Keys are prefixed
tvk_and shown once at creation. -
Add a provider key
Gateway is BYOK: add a key for at least one provider from the supported list.
-
Add Tempr as a provider
In the Copilot app, go to Settings → Model Providers → Add provider, choose OpenAI-compatible, set the base URL to
https://api.temprhq.io/v1, and paste your virtual key. Models on your allowlist will appear in Copilot's model picker. It shows whatGET /v1/modelslists: only the providers you've added keys for, so an empty picker means no provider key yet.
On a coding plan
Tempr serves each coding plan only to the tools its vendor allows, and recognises a tool by the identity it sends. Copilot sends only a generic identity to a custom endpoint, so Tempr can't tell it from a script, and a plan limited to the tools its vendor names, or to coding tools Tempr recognises (Z.AI, Kimi, Alibaba, Tencent, KUAE and others), refuses it with a plan_tool_not_allowed error. Copilot can use the plans that accept any tool: MiniMax, StepFun, Synthetic, Ollama Cloud, NanoGPT, Fire Pass and ClinePass. Name the model by the plan: minimax-plan/MiniMax-M3.1-Flash-Preview. Tempr can get the plan's key two ways:
- Stored in Tempr. Add the plan's key under Provider keys in the Portal, and keep Copilot's settings as they are, with your virtual key.
- Sent with each request needs a setting for an extra header, which the Copilot app's provider settings don't have. Copilot Chat in VS Code does: under Chat: Manage Language Models, a Custom Endpoint model takes the plan's key as its
apiKeyand your virtual key inrequestHeadersasx-tempr-key.
Several plans are sold only for the coding tools they support, and some refuse other tools, telling them apart by the identity each tool sends. Tempr passes Copilot's own along and never sends another, so check which tools each plan supports before you subscribe.
Ask Copilot about your Gateway
Copilot can also read your Gateway through the Gateway's own MCP server: usage and cost, request logs and one request's routing, keys, plan, and providers cooling down. Ask it "why did my last few requests fail?" or "which key spent the most this week?" in an agent session. It comes with the Gateway Pro, Scale and Enterprise plans.
The Copilot app uses the MCP servers you set up for Copilot CLI, in ~/.copilot/mcp-config.json:
-
Create a management key
In the Portal, under Gateway → Keys → Management keys (or Organization → Org keys for an organization's Gateway). A management key reads and manages the Gateway but can't call models, so it's separate from the
tvk_virtual key in your provider settings. Tick what Copilot may do: Read usage, Read request logs and List keys to read; Create, change and revoke keys as well if it may change keys. -
Add the server
Put the key in
TEMPR_MANAGEMENT_KEYand send it as a bearer token:
{
"mcpServers": {
"tempr-gateway": {
"type": "http",
"url": "https://api.temprhq.io/mcp/admin",
"headers": { "Authorization": "Bearer ${TEMPR_MANAGEMENT_KEY}" },
"tools": ["*"]
}
}
}
To sign in to Tempr instead, leave out headers and run /mcp auth tempr-gateway in Copilot CLI, which opens the sign-in in the browser. Signed in this way, Copilot reads your own Gateway, or your organization's if you're an owner or admin. To let it make changes too, tick Also let it make changes on Tempr's consent page.
- The key's permissions decide the tools. Without Read request logs, Copilot gets the usage, plan and key tools but not the logs.
- Changes also need the account to allow them: turn on Changes by AI agents on the Portal's MCP connectors page. Copilot can then make changes that only tighten, such as creating a key that expires within 90 days or revoking one, and propose any that would loosen, such as a higher budget, for you to approve in the Portal, and asks you before it does. A new key's secret never reaches it: it gets a one-time Portal link for you to copy the key from.
What's next
- The Gateway's MCP server: every tool, what it returns, and how text from your apps is marked.
- Authentication & virtual keys: scoping keys with model allowlists, budgets, and rate limits.
- Models, limits & logs: how
GET /v1/modelspopulates a model picker like this one.