If your Allowed Headers are already set to
*, you can skip this note. If not and you face issues integrating Bifrost with Copilot, try switching to * or adding the specific headers required by your client. By default, Bifrost whitelists: Content-Type, Authorization, X-Requested-With, X-Stainless-Timeout, and X-Api-Key.BYOK is a recent addition to all three surfaces and menu labels can shift between releases. If a step below doesn’t match what you see, update to the latest version of the app/CLI/extension first.
GitHub Copilot App
The GitHub Copilot app is the standalone desktop client for running agentic coding sessions outside an editor. It supports BYOK, so you can run sessions entirely against Bifrost - you still sign in with a GitHub account, but you don’t need an active Copilot plan if you’re only using your own provider.- Open the Copilot app and go to Settings → Model Providers → Add Provider.
- Choose the OpenAI-compatible provider type (Anthropic is also listed if you’d rather point at Bifrost’s native Anthropic surface - see the alternative below).
-
Fill in the provider details:
- Save. Bifrost-routed models now appear in the app’s model picker alongside any GitHub-hosted models, and you choose which one to use per session.
To use Bifrost’s native Anthropic-compatible surface instead, add an Anthropic provider with base URL
http://localhost:8080/anthropic and your Bifrost virtual key as the API key.GitHub Copilot CLI
Copilot CLI is GitHub’s agentic terminal coding agent - it inspects your repo, edits files, runs commands, and reviews diffs from the shell.Installing Copilot CLI
Configuring Copilot CLI with Bifrost
Copilot CLI reads its model provider from environment variables, set before launching:copilot from the same terminal session where you exported these variables, or add them to your shell profile - GUI-launched terminals and IDE-integrated shells won’t pick up an interactive export unless the environment is configured there too.
You can also switch models per run with the --model flag:
Set
COPILOT_PROVIDER_TYPE=anthropic and COPILOT_PROVIDER_BASE_URL=http://localhost:8080/anthropic to route Copilot CLI through Bifrost’s native Anthropic-compatible surface instead.GitHub Copilot Chat (VS Code Extension)
The Copilot Chat extension’s current BYOK path is the Custom Endpoint model provider (the oldergithub.copilot.chat.customOAIModels setting still works but is deprecated).
- Open the Command Palette and run Chat: Manage Language Models (or click the gear icon in the chat model picker).
- Choose Add Models → Custom Endpoint. VS Code creates/opens a
chatLanguageModels.jsonfile. - Add an entry pointing at Bifrost:
- Save the file. VS Code will prompt you to enter the API key securely on first use - enter your Bifrost virtual key; it’s stored in VS Code’s secret storage, not in
chatLanguageModels.json. - Open the chat model picker and select one of your Bifrost models.
models entry per Bifrost model you want selectable, using the provider/model-name format for id.
apiType also accepts "messages" (Anthropic’s Messages API) and "responses" (OpenAI’s Responses API). To use Bifrost’s native Anthropic surface instead, set "apiType": "messages" and point url at http://localhost:8080/anthropic/v1/messages.Using Virtual Keys
Bifrost Virtual Keys work as the API key in all three surfaces - the Copilot app’s provider API key, Copilot CLI’sCOPILOT_PROVIDER_API_KEY, and the VS Code extension’s Custom Endpoint API key. Virtual keys let you enforce budgets, rate limits, and provider access controls per user or team without sharing raw provider credentials.
Adding MCP Servers via Bifrost
This feature is only available on
v1.4.0-prerelease1 and above./mcp. Instead of wiring each individual MCP server into Copilot, connect Copilot to Bifrost once and it gets every tool Bifrost has access to - with virtual keys controlling which tools each client is allowed to see.
GitHub Copilot CLI
Add Bifrost withcopilot mcp add.
Header auth (headers or both mode) - send a virtual key as a Bearer token or under x-bf-vk header:
oauth or both mode) - omit --header entirely:
~/.copilot/mcp-config.json, which you can also edit directly:
<BIFROST_VIRTUAL_KEY> with your actual Bifrost virtual key, or drop the headers block entirely for OAuth. Copilot CLI will only have access to the MCP tools permitted by that key’s configuration.
GitHub Copilot Chat (VS Code Extension)
Add Bifrost to.vscode/mcp.json (to share with your team via version control) or your user MCP config (Command Palette → MCP: Open User Configuration, for a personal connection).
Header auth (headers or both mode) - send a virtual key as a Bearer token or under x-bf-vk header:
oauth or both mode) - omit headers entirely.
bifrost entry, then switch Copilot Chat to Agent mode. Click the tools icon (Configure your MCP server) at the bottom of the chat window to see Bifrost’s tools listed and available to the agent.
GitHub Copilot App
Header auth (headers or both mode) - send a virtual key as a Bearer token or under x-bf-vk header:
- Open Settings → MCP Servers → Add Server.
- Set Type to HTTP, URL to
http://localhost:8080/mcp, and add anx-bf-vk: <BIFROST_VIRTUAL_KEY>header. - Save. Bifrost’s tools become available to agent sessions in the app.
oauth or both mode) - leave the headers section empty:
- Open Settings → MCP Servers → Add Server.
- Set Type to HTTP, URL to
http://localhost:8080/mcp, and add no headers. - Save. The app opens a browser consent page against Bifrost on first connect.
The MCP settings screen is newer than BYOK support and menu labels may differ slightly by app version. If you don’t see MCP Servers in Settings, update to the latest release.
Tool Access Control
Control which tools each Copilot surface can see using Virtual Keys:- Create a separate virtual key per surface (or per user/team)
- Configure which MCP servers and tools that key can access in the Bifrost dashboard
- Bifrost enforces these permissions automatically on every
/mcprequest
Next Steps
- Provider Configuration - Configure AI providers in Bifrost
- Virtual Keys - Set up usage limits and access control
- MCP Gateway - Full MCP server setup and tool filtering

