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

@nikocraft/model-capabilities

v0.2.1

Published

Framework-free registry of exact AI model capabilities, reasoning wire params, modalities, and limits (Anthropic / OpenAI / Google + proxy routes).

Readme

@nikocraft/model-capabilities

Framework-free registry of exact model capabilities, reasoning wire parameters, modalities, and limits across Anthropic, OpenAI, Google, and OpenAI-wire proxy routes. Pure ESM; no Node built-ins; one runtime dependency (zod).

It answers: “what can this exact model do, and how do I express reasoning effort on this route?” SDK clients, live model discovery, credentials, and usage storage remain in the consumer app.

Usage

import { createRegistry, defaultCapabilities } from '@nikocraft/model-capabilities'

const registry = createRegistry(defaultCapabilities)
const model = registry.lookup('openai', 'gpt-5.4-mini')
// { context: 400000, maxOutput: 128000, reasoning: true, toolCall: true,
//   structuredOutput: true, inputModalities: ['text', 'image'], ... }

registry.effortParams('openai', 'gpt-5.4-mini', 'high')
// { providerOptions: { openai: { reasoningEffort: 'high' } } }

// Prefixes select the vendor record; the active proxy route still selects the wire format.
registry.effortParams('cliproxy', 'anthropic/claude-opus-4-8', 'high')
// { providerOptions: { openai: { reasoningEffort: 'high' } } }

Model identity

Version 0.2.0 intentionally replaces regex family rules with exact ids. A typo, an unreleased model name, or a future model is unknown rather than inheriting a neighbouring model’s limits. An unprefixed id behind a proxy resolves only when it is unique; use openai/model-id, anthropic/model-id, or google/model-id to be explicit.

The shipped snapshot includes all current direct OpenAI and Google records, including image, audio, video, live, research, and embedding records. inputModalities and outputModalities identify their surfaces. context and maxOutput are the provider catalogue values; 0 means that the provider does not publish a token limit (for example, OpenAI image-generation models), not a zero-token allowance.

Extending the registry

import { createRegistry, mergeCapabilities, defaultCapabilities } from '@nikocraft/model-capabilities'

const extended = mergeCapabilities(defaultCapabilities, {
  providers: {
    openai: {
      models: [{
        id: 'gpt-next-preview', aliases: [], mechanism: 'reasoning-effort',
        efforts: ['low', 'medium', 'high'], context: 400000, maxOutput: 128000,
        inputModalities: ['text', 'image'], outputModalities: ['text'],
        reasoning: true, toolCall: true, structuredOutput: true
      }]
    }
  }
})

createRegistry(extended)

An added entry with the same exact id replaces the shipped entry for that provider. Duplicate ids inside one provider block are rejected during validation.

API

| Export | What it does | |---|---| | createRegistry(doc) | Validates a capability document and returns a registry. | | Registry.lookup(provider, model) | Resolves exact model facts, with route overrides applied. | | Registry.effortLevels(...) | Returns selectable effort levels; [] means no control. | | Registry.effortParams(...) | Returns request-safe providerOptions and, where needed, maxOutputTokens. | | Registry.contextLimit(...) | Returns the route-aware context value. | | mergeCapabilities(...) | Adds or replaces exact provider records without mutating its inputs. | | contextPercent(...) | Calculates context occupancy from a request’s latest token usage. | | MODALITIES, EFFORTS, defaultCapabilities | The public vocabularies and shipped snapshot. |

The source research is in docs/MODEL-CAPABILITIES.md.