Skip to content

GitHub Models

GitHub Models is a supported AI provider in Clanker. It uses the GitHub Models inference API, authenticated through the GitHub CLI (gh).


Provider Details

PropertyValue
Config keygithub-models
Default modelopenai/gpt-5.4
API endpointhttps://models.github.ai
Auth methodGitHub CLI auth token (gh auth token)

Configuration

yaml
ai:
  default_provider: github-models
  providers:
    github-models:
      model: openai/gpt-5.4

No API key is needed in the config file. Clanker obtains the auth token from the GitHub CLI.


Prerequisites

The GitHub CLI must be installed and authenticated:

bash
gh auth login

Your GitHub account must have access to GitHub Models. Verify with:

bash
gh auth token

CLI Flag Overrides

FlagDescription
--ai-profile github-modelsSelect this provider
--github-model <model>Override the model for this query

Usage Example

bash
# Authenticate with GitHub CLI (one-time setup)
gh auth login

# Query using GitHub Models
clanker ask --ai-profile github-models "What EC2 instances are running?"

# Override model
clanker ask --ai-profile github-models --github-model "anthropic/claude-sonnet-4" "Analyze my VPC configuration"

Notes

  • GitHub Models uses the OpenAI-compatible chat completions format under the hood.
  • If no model is specified and no config is set, Clanker defaults to openai/gpt-5.4.
  • The provider is useful for developers who already have GitHub Copilot or GitHub Models access and do not want to manage a separate API key.