With one Capriole AI API key, you can run GPT-6 Astra, Claude Fable 5.1, and Opus 5.5 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.1 Sol, set COPILOT_PROVIDER_MODEL_ID="gpt-6.1-sol" and COPILOT_PROVIDER_WIRE_MODEL="openai/gpt-6.1-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. COPILOT_PROVIDER_API_KEY would send it in an x-api-key header, which Capriole AI does not accept.
- 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, and Kimi models
These models use Chat Completions:
Change COPILOT_PROVIDER_WIRE_MODEL to google/gemini-3.8-flash, xai/grok-4.7, or zai/glm-5.3-flash 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 and claude-latest always point to our latest flagship in each family, currently GPT-6 Astra and Claude Fable 5.1.
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, and Kimi 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
Last modified on November 9, 2026