Skip to main content
ChatCLI supports GitHub Models as a native provider, giving you access to models like GPT-4o, Llama 3.1, DeepSeek R1, Mistral, Phi-4 and more directly from the GitHub Models marketplace.

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

If you already use GitHub CLI (gh) or have GITHUB_TOKEN configured, the provider is detected automatically:
Then select the provider:
Or inside ChatCLI:

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.
Models not available for your plan return an unavailable_model error when you try to send a prompt. The /switch --model list includes both API models and catalog models — catalog models may not be available for your token.

Model Listing

ChatCLI combines two sources when listing models:
  1. API — models returned by the /models endpoint (actual token availability)
  2. Catalog — known marketplace models (may require a higher plan)
Models tagged with [api] were confirmed as available for your token.

Environment Variables


Difference Between GitHub Models, Copilot and OpenAI

If you have a GitHub token but no paid OpenAI subscription, GITHUB_MODELS is the best option for free GPT-4o access.

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