GitHub Copilot SDK-backed run_model plugin for bub.
- Bub plugin entry point:
github-copilot - A
run_modelhook implementation that delegates model execution to the GitHub Copilot SDK bub login githubandbub login github-copilotcommands for GitHub device-flow login- Token fallback from persisted OAuth tokens,
COPILOT_GITHUB_TOKEN,GH_TOKEN,GITHUB_TOKEN, orgh auth token
This package intentionally uses github-copilot-sdk instead of wiring republic into Bub.
That keeps the plugin close to bub-codex:
- Bub delegates model execution to an external coding agent backend
- GitHub Copilot keeps its own session state and tool runtime
- the plugin stays small and focused on auth, prompt adaptation, and session wiring
Install from the monorepo package directory during local development:
uv add --editable /path/to/bub-contrib/packages/bub-github-copilotInstall directly from GitHub:
uv pip install "git+https://github.com/bubbuild/bub-contrib.git#subdirectory=packages/bub-github-copilot"You can also install it with Bub:
bub install bub-github-copilot@mainAuthenticate once with GitHub device flow:
bub login githubThe plugin stores the resulting token at:
~/.bub/github_copilot_auth.json
Environment variables use the BUB_GITHUB_COPILOT_ prefix:
BUB_GITHUB_COPILOT_MODEL: optional Copilot model override, for examplegpt-5BUB_GITHUB_COPILOT_REASONING_EFFORT: optional reasoning level, one oflow,medium,high,xhighBUB_GITHUB_COPILOT_TIMEOUT_SECONDS: request timeout for onerun_modelcall, default300BUB_GITHUB_COPILOT_LOG_LEVEL: Copilot CLI log level, defaulterrorBUB_GITHUB_COPILOT_CLI_PATH: optional explicit Copilot CLI binary path
- Internal Bub commands such as prompts starting with
,are still delegated to the runtime agent - Normal prompts are sent to a Copilot SDK session derived from the Bub
session_id - The plugin sets
working_directoryto Bub's runtime workspace - If the prompt contains Bub multimodal image parts, data URLs are converted into Copilot blob attachments
- Workspace skills under
.agents/skillsare passed to Copilot when present
- Only Bub data URL image parts are adapted to SDK attachments
- Remote image URLs are rejected
- The plugin relies on the SDK's bundled Copilot CLI, which is still marked technical preview upstream
Recommended local checks:
uv run pytest packages/bub-github-copilot/tests
uv sync