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/pi-bifrost

v0.7.0

Published

Pi extension that registers the Bifrost gateway as a model provider, resolving per-project virtual keys via gateway-cli.

Readme

@stablekernel/pi-bifrost

Pi extension that registers a Bifrost LLM gateway as a model provider, with per-project virtual-key resolution delegated to gateway-cli.

What it does

  • Registers two providers:
    • bifrost-openai — the OpenAI-compatible surface, every chat model the gateway serves.
    • bifrost-anthropic — the Anthropic Messages surface, Claude models only. The Anthropic wire carries prompt-cache control blocks that only Claude accepts, so non-Claude models are registered on the OpenAI surface instead of being listed twice with one copy broken.
  • Fetches each surface's model list, limits and pricing through gateway-cli models --wire=… at startup — no catalog is checked in.
  • Seeds reasoning capability per model: catalog-flagged models register reasoning: true. On the OpenAI surface they also get a thinkingLevelMap translating pi's thinking levels to the model's effort values (unapplicable levels are hidden, never passed through by name) plus supportsReasoningEffort, so pi's per-request effort picker sends the provider's own values. On the Anthropic surface the capability is flagged and pi's Claude thinking handling applies. Toggle-only reasoning models get no effort map. The default effort itself is pi's own thinking-level default.
  • Never holds the key: pi resolves it per request via the !gateway-cli key print command form, so the per-project key cascade (environment override → project → user default) applies on every turn.

/bifrost-refresh

Reconciles the model list on demand, in pi and omp alike (one package, one implementation, one command):

  • With gateway-cli on PATH it runs gateway-cli sync — the same reconcile as the background sync — and shows that command's own output. It rewrites the saved selection and the harness configs on disk.
  • Without it it asks the gateway directly: $BIFROST_DISCOVERY_URL (or $BIFROST_GATEWAY_URL) with $BIFROST_VK, falling back to the key in ~/.config/bifrost/keys/default.env. It then reports how many models the gateway offers and which are new or gone against the ids this session registered. This mode reports only — it writes nothing, and the key is never printed.

Either way the answer arrives as a notification, and any failure is one readable line rather than an error thrown into the session.

Restart the session to use a newly added model. Pi and omp build a provider's model list once, while the session starts, and neither can re-register one to a running session — so the report names the new models and says to restart, and nothing here fakes a reload.

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 extension also reads the datasheet feed Bifrost itself syncs from and appends the wildcard-provider ids the CLI list lacks; CLI-listed ids always win. Applies to the OpenAI-compatible surface only; the Anthropic surface stays Claude-only.

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/gateway-bifrost/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 — pi's provider config has no provenance field, so they are not forwarded into the registered shapes.

Requirements

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

Without it nothing is registered — there is no credential to hand pi — but /bifrost-refresh still reports the gateway's live list from the environment (see above).

Install

pi install npm:@stablekernel/pi-bifrost

Works in omp (the Pi fork) too — its plugin loader accepts the same package and pi.extensions manifest:

omp plugin install npm:@stablekernel/pi-bifrost

License

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