@orvix-id/opencode
OpenCode v2 plugin for the Orvix Coding Plan
0
0
20.0
Multi-signal model
1 day ago
2026-10-04
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": ["@orvix-id/opencode@0.1.1"]
}Writes to ~/.config/opencode/opencode.json — applies to every project.
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@orvix-id/opencode@0.1.1"]
}If you want to modify the plugin locally, install it into the project and reference the local path.
shell
pnpm add -D @orvix-id/opencodeOpenCode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.
OpenCode v2 plugin for the Orvix Coding Plan. OpenCode runs the agent; this plugin
connects it to https://api.orvix.id/coding/v1 and keeps every session on the prompt cache.
Using Pi or Oh My Pi instead? See @orvix-id/pi and @orvix-id/omp.
Setup
Create a Coding key. In platform.orvix.id/api-keys, create a key and tick Orvix Coding (
coding:invoke). The default AI Router scope (ai:invoke) is not enough; Coding endpoints answer401 coding:invoke scope required.Expose the key to OpenCode:
export ORVIX_CODING_API_KEY="orv-sk_live_..."Put it in your shell profile or secret manager rather than typing it into commands you share.
Install the plugin:
opencode plugin add @orvix-id/opencodeor add it to
~/.config/opencode/opencode.jsonyourself:{ "plugins": ["@orvix-id/opencode"], "model": "orvix-coding/glm-5.2" }Pick a model:
opencode -m orvix-coding/deepseek-v4-flash. Models with reasoning profiles expose variants, for exampleorvix-coding/glm-5.2#high.
The plugin needs OpenCode 2.0.21 or newer.
Models
The model list comes from GET /coding/v1/models when the key is available, so it always matches your plan.
Without network access the plugin falls back to the lineup it shipped with. Model ids drop the orvix/ prefix:
orvix-coding/glm-5.2 calls orvix/glm-5.2.
What the plugin does
| Piece | Why |
|---|---|
Provider orvix-coding on OpenCode's built-in OpenAI-compatible driver |
Streaming, tool calls, and usage accounting stay OpenCode's own. |
session_id added to every agent and compaction request |
Orvix keeps a session on the same upstream route and prompt cache only when the request body carries session_id. OpenCode's session id is reused, so follow-up requests hit the cache. |
prompt_cache_key enabled for every model |
Lets cache-aware upstreams group the session as well. |
x-orvix-coding-client header |
Reports the client name and plugin version. Used for diagnostics only. |
Session title requests are sent without session_id; they use a different, very small prompt.
Troubleshooting
| Symptom | Cause |
|---|---|
Model unavailable: orvix-coding/... |
The plugin did not load. Check plugins in opencode.json and run opencode with --print-logs. |
401 coding:invoke scope required |
The key was created without the Orvix Coding scope. |
429 coding_concurrency_exceeded |
Too many Coding requests in flight at once. OpenCode retries automatically; retry_after is a few seconds. |
429 coding_quota_exceeded |
A 5-hour, weekly, or monthly window is used up. resets_at says when. |
Development
bun install
bun run check # tsc + bun test
bun run probe # 3 real OpenCode turns against a local mock, reports prefix reuse per request
License
MIT
Similar plugins
With Claude
opencode-with-claude
OpenCode plugin to use your Claude Max subscription via Meridian proxy
Goal
opencode-goal-plugin
Durable, guarded goal workflows for OpenCode.
Openai Compact
opencode-openai-compact
OpenCode plugin that stores OpenAI Responses API compaction checkpoints in SQLite.