opencode-plugboard
v0.61.0
Published
Use the ChatGPT, Claude, Copilot and OpenCode Go logins in your OpenCode server from any app: an OpenCode V2 plugin serving OpenAI, Anthropic and Gemini compatible APIs.
Maintainers
Readme
Use the models you already log in to in OpenCode (ChatGPT, Claude, GitHub Copilot, OpenCode Go and the rest) from any app that speaks the OpenAI, Anthropic or Gemini API.
Plugboard is an OpenCode V2 plugin. It opens an HTTP listener inside your OpenCode server and answers those APIs with your connected providers. Each app gets its own key, model list and limits. Tool calls go back to your app; OpenCode never runs them.
Documentation: https://jjjermiah.github.io/opencode-plugboard
Install
bunx opencode-plugboard init --fast anthropic/claude-haiku-4-5This adds plugboard to your global OpenCode config (~/.config/opencode/opencode.jsonc), creates a key for one app, allows every model you are logged in to, and prints the key. Restart OpenCode. To write the entry by hand instead:
{
"plugins": [
{
"package": "[email protected]",
"options": {
"keys": { "my-app": "{env:PLUGBOARD_KEY_MY_APP}" },
"models": "all",
"aliases": { "fast": "anthropic/claude-haiku-4-5" }
}
}
]
}First request
export PLUGBOARD_KEY=<the key init printed>
curl -s http://127.0.0.1:4010/v1/chat/completions \
-H "Authorization: Bearer $PLUGBOARD_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "fast", "messages": [{"role": "user", "content": "reply with exactly: pong"}]}' \
| jq -r '.choices[0].message.content'Any SDK works the same way: set its base URL to http://127.0.0.1:4010/v1 (Anthropic and Gemini SDKs: http://127.0.0.1:4010) and its API key to your plugboard key.
What it serves
| API | Endpoints |
| --- | --- |
| OpenAI Chat Completions | POST /v1/chat/completions |
| OpenAI Responses | POST /v1/responses, GET/DELETE /v1/responses/{id}, GET /v1/responses/{id}/input_items |
| Anthropic Messages | POST /v1/messages, POST /v1/messages/count_tokens |
| Gemini | POST /v1beta/models/{model}:generateContent, :streamGenerateContent, :countTokens |
| Files | /v1/files (OpenAI and Anthropic), /upload/v1beta/files and /v1beta/files (Gemini) |
| Legacy completions | POST /v1/completions |
| Models | GET /v1/models, GET /v1/models/{id} |
Streaming, tool calls, structured output, images, PDFs and reasoning output work through the usual SDK calls.
Works with
OpenAI, Anthropic and Google SDKs for Python, JavaScript, Go, .NET and Rust; LangChain, LlamaIndex, pydantic-ai, the Vercel AI SDK, CrewAI and other agent frameworks; Open WebUI, LibreChat, n8n, Dify and Home Assistant; Claude Code, Codex CLI, Gemini CLI, Aider, Cline, Continue and Zed. Setup for each: client pages.
Features
- Per-app keys and rules: each app has its own model scope, system prompt, endpoints and caps.
- Aliases and fallbacks: short model names, and chains that move to the next model when one fails.
- Limits, budgets and caching: concurrency, request rate, daily or monthly spend, and a response cache.
- Tools, structured output, images and files.
- History, usage and monitoring: per-app usage, a dashboard, a TUI page and Prometheus metrics.
- Serving other machines from an always-on OpenCode server.
Plugboard is 0.x: a minor release can change an option or a default. Read the changelog before you move the pin.
Project
Security policy · Contributing · Changelog
MIT licensed. Not affiliated with or endorsed by OpenAI, Anthropic, Google, GitHub or Microsoft.
