Using Your GitHub Copilot Subscription with OpenClaw

Using Your GitHub Copilot Subscription with OpenClaw

If you have a GitHub Copilot subscription, you already have access to some of the most powerful AI models available — Claude, GPT-4o, Gemini, and more. OpenClaw can leverage your existing subscription as an AI provider, giving you a versatile personal assistant without additional API costs.

What You Get

GitHub Copilot's backend provides access to multiple frontier models:

Model Provider Best For
claude-opus-4.5 Anthropic Complex reasoning, long-form content
claude-sonnet-4.5 Anthropic Balanced speed and capability
gpt-5.2-codex OpenAI Code generation and analysis
gpt-4o OpenAI General purpose, multimodal
gemini-3-pro-preview Google Fast responses, large context

The beauty of this setup: one subscription, multiple models, automatic fallbacks.

Prerequisites

  • GitHub Copilot subscription (Individual, Business, or Enterprise)
  • OpenClaw installed — Get it from openclaw.ai
  • GitHub CLI (gh) — For authentication

Step 1: Install GitHub CLI

If you don't have the GitHub CLI installed:

# macOS
brew install gh

# Ubuntu/Debian
sudo apt install gh

# Windows
winget install GitHub.cli

Step 2: Authenticate with GitHub

Run the GitHub CLI auth flow:

gh auth login

Select:

  1. GitHub.com (not Enterprise)
  2. HTTPS as the protocol
  3. Login with a web browser (or paste a token)

Verify authentication:

gh auth status

You should see your GitHub username and the scopes available.

Step 3: Configure OpenClaw

Run the OpenClaw configuration wizard:

openclaw configure

When prompted for the AI provider, select github-copilot. OpenClaw will automatically detect your GitHub CLI authentication.

Alternatively, configure manually by editing ~/.openclaw/openclaw.json:

{
  "auth": {
    "profiles": {
      "github-copilot:github": {
        "provider": "github-copilot",
        "mode": "token"
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "github-copilot/claude-opus-4.5",
        "fallbacks": [
          "github-copilot/gpt-5.2-codex",
          "github-copilot/claude-sonnet-4.5",
          "github-copilot/gpt-4o"
        ]
      }
    }
  }
}

Step 4: Choose Your Models

Model Naming Convention

OpenClaw uses the format provider/model-name:

github-copilot/claude-opus-4.5
github-copilot/gpt-5.2-codex
github-copilot/gemini-3-pro-preview

For general assistant use:

"primary": "github-copilot/claude-opus-4.5"

For coding-focused work:

"primary": "github-copilot/gpt-5.2-codex"

For fast responses:

"primary": "github-copilot/claude-haiku-4.5"

Setting Up Fallbacks

Fallbacks activate when the primary model is unavailable or rate-limited:

"model": {
  "primary": "github-copilot/claude-opus-4.5",
  "fallbacks": [
    "github-copilot/gpt-5.2-codex",
    "github-copilot/claude-sonnet-4.5",
    "github-copilot/gemini-3-pro-preview",
    "github-copilot/gpt-4o"
  ]
}

Step 5: Test the Connection

Start the OpenClaw gateway:

openclaw gateway start

Check status:

openclaw status

You should see your configured model and authentication status.

Using Multiple Agents

One powerful feature: you can assign different models to different agents. For example, use a reasoning-heavy model for your main assistant and a fast coding model for subagents:

{
  "agents": {
    "defaults": {
      "model": {
        "primary": "github-copilot/claude-opus-4.5"
      }
    },
    "list": [
      {
        "id": "main"
      },
      {
        "id": "coder",
        "model": "github-copilot/gpt-5.2-codex"
      }
    ]
  }
}

Now your main agent uses Claude for orchestration while delegating coding tasks to GPT Codex.

Checking Usage

OpenClaw tracks your model usage. Check your session stats:

/status

This shows tokens used, model in use, and session time.

Troubleshooting

"Authentication failed"

Re-authenticate with GitHub:

gh auth logout
gh auth login

"Model not available"

Some models may have availability windows or rate limits. Your fallback chain handles this automatically, but you can also try:

openclaw configure --section model

"Token expired"

GitHub CLI tokens refresh automatically, but if you see expiration errors:

gh auth refresh

Cost Considerations

Using GitHub Copilot as your OpenClaw provider means:

  • No additional API costs — Uses your existing subscription
  • Multiple models included — Claude, GPT, Gemini all accessible
  • Automatic rate limit handling — Fallbacks kick in seamlessly
  • ⚠️ Subject to Copilot limits — Heavy usage may hit rate limits

For high-volume or production use, consider adding a direct API provider (Anthropic, OpenAI) as a fallback.

Advanced: Mixing Providers

You can combine GitHub Copilot with other providers for maximum flexibility:

{
  "auth": {
    "profiles": {
      "github-copilot:github": {
        "provider": "github-copilot",
        "mode": "token"
      },
      "anthropic:default": {
        "provider": "anthropic",
        "mode": "api_key"
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "github-copilot/claude-opus-4.5",
        "fallbacks": [
          "anthropic/claude-sonnet-4-20250514",
          "github-copilot/gpt-4o"
        ]
      }
    }
  }
}

This setup uses your Copilot subscription first, falls back to direct Anthropic API if needed.

Conclusion

Your GitHub Copilot subscription is more than just code completion — it's a gateway to frontier AI models. By configuring OpenClaw to use it as a provider, you get:

  • Access to Claude, GPT, and Gemini models
  • No additional API subscriptions required
  • Automatic model fallbacks
  • The full power of OpenClaw's agent system

If you're already paying for Copilot, you're leaving capability on the table by not using it with OpenClaw.


For more configuration options, see the OpenClaw documentation. Join the community on Discord.