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

@xamfoo/pi-openrouter-pin

v0.1.5

Published

Pi extension to pin an OpenRouter model to a provider.

Readme

pi-openrouter-pin

Pin an OpenRouter model to a specific host provider as a dedicated, persistent pi provider. No in-memory state, no proxy daemons, no backend quantization roulette.

This extension is written with the help of AI coding assistants and reviewed by humans.

Install

pi install npm:@xamfoo/pi-openrouter-pin

Usage

Every command accepts --help (or -h) to print its usage. Use Esc to stop tab completion:

/openrouter-pin --help
/openrouter-unpin --help
/openrouter-pins --help

/openrouter-pin

Run without arguments to launch the interactive wizard:

/openrouter-pin

Expect a tabbed flow with instant fuzzy-matching against OpenRouter's full local catalog (Model › Provider › Quant › Name › Routing › Default). Tab/Enter advances, Shift+Tab steps back, Esc cancels.

Alternatively, pin directly from the command line:

# Lock to a specific provider and quantization (e.g. avoid 4-bit degradation)
/openrouter-pin deepseek/deepseek-v4-flash-0731 baseten --quant fp8

# Exclude specific unreliable providers
/openrouter-pin z-ai/glm-5.2 z-ai --ignore deepinfra,venice

# Set provider preference order
/openrouter-pin openai/gpt-oss-120b groq --order baseten,together

# Enforce zero data retention / strict privacy policy
/openrouter-pin minimax/minimax-m3 minimax --data-collection deny

# Pin and make it the default model in pi
/openrouter-pin qwen/qwen3.8-max alibaba --default

Routing Policy

By default, pins are strict: requests go only to the specified provider under openrouter-<provider>.

When you relax constraints with --fallback, --order, or --ignore, the provider is registered with a -plus suffix (e.g., openrouter-groq-plus) so the name reflects that fallbacks are allowed. (Naming conventions for relaxed routing are experimental and subject to change.)

/openrouter-pins

List active pins, their endpoints, and configured routing policies.

/openrouter-pins

/openrouter-unpin

Remove a pinned model and its provider configuration.

/openrouter-unpin <model-id>

How It Works

  • Per-Endpoint Pricing Truth: OpenRouter's catalog pricing is an aggregate that often reflects the lowest-cost provider rather than the one you call. pi-openrouter-pin extracts and records the actual endpoint pricing for your pinned provider in ~/.pi/agent/models.json.
  • Startup Drift Sync: On pi launch, pinned models refresh their pricing and context limits against OpenRouter's catalog, updating fields atomically if upstream parameters change.
  • Pi-Native Persistence: Modifies standard models.json and settings.json with atomic writes, preserving formatting and comments.

Development

npm install
npm run typecheck
npm test        # runs pure builders, arg parser, and TUI wizard harness