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

@synthryn/sypi-openrouter

v0.6.0-beta.20260816.6a00fcae

Published

Optional extension: Pin selected OpenRouter models to a specific upstream provider without changing other model requests. Use it when provider choice must be deterministic for a model. Primary capability: /provider and the provider-routing settings; an Op

Downloads

77

Readme

sypi-openrouter

Per-model OpenRouter provider pinning. OpenRouter selects an upstream provider per request by default. This extension can force a provider for one model, such as routing deepseek/deepseek-v3 to deepinfra and deepseek/deepseek-v4 to deepseek. A pin is keyed by model ID and affects only that model. With no pins, the extension is a no-op and OpenRouter routes as usual.

How it works. A before_provider_request hook injects OpenRouter's routing field (provider: { only: [<slug>], allow_fallbacks: false }) when payload.model matches a pinned model ID. It returns a modified payload and never mutates the original. Matching payload.model against an OpenRouter slug such as vendor/model is the safety gate. A non-OpenRouter request is not changed. The hook returns undefined unless a pin matches. With zero pins, it returns before inspecting the payload.

Settings > Models > Provider routing manages the pins with a two-step centered board: choose an available OpenRouter model, then automatic routing, explicit refresh, or a cached upstream provider. Both pickers type-to-filter; backspace edits the filter, Esc clears it before closing, and keyboard and pointer activation share the same rows. Network lookup happens only after explicit refresh. /provider <model> [slug] remains the direct fast path; bare /provider points to Settings.

Where pins live. Pins are one config surface: openrouter.pins (a { <modelId>: <providerSlug> } map) in the active profile. The host projects only that settings block into the package and owns atomic updates, preserving sibling profile settings. A malformed openrouter.pins warns once and falls back to no pins.

There is no side-file fallback or migration for pins and no environment override for the map. OPENROUTER_API_KEY is read only from the environment for an explicit provider-catalog refresh and never from the profile. The package uses only the public extension API for scoped settings, state paths, and board mounting; external settings and catalog data are validated with Typebox.