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

@rovecode-labs/models

v0.1.0

Published

Offline model catalog for terminal agents: context windows, pricing (incl. prompt-size tiers), capabilities and provider env-var names — trimmed from models.dev, reachable for every provider it lists.

Readme

@rovecode-labs/models

Offline model catalog for terminal agents: context windows, pricing (including prompt-size tiers), capabilities and provider env-var names — trimmed from models.dev and shipped with the package, so the first lookup costs ~1.7 ms and no network.

import { ModelCatalog, resolveContextWindow, keyNameFor } from "@rovecode-labs/models";

const catalog = new ModelCatalog();

catalog.lookup("anthropic", "claude-opus-5");
// → { contextWindow: 1_000_000, maxOutput: 128_000,
//     pricing: { inputPerMTok: 5, outputPerMTok: 25, cacheReadPerMTok: 0.5, cacheWritePerMTok: 6.25 },
//     supportsTools: true, supportsReasoning: true, source: "models.dev" }

catalog.modelsFor("anthropic");          // every model id the catalog knows for a provider
catalog.supportsImages("openai", "gpt-5.4");

resolveContextWindow(catalog, spec, provider, model);
// config (per-model, then provider-wide) → catalog → an explicit 128k assumption, marked as assumed

keyNameFor("anthropic"); // → "ANTHROPIC_API_KEY"  (the env var a key is read from)

What makes it different

  • The data ships with the package. 213 providers / 7,527 models, trimmed to the six fields an agent actually reads, split into a 138 KB hot file (the providers every built-in maps to) and a lazily loaded extra file (the other 196 — reachable: a hand-registered provider id is tried as its own models.dev key).
  • Honest unknowns. A model that is not in the catalog resolves to undefined, never to a guess; the context-window fallback is explicit and marked source: "assumed".
  • Pricing tiers models.dev has no field for — per-request vs marginal repricing past a prompt-size threshold (xAI, OpenAI, Gemini), each with the vendor page and the day it was read.
  • A local overlay with provenance for ids the snapshot lacks (DeepSeek's API aliases, retired xAI slugs) — every row names the page it was read from and when, and source: "local" says so.

Live refresh (opt-in)

const catalog = new ModelCatalog({ fetchFn: fetch, cacheDir: ".cache/models" });
await catalog.refresh(); // layers https://models.dev/api.json over the bundled data, 24 h disk cache

Requirements

Bun ≥ 1.3 (the package ships TypeScript source and JSON data; the runtime imports both directly).

Development

This package is developed inside the rovecode monorepo (packages/models) and mirrored here with its full history. Issues and PRs are welcome on either repository; the monorepo is where the code lands first.

bun test                          # the package's own suite
bun ../../scripts/build-model-index.mjs --check   # (from the monorepo) the index matches @opencode-ai/models