z-node / docs
← Docs indexOpenCode
Setup guide for using Z-Node with OpenCode.
Official docs
Start with OpenCode's official GitHub provider and config docs. They document the provider shape, baseURL override, model limit metadata, and where opencode.json can live:
- https://github.com/anomalyco/opencode
- https://github.com/anomalyco/opencode/blob/dev/packages/web/src/content/docs/providers.mdx
- https://github.com/anomalyco/opencode/blob/dev/packages/web/src/content/docs/config.mdx
OpenCode supports project config in opencode.json at the project root and merges it with global config in ~/.config/opencode/opencode.json.
Z-Node example (opencode.json)
Copy this into your project root opencode.json. This follows OpenCode's provider config shape and defaults to gpt-5.5:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"znode": {
"npm": "@ai-sdk/openai-compatible",
"name": "Z-Node OpenAI-Compatible",
"options": {
"baseURL": "https://api.z-node.com/v1",
"apiKey": "ZNODE_ISSUED_API_KEY"
},
"models": {
"gpt-5.5": {
"name": "gpt-5.5",
"limit": {
"context": 1050000,
"output": 128000
}
},
"gpt-5.4": {
"name": "gpt-5.4",
"limit": {
"context": 1050000,
"output": 128000
}
},
"gpt-5.4-mini": {
"name": "gpt-5.4-mini",
"limit": {
"context": 400000,
"output": 128000
}
},
"gpt-5.3-codex": {
"name": "gpt-5.3-codex",
"limit": {
"context": 400000,
"output": 128000
}
},
"gpt-5.2": {
"name": "gpt-5.2",
"limit": {
"context": 400000,
"output": 128000
}
},
"codex-auto-review": {
"name": "codex-auto-review"
}
}
}
},
"model": "znode/gpt-5.5"
}Acceptable Z-Node model ids for this example:
gpt-5.5(default)gpt-5.4gpt-5.4-minigpt-5.3-codexgpt-5.2codex-auto-review
Smoke test
ZNODE_ISSUED_API_KEY="$ZNODE_ISSUED_API_KEY" \
opencode run "Reply with exactly: Z-NODE-OPENCODE-OK"