1. Overview
GitHub Copilot CLI is a terminal coding Agent for interactive questions, code changes, planning, and autonomous execution. BYOK connects it to GravitexAI GPT or Claude models.These settings target CLI 1.0.9x, with 1.0.98 (October 2026) as the reference. Once
COPILOT_PROVIDER_BASE_URL is set, the CLI calls your provider directly, without GitHub sign-in or a Copilot subscription.2. Requirements
- macOS or Windows.
- Node.js 22+ for npm installation.
- PowerShell 6+ recommended on Windows.
3. Prerequisites
Create a key (sk-xxxxxxxxxx) in the GravitexAI Console, confirm an available model ID, and make sure your computer can reach the API.
4. Connection settings
Common examples:
- GPT:
gpt-5.5,gpt-5.4,gpt-5.4-mini,gpt-5.3-codex,gpt-6-sol. - Claude:
claude-opus-5-5,claude-sonnet-5-5,claude-haiku-5-5,claude-fable-5-1.
5. Installation
macOS
Windows
Verify the installation
6. Quick configuration for the current terminal
These settings expire when the terminal closes. Replacesk-your-api-key, then run one set matching your OS and model family.
- macOS (zsh / bash)
- Windows PowerShell
- Windows CMD
GPTClaude
7. Persistent configuration
BYOK providers are configured through environment variables, notsettings.json. To persist them, put the variables in your shell configuration. Separate copilot-gpt and copilot-claude commands let you choose a family without entering every variable again.
macOS: ~/.zshrc
Windows: PowerShell Profile
. $PROFILE. Usage is the same as on macOS.
If Profile scripts are blocked, use the temporary settings from section 6. Configure script execution policy according to your computerโs management requirements if you need Profile loading.
Windows user variables for a single model family
$null as the second argument.
8. No-confirmation mode and permissions
By default, read-only actions are automatically approved, while writes and commands prompt for confirmation. The following options change this behavior.1. YOLO: no-confirmation mode for one launch
--yolo / --allow-all combine:
YOLO controls approvals. For continued autonomous execution until the task finishes, also add
--autopilot:
2. Change permissions inside a session
3. Persist the default permission mode
~/.copilot/settings.json (Windows: %USERPROFILE%\.copilot\settings.json), equivalent to:
4. Non-interactive scripts and CI
-p requires --allow-all-tools or --yolo:
COPILOT_ALLOW_ALL=true. This also trusts the current directory and loads its plugins, MCP servers, and hooks.
9. Daily use
10. Verification and troubleshooting
Verify the connection
OK response without authentication, protocol, or model errors confirms the request works. For the persistent wrappers, replace copilot in this test with copilot-gpt gpt-5.5 or copilot-claude claude-sonnet-5-5.
Model 'claude-xxx' not found on provider ... (HTTP 404)
Model 'claude-xxx' not found on provider ... (HTTP 404)
Claude was configured as openai with responses. Switch to the anthropic type.
Claude returns 404 or /v1/v1/messages
Claude returns 404 or /v1/v1/messages
Remove /v1 from the Anthropic Base URL; use https://api.gravitex.ai.
GPT returns 404
GPT returns 404
Add /v1 to the OpenAI-compatible Base URL: https://api.gravitex.ai/v1.
401 / Invalid API key
401 / Invalid API key
Check the key, balance, and model permissions. You can query /v1/models with curl first.
The CLI still asks for GitHub sign-in
The CLI still asks for GitHub sign-in
COPILOT_PROVIDER_BASE_URL did not take effect. Check with
echo $COPILOT_PROVIDER_BASE_URL, or $env:COPILOT_PROVIDER_BASE_URL in PowerShell.Changes to ~/.zshrc do not apply
Changes to ~/.zshrc do not apply
Run source ~/.zshrc or reopen the terminal.
