Skip to main content

Overview

Type: Coding agent CLIPrimary Path: OpenAI-compatible Chat CompletionsSupport Confidence: Official BYOK path
GitHub Copilot CLI can connect to any OpenAI Chat Completions-compatible endpoint. TokenLab works through Copilot CLI’s BYOK environment variables.

Install

With Node.js 22 or later, install through npm:
On macOS or Linux, you can alternatively use Homebrew:
Verify the installation:
GitHub currently requires an active Copilot plan. Organization-managed accounts also need the Copilot CLI policy enabled.

Configure TokenLab

Set the provider variables before starting Copilot CLI:
GitHub requires the selected model to support both streaming and tool calling. kimi-k3 exposes tool use and a context window larger than GitHub’s recommended 128K minimum.

Verify

Inside Copilot CLI, ask for a read-only action first, such as:
You can also inspect provider help or switch the model for the current session:

Troubleshooting

Confirm COPILOT_PROVIDER_API_KEY contains an active TokenLab key and restart copilot after changing environment variables.
Use the exact ID from the live TokenLab model catalog. Do not add a provider prefix to kimi-k3.
Copilot CLI rejects models without both capabilities. Choose a tool-capable chat model such as kimi-k3.
Do not commit API keys to shell scripts or dotfiles tracked by Git. Rotate any key that was exposed in terminal history, screenshots, or logs.