Axonhub
OpenCode plugin for discovering AxonHub models
9
46
2 in 7 days
38.4
Multi-signal model
3 days ago
2026-10-02
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": ["@pandada8/opencode-axonhub@0.3.0"]
}Writes to ~/.config/opencode/opencode.json — applies to every project.
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@pandada8/opencode-axonhub@0.3.0"]
}If you want to modify the plugin locally, install it into the project and reference the local path.
shell
pnpm add -D @pandada8/opencode-axonhubOpenCode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.
OpenCode v2 plugin that discovers AxonHub models from /v1/models and /v1/models?include=all, merges both responses, and exposes them as the axonhub provider through the catalog.
It targets the opencode v2 plugin format: the module default-exports a definition with an id and a setup(ctx) function (see @opencode/plugin). Models are cached at ~/.cache/opencode/axonhub-models.json for one day. If no base URL or API key is configured, no models are registered.
Usage
Add the plugin and an axonhub provider entry to opencode.jsonc. Provide the endpoint and API key as plugin options, provider options, or environment variables.
{
"plugin": [["@pandada8/opencode-axonhub", { "baseURL": "https://your-axonhub.example.com", "apiKey": "ah-..." }]],
"provider": {
"axonhub": {
"options": {
"baseURL": "https://your-axonhub.example.com"
},
"models": {}
}
}
}
Alternatively, set the key via environment so it never lands in config:
export AXONHUB_BASE_URL="https://your-axonhub.example.com"
export AXONHUB_API_KEY="ah-..."
Resolution order for the endpoint/key: plugin options (baseURL/apiKey) -> configured provider options (provider.axonhub.options.baseURL / apiKey) -> environment (AXONHUB_BASE_URL, AXONHUB_API_KEY). If neither is found, the plugin registers nothing.
Routing
Each model is routed to the vendor protocol AxonHub expects through its per-model SDK package and endpoint:
- OpenAI models ->
@ai-sdk/openaiagainst/v1 - Gemini/Google ->
@ai-sdk/googleagainst/gemini/v1beta - everything else ->
@ai-sdk/anthropicagainst/anthropic/v1
Because opencode v2 stores the endpoint per model (there is no per-model api.url), the plugin sets each model's settings.baseURL accordingly, while exposing all of them under the single axonhub provider.
Notes
- Model enrichment from OpenCode's
~/.cache/opencode/models.jsonandexperimental.modes(*-fastvariants) are not yet ported to the v2 API. - Requires opencode v2 (tested against 2.0.18).
Similar plugins
Elicify Vertex
@elicify-ai/elicify-vertex
OpenCode plugin that makes any coding model behave like a mythos-class engineer: a behavioural contract, live in-loop detection and correction, and an independent verifier that verifies the work against your repo. Self-validating, evidence-driven agent lo
Comment Judge
opencode-plugin-comment-judge
opencode plugin and Claude Code hook that has a model judge every comment an agent writes, and removes or rewrites the ones that do not earn their place
Plain English
opencode-plain-english
Plain-English communication mode plugin for opencode