Files
bot/docs/providers/github-copilot.md
zeekay 4bdc9ee3e4 chore: rebrand openclaw → hanzo-bot for bridge merge
Comprehensive rename of all openclaw references to hanzo-bot equivalents:
- Package: openclaw → @hanzo/bot
- Binary: openclaw → hanzo-bot
- Types: OpenClaw* → Bot*
- Env vars: OPENCLAW_* → BOT_*
- Android: ai.openclaw.android → ai.hanzo.bot.android
- iOS/macOS: ai.openclaw.* → ai.hanzo.*
- Swift modules: OpenClaw* → Bot*
- Plugins: openclaw.plugin.json → bot.plugin.json
- Paths: .openclaw/ → .hanzo/bot/
- URLs: github.com/openclaw → github.com/hanzoai
2026-02-26 22:36:01 -08:00

2.1 KiB
Raw Permalink Blame History

summary, read_when, title
summary read_when title
Sign in to GitHub Copilot from Hanzo Bot using the device flow
You want to use GitHub Copilot as a model provider
You need the `hanzo-bot models auth login-github-copilot` flow
GitHub Copilot

GitHub Copilot

What is GitHub Copilot?

GitHub Copilot is GitHub's AI coding assistant. It provides access to Copilot models for your GitHub account and plan. Hanzo Bot can use Copilot as a model provider in two different ways.

Two ways to use Copilot in Hanzo Bot

1) Built-in GitHub Copilot provider (github-copilot)

Use the native device-login flow to obtain a GitHub token, then exchange it for Copilot API tokens when Hanzo Bot runs. This is the default and simplest path because it does not require VS Code.

2) Copilot Proxy plugin (copilot-proxy)

Use the Copilot Proxy VS Code extension as a local bridge. Hanzo Bot talks to the proxy’s /v1 endpoint and uses the model list you configure there. Choose this when you already run Copilot Proxy in VS Code or need to route through it. You must enable the plugin and keep the VS Code extension running.

Use GitHub Copilot as a model provider (github-copilot). The login command runs the GitHub device flow, saves an auth profile, and updates your config to use that profile.

CLI setup

hanzo-bot models auth login-github-copilot

You'll be prompted to visit a URL and enter a one-time code. Keep the terminal open until it completes.

Optional flags

hanzo-bot models auth login-github-copilot --profile-id github-copilot:work
hanzo-bot models auth login-github-copilot --yes

Set a default model

hanzo-bot models set github-copilot/gpt-4o

Config snippet

{
  agents: { defaults: { model: { primary: "github-copilot/gpt-4o" } } },
}

Notes

  • Requires an interactive TTY; run it directly in a terminal.
  • Copilot model availability depends on your plan; if a model is rejected, try another ID (for example github-copilot/gpt-4.1).
  • The login stores a GitHub token in the auth profile store and exchanges it for a Copilot API token when Hanzo Bot runs.