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

@stablekernel/opencode-bifrost

v0.6.0

Published

OpenCode plugin that routes models through the Bifrost gateway, resolving per-project virtual keys via gateway-cli.

Readme

@stablekernel/opencode-bifrost

OpenCode plugin that routes model traffic through a Bifrost LLM gateway, with per-project virtual-key resolution delegated to gateway-cli.

What it does

  • Registers a bifrost provider on OpenCode's OpenAI-compatible surface.
  • Fetches the model list at startup through gateway-cli models --wire=openai, with per-model context/output limits and pricing already applied — no catalog is checked in, so a model added to the gateway appears without a local edit.
  • Seeds reasoning capability per model: catalog-flagged models are registered reasoning: true with one variant per effort value they accept, and the config cascade's default reasoning_effort is seeded as the model's options.reasoningEffort when the model accepts it. The static gateway-cli emit opencode block mirrors this.
  • Resolves the virtual key per project directory (gateway-cli resolve / gateway-cli key print), so two projects on different keys never collide in OpenCode's global auth store. Falls back to a credential stored via opencode auth login on machines without gateway-cli.

No secret is held by the plugin; the key is read at runtime.

/bifrost-refresh

Registered on every startup, with or without gateway-cli — in a sandbox that has no CLI at all the plugin registers no provider, so this command is the only way to see what the gateway offers. It reconciles the model list whenever you want it, without restarting OpenCode. Two modes, chosen by what is available at the moment you run it:

  • gateway-cli present — runs gateway-cli sync, which reconciles the saved selection on disk, and prints its output. Once that turn ends, the plugin disposes the instance so the TUI re-bootstraps and the model picker re-reads the reconciled list (disposing mid-turn would cut the turn short). Since the list was re-registered, the report does not tell you to restart.
  • gateway-cli gone (sandboxed machine) — asks $BIFROST_DISCOVERY_URL (or $BIFROST_GATEWAY_URL) /v1/models directly and reports what the gateway offers versus what this session registered: new ids, ids no longer offered, or "this session's list is current". Report only — nothing is written, here or anywhere else, and no instance is disposed; the text says to restart because this mode cannot re-register anything. The key comes from $BIFROST_VK, else the CLI's own ~/.config/bifrost/keys/default.env, else the credential stored by opencode auth login.

Either way the result arrives as a message part, never as an error: a failure prints one line. The virtual key is never printed or logged.

Datasheet supplement (off by default)

Wildcard-provider models — e.g. a fresh Fireworks launch that the CLI's models.dev source has not cataloged yet — never reach gateway-cli models, so they cannot be listed here either. When configured, this plugin also reads the datasheet feed Bifrost itself syncs from and appends the wildcard-provider ids the CLI list lacks; CLI-listed ids always win. The supplement applies to the single bifrost provider.

Activation (first wins):

  1. env GATEWAY_DATASHEET_URL
  2. ~/.config/bifrost/datasheet.json{"url": "..."}
  3. <project>/.gateway/datasheet.json — same shape

The URL must be https://; a source with anything else is treated as absent.

Behavior: the feed is fetched once per hour and cached under ~/.cache/opencode/datasheet-cache.json (or $XDG_CACHE_HOME), with a 3s hard timeout and a stale-cache fallback on failure. A failed first fetch also triggers a background cache fill, so a slow or cold feed costs one session rather than every start. Unconfigured or unreachable, the supplement is silently skipped — startup never blocks on it.

Provenance: supplement-only models are tagged limits_source: "datasheet" and cost_source: "datasheet" in the gateway-cli models payload they ride in. The tags stop there — opencode's config schema has no provenance field, so they are not forwarded into the emitted opencode.json.

Requirements

  • gateway-cli on PATH (or the GATEWAY_CLI_BIN env var pointing at it), connected once with gateway-cli connect.

Install

opencode plugin @stablekernel/opencode-bifrost

License

UNLICENSED — published for installation convenience; all rights reserved. Intended for use within the organization that operates the Bifrost gateway.