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

@sdkwork/models

v0.1.0

Published

Sdkwork vendor-scoped AI model catalog loader and query SDK.

Readme

@sdkwork/models TypeScript SDK Standard

This package provides the TypeScript implementation of the sdkwork-models catalog loader, validator, and query API.

Package Name

@sdkwork/models

Runtime Targets

  • Node.js 18+
  • modern browsers
  • Vite, Next.js, Electron, and desktop web shells

Filesystem loading is Node-only. Browser applications should use bundled data, asset URLs, or remote immutable catalog URLs. loadCatalog(pathOrUrl) reads models/index.json and then loads each declared modelFiles and pricingFiles entry, so local paths and remote HTTP(S) catalog roots use the same file manifest. loadBundledCatalog() resolves SDKWORK_MODELS_CATALOG_ROOT first and then falls back to data/sdkwork-models for monorepo development.

Model and price lookups use the stable vendorCode/regionCode/modelId catalog key, for example openai/global/gpt-5.5.

Required Public API

loadCatalog(pathOrUrl)
loadBundledCatalog()
loadVendorCatalog(pathOrUrl, vendorCode, regionCode)
validateCatalog(catalog)
listVendors(catalog)
listVendorRegions(catalog)
listModels(catalog, filter)
listAvailableModels(catalog)
findModel(catalog, catalogKey)
findModelByVendorRegion(catalog, vendorCode, regionCode, modelId)
getModelPrices(catalog, catalogKey)
getBestReferencePrice(catalog, catalogKey, meterCode)
listModelsByCapability(catalog, capability)
listModelsByModality(catalog, input, output)
listMeters(catalog)
findMeter(catalog, meterCode)

listModels(catalog, filter) must support these filter keys:

  • vendorCode
  • regionCode
  • familyCode
  • capability
  • inputModality
  • outputModality
  • releaseStage
  • shelfState
  • routingState
  • apiFormat

Decimal Rule

Price and quantity fields remain strings in the base API. The SDK may expose an optional decimal adapter hook, but it must never coerce catalog prices to JavaScript number by default.

Entry Points

Recommended entry points:

@sdkwork/models
@sdkwork/models/node
@sdkwork/models/browser
@sdkwork/models/bundled

The default entry point must avoid importing Node filesystem modules so browser bundlers can tree-shake safely.

Error Model

Errors and validation issues must expose:

  • code
  • path
  • message
  • severity

Human-readable messages are not enough for application integration.

Dependency Boundary

This package must not depend on ClawRouter app/backend SDKs. It is a portable catalog SDK.

npm Release

Build and test the package before publishing:

npm.cmd install
npm.cmd test
npm.cmd run pack:dry-run

The published npm package is intentionally limited to:

  • dist/
  • README.md
  • LICENSE
  • package.json

Publish from this directory with an npm account that has access to the @sdkwork scope:

npm.cmd login
npm.cmd run release:publish

For CI, set NPM_TOKEN and run:

npm.cmd ci
npm.cmd publish

prepublishOnly runs the build, tests, and package dry run before the publish request is sent to the npm registry.