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

@swoosh-dev/capabilities

v0.2.0

Published

Curated default model-capability dataset for @swoosh-dev/router — models.dev enriched with features it doesn't carry (web_search, latency classes, quality scores).

Readme

@swoosh-dev/capabilities

A curated, ready-to-use model-capability dataset for @swoosh-dev/router — the models.dev catalog, narrowed to major providers and enriched with the things models.dev doesn't carry: web_search support, latency classes, quality scores (which fastest / best_quality need), and per-domain benchmarks (which byBenchmark ranks on).

npm install @swoosh-dev/capabilities
import { ModelRouter } from "@swoosh-dev/router";
import { defaultCatalog } from "@swoosh-dev/capabilities";

const router = new ModelRouter({
  catalog: defaultCatalog(), // bundled snapshot — no network, no API keys
  providers: [/* your adapters */],
});

What it exports

| Export | What | | --- | --- | | defaultCatalog() | A CapabilityCatalog backed by the bundled snapshot (offline, synchronous). | | capabilities | The raw ModelCapability[] dataset. | | defaultOverrides | The curated enrichment layer (also usable with mergeCapabilities on a live catalog). | | meta | { source, generatedAt, count } for the bundled snapshot. |

How it's built

bun run refresh (see scripts/build.ts) pulls models.dev/api.json, normalizes it via @swoosh-dev/router's normalizeModelsDevCatalog, narrows it to a major-provider allowlist (SWOOSH_PROVIDERS to override), merges src/overrides.ts with mergeCapabilities, sorts deterministically, and writes src/capabilities.generated.json.

CI runs this on a schedule and opens a PR with the diff (ci/refresh-capabilities.yml) — refreshes are reviewed, never auto-merged, so a models.dev change can't silently alter routing.

Adding enrichment

Edit src/overrides.ts — small, reviewed entries keyed by providerId/modelId, citing the provider doc/pricing source in the PR. Don't auto-scrape provider docs: doc HTML rots silently and would emit wrong data. Per-provider scrapers, if ever added, should be human-run helpers whose output a reviewer eyeballs before commit.

Prefer live data plus overrides instead of the bundled snapshot? Use the primitive directly:

import { ModelsDevCapabilityCatalog, createCapabilityCatalog, mergeCapabilities } from "@swoosh-dev/router";
import { defaultOverrides } from "@swoosh-dev/capabilities";

const live = new ModelsDevCapabilityCatalog();
const enriched = createCapabilityCatalog(async () =>
  mergeCapabilities(await live.listCapabilities(), defaultOverrides),
);