GitHub Copilot CLI supports custom model providers through BYOK environment variables. PointDocumentation Index
Fetch the complete documentation index at: https://docs.routing.run/llms.txt
Use this file to discover all available pages before exploring further.
COPILOT_PROVIDER_BASE_URL at routing.run, set your dashboard rk_ key, and choose a route/… model ID.
Setup
Install Copilot CLI
Install the npm package that provides the
copilot binary, then verify it is on your PATH.Get your API key
Create an API key at app.routing.run. Copy the full secret. It starts with
rk_.Configure routing.run
Set the Copilot BYOK provider variables. Use
https://api.routing.run/v1 because Copilot sends OpenAI-compatible chat requests.Connection prompt
Use Copy on the block below for a complete setup sequence.Copilot CLI - connect to routing.run
Manual configuration
Install Copilot CLI with Bun:Copilot CLI reads custom provider settings from environment variables. Its normal
config.json settings do not persist COPILOT_PROVIDER_BASE_URL, COPILOT_PROVIDER_API_KEY, or the provider token limits.Persistent setup without shell exports
If you do not want to keep provider exports in your shell profile, save them in a private env file and use a wrapper namedcopilot.
Create ~/.copilot/provider.env:
PATH than the installed Copilot binary. For a Bun global install on Linux, this can be ~/.bun/bin/copilot:
/home/USER with your home directory if needed. Make the wrapper executable:
Recommended model
Useroute/deepseek-v4-pro for Copilot CLI coding sessions:
Troubleshooting
- Copilot asks for GitHub login —
COPILOT_PROVIDER_BASE_URLwas not loaded beforecopilotstarted. - 401 or unauthorized — Confirm
COPILOT_PROVIDER_API_KEYis a dashboardrk_key. - Wrong host — Confirm
COPILOT_PROVIDER_BASE_URLis exactlyhttps://api.routing.run/v1. - Invalid model — Keep the full
route/prefix, for exampleroute/deepseek-v4-pro.