Skip to main content
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.
Always use the provider/model_id format for the COPILOT_MODEL value (e.g. anthropic/claude-sonnet-5, not claude-sonnet-5). Bare IDs return a 400 invalid model format error.

Prerequisites

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:
Replace <orq-api-key> with the key from Workspace Settings → API Keys.

Configuration Reference

See the Anthropic Messages API for endpoint details, authentication, and cache_control breakpoints.

Skills

Orq Skills add pre-built agentic workflows to Copilot CLI for the full Build, Evaluate, Optimize lifecycle.

Installation

Set an API key and connect the Orq MCP server first. Skills are then triggered by describing what is needed.

Orq Skills

The full catalogue of skills and slash commands.
Slash commands (/orq:quickstart, /orq:traces, and others) are only available in Claude Code.

Troubleshooting

Confirm COPILOT_PROVIDER_API_KEY is exported in the current shell and holds a valid Orq.ai API key (not a GitHub, OpenAI, or Anthropic key). Run echo $ORQ_API_KEY to verify.
Set COPILOT_MODEL to the provider/model_id format (e.g. anthropic/claude-sonnet-5). Bare model IDs are rejected by the router.
The selected model must support tool calling and streaming. Choose a different model from Workspace Settings → Models.
Confirm COPILOT_PROVIDER_BASE_URL points to https://my.orq.ai/v3/router or https://my.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.

Verification

Launch Copilot CLI with the provider variables set and send a prompt. The response appears in the session and the trace appears in Orq.ai Traces with the model identifier set in COPILOT_MODEL.