Use GitHub Copilot Fusion from OpenCode V2 through the standard Responses protocol.
Add this to opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"model": "copilot-fusion-direct/fusion",
"plugins": [
"git+https://github.com/OMGDemoPlayground/opencode-copilot-fusion.git#v0.1.2"
]
}Use git+https rather than the bare github: shorthand so installation does not require an SSH key.
- Edit
~/.config/opencode/opencode.jsonand preserve existing settings. - Add the Git tag spec and token-file option from the example above.
- Restart OpenCode Desktop after changing the config.
- Allow the first activation to finish while OpenCode downloads the Git package; a model-list command can time out before that download completes.
- Select
copilot-fusion-direct/fusionand run a short request.
- Attach PNG, JPEG, GIF, or WebP images to an OpenCode prompt, including multiple images in one prompt.
- Keep the model on
copilot-fusion-direct/fusion; the plugin marks it image-capable. - The plugin routes image requests with
has_image: true, selects a vision-capable Fusion model, and returns the normal Responses stream. - Reject image requests when Fusion selects a model without vision instead of silently dropping the image.
- Detect images returned by OpenCode tools such as
readthroughfunction_call_outputcontent.
Set FUSION_TOKEN_FILE to a JSON file containing tokens.access_token or a top-level access_token:
FUSION_TOKEN_FILE=/absolute/path/to/tokens.json opencodeAlternatively, set FUSION_ACCESS_TOKEN directly. Do not commit either value.
Select copilot-fusion-direct/fusion, or keep it as the model in opencode.json. The plugin routes with Intelligence by default.
- The plugin adds the
copilot-fusion-directprovider and a tools-capable model namedfusion. - On each model request it calls
POST /autowithfusion: trueandtier: intelligence. - It caches the selected model and Fusion session token by OpenCode session plus prompt hash.
- It forwards the original Responses payload, including tools and tool results, to
/responses. - It executes no tools. OpenCode runs its native tools and sends their results back through the same route.
- It stabilizes opaque item IDs across streamed Responses events.
Pass options through the plugin entry when needed:
{
"plugins": [
{
"package": "git+https://github.com/OMGDemoPlayground/opencode-copilot-fusion.git#v0.1.2",
"options": {
"tokenFile": "/absolute/path/to/tokens.json",
"tier": "intelligence"
}
}
]
}Supported options: tokenFile, upstream, tier, and timeoutMs. Environment equivalents are FUSION_TOKEN_FILE, FUSION_ACCESS_TOKEN, FUSION_UPSTREAM, and FUSION_TIER.
Download the release .tgz and extract it into ~/.config/opencode/plugins/opencode-copilot-fusion for a local install. OpenCode discovers plugin directories automatically.
bun install
bun test
bun run typecheck- Text and image input with Responses-capable models only.
- Upstream image count and size limits still apply; the plugin does not pre-validate them.
- PDF input is not handled by this image path.
- No token refresh yet.
- No WebSocket transport or Copilot CLI escalation policy.
- The
/autoendpoint is a private Copilot surface and can change.