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

@oribos/model-router

v0.9.0

Published

Oribos model-router capability package — route 'provider/model' strings to model instances against a models.dev-style catalog you paste in. Parse and resolve only; the provider packages and the catalog stay yours, and the core keeps no registry and no mag

Downloads

57

Readme

@oribos/model-router

Route 'provider/model' strings to model instances — the model-routing capability package. A parse, a catalog, and the provider packages you already installed; the core keeps no registry and no magic strings:

import { Agent } from '@oribos/core/agent';
import { createModelRouter } from '@oribos/model-router';
import { groq } from '@ai-sdk/groq';

const route = createModelRouter({
  catalog, // a snapshot of https://models.dev/api.json pastes as-is
  providers: { groq: (id) => groq(id) }, // your installed provider packages
});

const agent = new Agent({ name: 'assistant', model: route('groq/llama-3.3-70b-versatile') });

How it works

  • Parse. parseModelString splits on the first slash: model ids may themselves contain slashes (deepinfra-style ids, and groq-hosted ids like openai/gpt-oss-120b), so only the first segment is the provider. Anything without that shape is refused — the string stays this package's vocabulary, never the core's.
  • Resolve. createModelRouter({ catalog, providers }) checks the parsed string against the catalog — the provider must be carried, the model id must be listed — then hands the id to your factory and validates the result through the core's model contract (assertModel). What the catalog adds over bare parsing is existence: unknown providers, unlisted models, and providers whose package you haven't registered are refused at resolution time with actionable errors — including the provider's npm package from the catalog when a factory is missing.
  • Pins kept. No registry anywhere — the catalog and the factories are caller-brought data, nothing registers and no router exists until you build one. The catalog is a vendored-shape type (ModelCatalog); a models.dev snapshot pastes as-is, extra fields pass through. Provider package dependencies travel with you, never with this package or the core. Unconfigured, the package costs nothing and adds nothing to the core.

See docs/architecture/model.md (「Provider 生态」) and examples/model-router (a committed catalog snapshot cut, scripted offline provider stubs).