Copilot Auto
GitHub Copilot Auto model selection for OpenCode V2
5
+2 in 30 days
714
392 in 7 days
46.7
Multi-signal model
13 days ago
2026-10-07
Install and configure
opencode.jsonWrites to this project's opencode.json — applies to this repository only.
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@opeoginni/opencode-copilot-auto@1.1.0"]
}Writes to ~/.config/opencode/opencode.json — applies to every project.
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@opeoginni/opencode-copilot-auto@1.1.0"]
}If you want to modify the plugin locally, install it into the project and reference the local path.
shell
pnpm add -D @opeoginni/opencode-copilot-autoOpenCode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.
Adds GitHub Copilot's Auto model to OpenCode V2. Pick github-copilot/auto and Copilot chooses which of your available models handles each prompt, the same way Auto works in VS Code.
Requires OpenCode 2.x. For OpenCode 1, use 0.1.x.
Setup
Connect GitHub Copilot in OpenCode (/connect), then add the plugin to opencode.jsonc:
{
"$schema": "https://opencode.ai/config.json",
"plugins": ["@opeoginni/opencode-copilot-auto"]
}
Restart OpenCode and select Auto under GitHub Copilot in the model picker. It only appears once Copilot is connected.
How it works
Each request to auto is sent to Copilot's routing endpoint, which picks a model from those available on your plan. The plugin then makes the real request with that model over its native protocol (Responses for GPT-5 and newer, Chat Completions otherwise), so tools, images and reasoning behave exactly as they do when you select the model directly.
Routing happens once per user prompt; tool calls within the same turn reuse the choice.
Auto tiers
Choose an Auto variant to set Copilot's routing preference:
| Variant | Preference |
|---|---|
efficiency |
Favor cost-efficient models for straightforward tasks. |
balance |
Balance cost, quality, and speed for everyday work. |
intelligence |
Favor higher-quality models for complex tasks. |
For example: opencode run --model github-copilot/auto#intelligence "Review this design".
Without a variant, routing stays automatic. Set the plugin option "tier": "intelligence" for a default preference; a selected variant overrides it. All tiers still adapt to the task and respect your plan and policies. Unavailable tiers report an error rather than silently switching. Changing tiers triggers fresh routing, even with sticky enabled.
See GitHub's Auto tier documentation.
Options
{
"plugins": [
{
"package": "@opeoginni/opencode-copilot-auto",
"options": { "sticky": true, "notifications": true }
}
]
}
| Option | Default | Description |
|---|---|---|
sticky |
false |
false: Copilot picks a model for every prompt. true: keep the first choice for the session; tier changes and tier-token refreshes reroute. |
notifications |
false |
Show a toast naming the model Copilot picked whenever a fresh routing decision is made. Mostly useful while developing. |
tier |
unset | Default Auto tier: efficiency, balance, or intelligence. A selected variant takes precedence. |
OpenCode does not record which model answered on the message itself, so the toast is the only place the choice is visible.
Development
bun install
bun run check
bun test
bun run build
To try the plugin locally without publishing, copy the example config, build, and start an isolated OpenCode in this directory:
cp opencode.example.jsonc opencode.jsonc
bun run build
opencode --standalone
opencode.jsonc points at ./dist, so rebuild after changes. Running with --standalone keeps the test server separate from your regular OpenCode service.
Similar plugins
Copilot Delegate
opencode-copilot-delegate
OpenCode plugin that delegates tasks to GitHub Copilot CLI as background subprocesses
Copilot Usage Detector
opencode-copilot-usage-detector
OpenCode plugin that tracks GitHub Copilot token usage, learns rate limits empirically, and proactively informs the user
Copilot Statusline
opencode-copilot-statusline
OpenCode TUI plugin: display GitHub Copilot quota (premium requests, with a chat fallback for Copilot Free) in the footer statusline. V2-native, zero-config, no cookies.