Use NeverMetered with Copilot CLI
GitHub's terminal coding agent, using Copilot CLI's official Bring Your Own Key (BYOK) support.
qwen3.8-27bYOUR_API_KEY with your key.- 1
Create an API key
Create a key in API keys and name it after the tool, for example “Copilot CLI”. A dedicated key per tool lets you see its usage separately and give it its own parallel-stream cap. The key is shown once; the snippets below use
YOUR_API_KEYwhere it goes. - 2
Install Copilot CLI
Already have Copilot CLI? Skip this step. Open a terminal first: on macOS press ⌘ Space, type Terminal and press Return; on Windows open the Start menu, type PowerShell and press Enter. It needs an active GitHub Copilot subscription.
curl -fsSL https://gh.io/copilot-install | bash - 3
Point Copilot CLI at the gateway
Set these before starting
copilot. The variable names are fixed by GitHub's BYOK support, not configurable.export COPILOT_PROVIDER_BASE_URL="https://api.nevermetered.com/v1" export COPILOT_PROVIDER_API_KEY="YOUR_API_KEY" export COPILOT_MODEL="qwen3.8-27b" copilot - 4
Keep it for new terminals (optional)
The command above only lasts for the current terminal. Save it once so every new terminal has it.
# zsh (the macOS default) echo 'export COPILOT_PROVIDER_BASE_URL="https://api.nevermetered.com/v1"' >> ~/.zshrc echo 'export COPILOT_PROVIDER_API_KEY="YOUR_API_KEY"' >> ~/.zshrc echo 'export COPILOT_MODEL="qwen3.8-27b"' >> ~/.zshrc # bash echo 'export COPILOT_PROVIDER_BASE_URL="https://api.nevermetered.com/v1"' >> ~/.bashrc echo 'export COPILOT_PROVIDER_API_KEY="YOUR_API_KEY"' >> ~/.bashrc echo 'export COPILOT_MODEL="qwen3.8-27b"' >> ~/.bashrc - 5
Verify it works
Start a session and send a short prompt. The request shows up in Requests within a few seconds, with its input, cached and output tokens.
copilot
- GitHub's BYOK support only covers models that support tool calling and streaming; every model this gateway serves qualifies.
- It's built for OpenAI Chat Completions-compatible endpoints specifically (also how Ollama and vLLM plug in), which is exactly what this base URL serves.
COPILOT_PROVIDER_TYPEdefaults toopenaiand doesn't need setting. GitHub recommends at least 128K context for BYOK models; your plan supports 131,072.
Troubleshooting
- Copilot CLI can't reach the provider
COPILOT_PROVIDER_BASE_URLwasn't visible to thecopilotprocess. Export it in the same shell (or persist it) and start a new session.404 model_not_found- Use a model id exactly as
GET /v1/modelslists it, for exampleqwen3.8-27b. Plans can restrict which models a key may call. 400 context_length_exceeded- The conversation outgrew the 128K context window (input + output). Let the tool compact or start a fresh session, or get a larger window on your plan.
429 concurrency_limit_exceeded- All your parallel streams are busy and your queue allowance is full. Lower the tool's parallelism (subagents, batch size), or get more streams on your plan.
- Answers stop mid-sentence
- The response hit your plan's output cap of 65,536 tokens (finish reason
lengthormax_tokens). Ask for shorter steps, or upgrade for a higher cap. 403 email_verification_required- Free requests need a verified email. Click the link in your verification email (you can resend it from the dashboard), or upgrade.
429 daily_quota_exceeded- You've used today's free requests; agents send one request per step, so they go quickly. The allowance resets at 00:00 UTC, and paid plans have no daily limit.
503/504 request_queue_timeout- The service stayed busy longer than the queue timeout and nothing was generated. Retry with backoff, and give the tool a generous request timeout.
503 service_unavailable- No GPU capacity is online at the moment. It's temporary and your setup is fine: retry in a little while, and check the status page.