With one Capriole AI API key, you can run GPT-6.2 Astra, Claude Fable 5.2, Opus 5.5, and Gemini 4 Carbon in GitHub Copilot CLI at up to 92% less than official API prices.
What is GitHub Copilot CLI
GitHub Copilot CLI is GitHub’s coding agent for the terminal. Its bring-your-own-key (BYOK) mode sends model requests to a provider that you set with environment variables. This setup points it at Capriole AI.
Prerequisites
Before you begin, make sure you have:
- A Capriole AI account (Sign up here)
- A Premium plan (USD 9 per month, also includes unlimited web chat) or a Team plan, required for an API key (Subscribe)
- A Capriole AI API key (Get your key)
Installation
Install GitHub Copilot CLI with npm:
Verify the install:
You do not need to sign in to GitHub when COPILOT_PROVIDER_BASE_URL is set.
Configuration
Model validation
GitHub Copilot CLI 1.0.100 passes a file-read, file-write, and final-answer check through Capriole AI with every model in Supported models, using the profiles below.
Copilot CLI uses one provider at a time, so pick the profile for the model family you want. Each profile sets two model values:
COPILOT_PROVIDER_WIRE_MODEL is the Capriole AI model ID that Copilot sends.
COPILOT_PROVIDER_MODEL_ID is a model that Copilot knows. Copilot uses it to choose its tools, prompts, and token limits.
GPT models
GPT models use the Responses API:
For GPT-6.2 Sol, set COPILOT_PROVIDER_MODEL_ID="gpt-6.1-sol" and COPILOT_PROVIDER_WIRE_MODEL="openai/gpt-6.2-sol".
Claude models
Claude models use Anthropic Messages:
For Opus 5.5, set COPILOT_PROVIDER_WIRE_MODEL="claude-opus-5-5".
COPILOT_PROVIDER_BEARER_TOKEN sends the key as a Bearer token.
- The base URL has no
/v1, because Copilot adds /v1/messages itself.
- Keep
COPILOT_PROVIDER_MODEL_ID="claude-opus-4.6". With an older profile such as claude-sonnet-4, Copilot sends a thinking budget, and Opus 5.5 rejects it with requires adaptive thinking.
Gemini, Grok, GLM, Kimi, and Qwen models
These models use Chat Completions:
Change COPILOT_PROVIDER_WIRE_MODEL to google-latest, google/gemini-4-carbon, google/gemini-4-argon, google/gemini-4-neon, google/gemini-3.8-flash, xai/grok-4.7, zai/glm-5.4, zai/glm-5.3-flash, or qwen/qwen4-max for the other models.
Keep COPILOT_PROVIDER_MODEL_ID="claude-sonnet-4". With a GPT profile such as gpt-5.4, Copilot sends tool types that these models reject.
For Kimi K3.1 Pro, set COPILOT_PROVIDER_MODEL_ID="claude-opus-4.6" and COPILOT_PROVIDER_WIRE_MODEL="moonshot/kimi-k3.1-pro". The claude-sonnet-4 profile sends temperature: 0, which Kimi K3.1 Pro rejects.
To keep a profile, add its lines to ~/.zshrc or ~/.bashrc, then open a new terminal.
Run GitHub Copilot CLI
Start Copilot CLI from your project directory:
For a non-interactive run, pass a prompt with -p:
Supported models
openai-latest, claude-latest, and google-latest always point to our latest flagship in each family, currently GPT-6.2 Astra, Claude Fable 5.2, and Gemini 4 Carbon.
Troubleshooting
Why does Copilot CLI return an authentication error?
Confirm that CAPRIOLE_AI_API_KEY is exported in the same shell. For Claude models, use COPILOT_PROVIDER_BEARER_TOKEN, not COPILOT_PROVIDER_API_KEY.
Why do requests fail with endpoint errors?
For GPT, Gemini, Grok, GLM, Kimi, and Qwen models, COPILOT_PROVIDER_BASE_URL is https://api.caprioletech.com/v1. For Claude models, it is https://api.caprioletech.com without /v1.
Why does Opus 5.5 fail with requires adaptive thinking?
Set COPILOT_PROVIDER_MODEL_ID="claude-opus-4.6".
Set COPILOT_PROVIDER_MODEL_ID="claude-sonnet-4", or "claude-opus-4.6" for Kimi K3.1 Pro. A GPT profile sends tool types that only OpenAI models accept.
Notes
- Copilot CLI runs coding tools on your computer. Capriole AI processes the model requests.
- Run
copilot help providers to see every BYOK environment variable.
- Gemini 4 Carbon thinks longer than Gemini 4 Argon, so its turns can take longer and use more tokens. For quicker turns, use
google/gemini-4-argon.
- To use the same key with your other coding agents, see Use one API key with coding agents.
- Official references: Install GitHub Copilot CLI and Use BYOK models in Copilot CLI.
Last modified on December 2, 2026