npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mr.mm/opencode-omniroute-plugin

v0.1.2

Published

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.

Downloads

89

Readme

@mrmm/opencode-omniroute-plugin

CI npm

OpenCode plugin for the OmniRoute AI Gateway.

Pulls a live model catalog from /v1/models, aggregates combos via /api/combos, maps OmniRoute capabilities to the OpenCode ModelV2 contract, and supports multiple side-by-side OmniRoute instances.

Fork of @omniroute/opencode-plugin with additional fixes — see Changes from upstream.

Install

npm install @mrmm/opencode-omniroute-plugin
# or
bunx add @mrmm/opencode-omniroute-plugin

For local development, clone and build:

git clone https://github.com/mrmm/opencode-omniroute-plugin
cd opencode-omniroute-plugin
bun install && bun run build

Then reference the dist directly in opencode.jsonc:

{
  "plugin": [
    [
      "/path/to/opencode-omniroute-plugin/dist/index.js",
      { "providerId": "omniroute" },
    ],
  ],
}

Quick start

// ~/.config/opencode/opencode.jsonc
{
  "$schema": "https://opencode.ai/config.json",
  "plugin": [
    [
      "@mrmm/opencode-omniroute-plugin",
      {
        "providerId": "omniroute",
        "baseURL": "https://your-omniroute-instance.example.com",
        "modelCacheTtl": 300000,
      },
    ],
  ],
}
opencode auth login --provider omniroute
# prompts for API key, writes to ~/.local/share/opencode/auth.json

Note: Use --provider explicitly. opencode auth login omniroute is parsed as a positional URL argument on OC ≤1.15.5 and fails. Tracked upstream.

Multi-instance (prod + staging)

OC ≤1.15.5 dedupes plugin loads by module path — two entries pointing at the same file collapse to one. Workaround: install the package twice into separate directories.

mkdir -p ~/.config/opencode/plugins/omniroute-prod
mkdir -p ~/.config/opencode/plugins/omniroute-staging
npm install --prefix ~/.config/opencode/plugins/omniroute-prod    @mrmm/opencode-omniroute-plugin
npm install --prefix ~/.config/opencode/plugins/omniroute-staging @mrmm/opencode-omniroute-plugin
{
  "plugin": [
    [
      "./plugins/omniroute-prod/node_modules/@mrmm/opencode-omniroute-plugin/dist/index.js",
      { "providerId": "omniroute", "baseURL": "https://or.example.com" },
    ],
    [
      "./plugins/omniroute-staging/node_modules/@mrmm/opencode-omniroute-plugin/dist/index.js",
      {
        "providerId": "omniroute-staging",
        "baseURL": "https://or-staging.example.com",
      },
    ],
  ],
}

Plugin options

| Option | Type | Default | Description | | --------------- | -------- | ---------------------------------- | --------------------------------------------------------------- | | providerId | string | "omniroute" | Unique provider id across plugin entries | | displayName | string | "OmniRoute" / OmniRoute (<id>) | Label in the OpenCode UI | | modelCacheTtl | number | 300000 (5 min) | /v1/models TTL in ms — keep ≥60 000 to avoid compaction hangs | | baseURL | string | from auth.json after /connect | Override OmniRoute base URL | | features | object | see below | Feature toggles |

features block

| Feature | Default | Description | | --------------------- | ------- | ------------------------------------------------------------------------------------------ | | combos | true | Surface /api/combos as pseudo-models with LCD capability/limit join | | enrichment | true | Overlay display names + per-token pricing from /api/pricing/models | | compressionMetadata | false | Tag combo names with compression pipeline emoji (e.g. [rtk🟡 → caveman🟠]) | | providerTag | true | Prepend upstream provider label so cc/claude-opus-4-7 → Claude - Claude Opus 4.7 | | usableOnly | false | Filter to providers with a healthy connection in /api/providers | | diskCache | true | Persist last-good catalog to disk; hydrates on cold start when /v1/models is unreachable | | geminiSanitization | true | Strip $schema/$ref/additionalProperties from tool params for gemini-* models | | mcpAutoEmit | false | Auto-write mcp.<providerId> pointing at <baseURL>/api/mcp/stream | | fetchInterceptor | true | Inject Authorization: Bearer on requests targeting baseURL |

Changes from upstream

Fixes applied on top of @omniroute/opencode-plugin at v3.8.9:

| Fix | Detail | | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | interleaved capability mapping | caps.thinking from OmniRoute was not propagated to ModelV2.capabilities.interleaved (hardcoded false). Extended thinking models now surface correctly in OpenCode's picker. Upstream PR: diegosouzapw/OmniRoute#3138 |

Development

bun install
bun run build   # tsup → dist/
bun test tests/ # 228 tests, ~150ms

Release

Tag a version to trigger the release workflow (builds, tests, publishes to npm, creates GitHub Release):

git tag v0.1.2 && git push origin v0.1.2

Requirements

  • Node >=22 or Bun >=1.1
  • OpenCode >=1.15 with @opencode-ai/plugin >=1.14.49

License

MIT — see LICENSE.