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

@josephjohncox/pi-bifrost

v0.1.3

Published

Bifrost as a native Pi model provider: live catalog, API routing, session refresh

Readme

pi-bifrost

Native Pi model provider for a Bifrost gateway.

Routing is by vendor prefix from alias (anthropic.claude-…, us-gov.xai.grok-…) or a non-platform id (openai/gpt-6-sol). No version regexes. New GPT/Grok/Claude ids inherit the vendor wire.

| Vendor | Endpoint | API | |---|---|---| | anthropic | {gateway}/anthropic | anthropic-messages | | openai, xai | {gateway}/v1 | openai-responses | | everything else | {gateway}/v1 | openai-completions |

/v1 is the OpenAI-compatible surface. Anthropic does not go there. The provider baseUrl is the gateway root; each model sets its own path.

Install

pi install npm:@josephjohncox/pi-bifrost

Or clone and link:

git clone https://github.com/josephjohncox/pi-bifrost.git
cd pi-bifrost && bun install
ln -sfn "$(pwd)" ~/.pi/agent/extensions/pi-bifrost

Connection lives in ~/.pi/agent/models.json — same file Pi already uses. Do not add a models array; that replaces the live catalog. Overrides use modelOverrides:

{
  "providers": {
    "bifrost": {
      "baseUrl": "https://bifrost.example",
      "api": "openai-completions",
      "apiKey": "$BIFROST_API_KEY",
      "headers": { "x-bf-mcp-include-tools": "" },
      "exclude": ["internal/*"],
      "modelOverrides": {
        "vendor/some-id": { "input": ["text"] }
      }
    }
  }
}

Last good catalog is cached at ~/.pi/agent/bifrost-catalog.json (ids/metadata only).

Session refresh

On factory load and every session_start (startup / reload / new / resume / fork) the provider refetches and reregisters. /bifrost-refresh does the same on demand.

Defaults (src/defaults.ts)

  • x-bf-mcp-include-tools: "" on every request
  • nemotron-nano-12b-v2 is text-only
  • models.json modelOverrides / exclude always win

CLI

pi-bifrost list
pi-bifrost sync
pi-bifrost zed

sync only touches ~/.pi/agent/models.json connection fields. If this provider is loaded, do not put a models array on providers.bifrost.

Zed

pi-bifrost zed writes Zed's own LLM providers (Agent / inline model picker). It is not ACP and not the Pi TUI.

It updates ~/.config/zed/settings.json:

| Key | Endpoint | |---|---| | language_models.openai_compatible["Bifrost - OpenAI"] | {gateway}/v1 | | language_models.anthropic_compatible["Bifrost - Anthropic"] | {gateway}/anthropic |

Each available_models row gets max_tokens (context), max_output_tokens (generation cap), and wire capabilities from the live catalog.

Thinking in Zed's UI is a settings flag, not a catalog field:

  • OpenAI-compatible: Zed hides thinking unless reasoning_effort is not none. This writer sets "high" for reasoning models. That is a single default effort, not Pi's xhigh / max ladder.
  • Anthropic-compatible: set "mode": { "type": "adaptive" } or Zed treats the model as non-thinking. Haiku 3 is left without a mode.

The command also refreshes any existing openai/anthropic-compatible entry that already points at the same gateway URL (or has no URL yet), so leftover aliases stay in sync.

Reload Zed after pi-bifrost zed. Pick Bifrost - OpenAI or Bifrost - Anthropic in the model dropdown.