Skip to main content

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

GPT and Claude require different protocols. Claude does not support /v1/responses; use anthropic and the root Base URL. Only one set of provider variables is active per terminal. Switch both protocol and address when changing model families.
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.
Use IDs available in your account and the Model Catalog, or query:

5. Installation

macOS

Windows

You can also download an executable from GitHub Copilot CLI Releases.

Verify the installation

6. Quick configuration for the current terminal

These settings expire when the terminal closes. Replace sk-your-api-key, then run one set matching your OS and model family.
GPT
Claude

7. Persistent configuration

BYOK providers are configured through environment variables, not settings.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

Append:
Reload and use:
For one model family, you can persist the exports from section 6 and run copilot directly. Clear COPILOT_PROVIDER_WIRE_API when switching from GPT to Claude.

Windows: PowerShell Profile

Append:
Reopen PowerShell or run . $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

Reopen the terminal after saving. To remove a variable, repeat its command with $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

Stored in ~/.copilot/settings.json (Windows: %USERPROFILE%\.copilot\settings.json), equivalent to:
Restore defaults:

4. Non-interactive scripts and CI

-p requires --allow-all-tools or --yolo:
Alternatively set COPILOT_ALLOW_ALL=true. This also trusts the current directory and loads its plugins, MCP servers, and hooks.
With full approval, the Agent can modify/delete files and run commands without asking. Enable it only as needed in trusted Git-managed projects and review the changes.

9. Daily use

10. Verification and troubleshooting

Verify the connection

An 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.
Claude was configured as openai with responses. Switch to the anthropic type.
Remove /v1 from the Anthropic Base URL; use https://api.gravitex.ai.
Add /v1 to the OpenAI-compatible Base URL: https://api.gravitex.ai/v1.
Check the key, balance, and model permissions. You can query /v1/models with curl first.
COPILOT_PROVIDER_BASE_URL did not take effect. Check with echo $COPILOT_PROVIDER_BASE_URL, or $env:COPILOT_PROVIDER_BASE_URL in PowerShell.
Run source ~/.zshrc or reopen the terminal.

View available options

11. Resources