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

pi-openrouter-realtime

v0.2.2

Published

OpenRouter extension for pi that loads the latest models from OpenRouter in real time and adds optional provider and quantization enrichment per model

Readme

Preview

pi-openrouter-realtime

Pi extension for OpenRouter that loads the latest models from OpenRouter in real time, keeps the default model list simple, and lets you enrich a specific model with provider and quantization variants.

Once the extension is installed and your OpenRouter credential is configured in pi, each new pi session automatically fetches the latest OpenRouter model list.

Npm package:

  • pi-openrouter-realtime

Features

  • Loads the latest OpenRouter model list into pi in real time
  • Keeps startup behavior fast by default
  • Adds provider-specific variants on demand
  • Adds quantization-specific variants for a chosen model
  • Routes enriched selections through OpenRouter provider routing
  • Enriches one model at a time to avoid slow full-catalog endpoint scans

Install

1) Install the extension

From npm:

pi install npm:pi-openrouter-realtime

From GitHub:

pi install git:github.com/olixis/pi-openrouter-plus

2) Connect pi to OpenRouter

Recommended: use pi-connect to set up OpenRouter

The git:github.com/hk-vk/pi-connect package makes provider setup much easier and gives you a simple /connect flow inside pi.

Install it:

pi install git:github.com/hk-vk/pi-connect

Then open pi and connect OpenRouter:

pi
/connect openrouter

When prompted:

  1. Paste your OpenRouter API key
  2. Confirm/save it
  3. Start a new pi session, or restart the current one

pi-connect stores the credential in ~/.pi/agent/auth.json, and this extension will then automatically fetch the latest models from OpenRouter when pi starts.

Official pi ways to connect OpenRouter

Pi supports OpenRouter via either an environment variable or ~/.pi/agent/auth.json.

Using an environment variable:

export OPENROUTER_API_KEY=sk-or-...
pi

Using ~/.pi/agent/auth.json:

{
  "openrouter": { "type": "api_key", "key": "sk-or-..." }
}

Pi's official provider docs use:

  • Environment variable: OPENROUTER_API_KEY
  • auth.json key: openrouter

After the key is available, this extension automatically syncs the latest plain OpenRouter model list at session start.

3) Try without installing

pi -e npm:pi-openrouter-realtime

or:

pi -e git:github.com/olixis/pi-openrouter-plus

Commands

  • /openrouter-sync — fetch the latest OpenRouter model list in real time
  • /openrouter-enrich <model-id> — add provider and quantization variants for one specific OpenRouter model

Example

/openrouter-enrich kwaipilot/kat-coder-pro-v2

This keeps the normal OpenRouter catalog and adds variants like:

  • StreamLake — Kwaipilot: KAT-Coder-Pro V2
  • AtlasCloud · fp8 — Kwaipilot: KAT-Coder-Pro V2

Behavior

  • After the extension is installed and OpenRouter auth is configured, each new pi session syncs the latest plain OpenRouter model list from OpenRouter automatically
  • Enrichment is manual and targeted to one model at a time
  • Quantization variants are exposed as separate model choices when available
  • Enriched variants are translated into OpenRouter provider routing fields at request time
  • If you want to refresh manually or go back to the default list, run /openrouter-sync

Development

Type-check locally:

bunx tsc --noEmit

or:

npx tsc --noEmit

Test the package locally with pi:

pi -e .

Or load the extension entry file directly:

pi -e ./extensions/openrouter-routing/index.ts

License

MIT


⁶ Jesus said unto him, I am the way, the truth, and the life: no man comes unto the Father, but by me.

John 14:6