@omniroute/opencode-plugin weekly downloads statistics
OpenCode plugin for the OmniRoute AI Gateway. Drives dynamic model discovery, /connect auth flow, and multi-instance OmniRoute providers via the official @opencode-ai/plugin contract.
@omniroute/opencode-plugin has 234 recorded weekly downloads on npm, a decrease of 52.9% over the past 30 days, ranking #2444 of 3,247 tracked listings.
About @omniroute/opencode-plugin
@omniroute/opencode-plugin
Recommended way to use OmniRoute with OpenCode. Pulls a live model catalog from
/v1/models(including-low/-medium/-high/-thinkingvariants as first-class IDs), aggregates combos via/api/combosusing a least-common-denominator capability/limit join, sanitizes Gemini tool schemas in flight, and supports multiple side-by-side OmniRoute instances out of the box.
Why this and not @omniroute/opencode-provider?
@omniroute/opencode-provider is the legacy config-generator package — it writes a frozen provider.omniroute block into opencode.json with a hardcoded list of 8 models (OMNIROUTE_DEFAULT_OPENCODE_MODELS). It works on the CLI but in the OpenCode Desktop / Web builds (Tauri / Electron) the runtime re-runs the model picker and the static block surfaces only a few of those — and they drift behind the live OmniRoute catalog.
This plugin solves that by:
- Fetching
/v1/modelsand/api/combosat OpenCode startup, in Node.js — no CORS, no WebView restrictions - Emitting the provider block dynamically in the plugin's
config/providerhook — soopencode.jsononly needs the plugin entry, not a staticprovider.omniroute - Re-fetching on a configurable TTL (default 5 min) and background auto-discovery while OpenCode is running (
autoSyncIntervalMs, default 5 min), so new models / combo changes appear without restarting OpenCode - Exposing a force-refresh path (
omniroute_sync_modelstool +/omni-synccommand template) equivalent to Pi/omni sync - Computing
limit.contextfor combos asmin(member.context_length)from the live catalog (no morenullvalues that cause 4K-token truncation) - Auto-pickup of
interleavedcapability for thinking models (merged via PR #3138)
If you only have the legacy opencode-provider block in your opencode.json, replace it with a single plugin entry. No other config changes required — the same auth.json API key works.
Install
The plugin ships pre-built inside the omniroute npm package since v3.8.23.
If you have OmniRoute installed, the plugin is already on disk:
# 1. One command — copy the plugin into OpenCode and update opencode.json
omniroute setup opencode --auth
# 2. Follow the interactive prompt to enter your OmniRoute API key
# 3. Restart OpenCode — /models lists the full live catalog
The --auth flag runs opencode auth login --provider opencode-omniroute automatically.
Use --base-url to point at a non-default OmniRoute address:
omniroute setup opencode --base-url https://or.example.com --auth
What it does
- Locates the bundled plugin inside the omniroute installation
- Copies
dist/+package.jsonto~/.config/opencode/plugins/omniroute/ - Writes/updates
opencode.jsonwith the plugin entry (idempotent, replaces legacy entries) - (With
--auth) runsopencode auth loginso the API key is stored
Re-run any time to update the plugin or change the base URL. Older entries for
@omniroute/opencode-provider or the legacy opencode-omniroute-auth package are
automatically cleaned up.
Manual install (without omniroute CLI)
If you cannot run omniroute setup opencode (local dev, CI, air-gapped), reference
the built artifact directly:
cd @omniroute/opencode-plugin && npm run build && npm pack
# then extract into ~/.config/opencode/plugins/omniroute-opencode-plugin/
And add the entry to opencode.json manually (see Quick Start below).
Peer dep: @opencode-ai/plugin (managed by your OpenCode install).
Quick start (single instance, manual)
// opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": [
[
"./plugins/omniroute-opencode-plugin/dist/index.js",
{
"providerId": "omniroute",
"baseURL": "https://or.example.com",
// Background re-discovery while OpenCode is running (Pi parity).
// Default 300000 (5 min). Minimum 60000. Set 0 to disable.
"autoSyncIntervalMs": 300000,
},
],
],
}
opencode auth login --provider opencode-omniroute
# prompts for the OmniRoute API key, writes to ~/.local/share/opencode/auth.json
⚠ Use the
--providerflag explicitly.opencode auth login omnirouteis parsed as a positionalurlargument by current OC releases (≤1.15.5) and fails withfetch() URL is invalid. Tracked upstream.
Restart OpenCode. /models lists the full live catalog. Variants (-low, -medium, -high, -thinking) and combos appear as first-class IDs — OmniRoute is the source of truth, no client-side synthesis.
Live catalog refresh (auto + force)
While OpenCode is running, the plugin keeps the model catalog fresh in two ways:
| Mechanism | Default | What it does |
|---|---|---|
modelCacheTtl | 300000 (5 min) | On-demand TTL: next provider/models hook after expiry re-fetches /v1/models |
autoSyncIntervalMs | 300000 (5 min) | Background timer: proactively invalidates + re-fetches while the harness is running. Min 60000. Set 0 to disable background polling (TTL still applies) |
Force sync now (Pi /omni sync equivalent) — OpenCode has no Pi-style slash-command registration API, so the plugin wires both a tool and command templates:…
Description from the npm listing.
- omniroute
- opencode
- opencode-plugin
- ai-sdk
- openai-compatible
- provider
- gemini
- combos
- mcp
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (128)Similar npm AI SDKs plugins
All 20 @omniroute/opencode-plugin alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@omniroute/opencode-plugin. First seen Nov 26, 2026; last successful collection Dec 6, 2026. See the methodology.