Overview
GitHub Copilot CLI brings Copilot to the terminal. Its bring-your-own-key (BYOK) configuration points the CLI at any OpenAI-compatible, Azure OpenAI, or Anthropic endpoint, so every model in the AI Gateway catalog is reachable from a few environment variables, with unified tracing, cost tracking, and access controls through Orq.ai.Prerequisites
- GitHub Copilot CLI installed
- Active Orq.ai account
- Orq.ai API key
Model requirements
The selected model must support tool calling (function calling) and streaming. Copilot CLI returns an error for models missing either capability. For best results, choose a model with a context window of at least 128k tokens.Setup
Configure the provider with environment variables before launching Copilot CLI. Export the API key first:<orq-api-key> with the key from Workspace Settings → API Keys.
OpenAI-compatible (recommended)
Anthropic
The OpenAI-compatible router reaches the full AI Gateway catalog. This is the default provider type, so Replace
COPILOT_PROVIDER_TYPE can be omitted.openai/gpt-4o with any identifier from the AI Gateway catalog (e.g. anthropic/claude-sonnet-4-6, google/gemini-2.0-flash-001).Configuration Reference
| Environment variable | Required | Description |
|---|---|---|
COPILOT_PROVIDER_BASE_URL | Yes | Gateway endpoint. Use https://api.orq.ai/v3/router for the OpenAI-compatible router or https://api.orq.ai/v3/anthropic for the Anthropic endpoint. |
COPILOT_PROVIDER_TYPE | No | Provider type: openai (default) or anthropic. |
COPILOT_PROVIDER_API_KEY | Yes | Orq.ai API key. |
COPILOT_MODEL | Yes | AI Gateway model identifier in provider/model_id format. Also settable with the --model flag. |
Troubleshooting
Requests failing with 401 Unauthorized
Requests failing with 401 Unauthorized
400 invalid model format
400 invalid model format
Set
COPILOT_MODEL to the provider/model_id format (e.g. anthropic/claude-sonnet-4-6). Bare model IDs are rejected by the router.Model returns a capability error
Model returns a capability error
The selected model must support tool calling and streaming. Choose a different model from Workspace Settings → Models.
No Traces appearing in Orq.ai
No Traces appearing in Orq.ai
Confirm
COPILOT_PROVIDER_BASE_URL points to https://api.orq.ai/v3/router or https://api.orq.ai/v3/anthropic and the API key is a valid Orq.ai key. Requests sent to the wrong endpoint will not appear in Orq.ai Traces.