Why GitHub Models?
No extra cost
Use models with your existing GitHub token. Free tier includes GPT-4o, Llama 3.1 405B/8B.
Model variety
Access models from OpenAI, Meta, Mistral, DeepSeek, Microsoft, Cohere and others.
Zero configuration
If you already have
GITHUB_TOKEN set (e.g. GitHub CLI), it works automatically.Compatible API
Uses OpenAI-compatible API at
models.inference.ai.azure.com.Setup
Option 1: Environment Variable (Recommended)
If you already use GitHub CLI (gh) or have GITHUB_TOKEN configured, the provider is detected automatically:
Option 2: Interactive Login
1
Generate a Personal Access Token (PAT)
Go to github.com/settings/tokens and create a token. No special scopes are required for model inference.
2
Paste the token in the terminal
ChatCLI will prompt for the token. Paste it and press Enter.
3
Provider available immediately
The
GITHUB_MODELS provider appears in /switch without restarting.Logout
Available Models
Availability depends on your GitHub plan:Free Tier
With GitHub Copilot Pro (additional models)
The full list of models is at github.com/marketplace/models. Use
/switch --model to see models available for your token.Model Listing
ChatCLI combines two sources when listing models:- API — models returned by the
/modelsendpoint (actual token availability) - Catalog — known marketplace models (may require a higher plan)
[api] were confirmed as available for your token.
Environment Variables
Difference Between GitHub Models, Copilot and OpenAI
Next Steps
OAuth Authentication
Other authentication methods (Anthropic, OpenAI Codex, Copilot)
Provider Fallback
Configure automatic failover between providers
Supported Models
Full model list by provider
Coder Mode
Use GitHub Models in engineering mode