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

model-delights-snell

v1.3.3

Published

White-Box Mathematical Routing Engine for B2B SaaS. Pre-flight your AI costs against LMSys ELO.

Readme

model-delights-snell

White-Box Mathematical Routing for B2B AI Agents.

Save up to 60% on your LLM API bills without sacrificing intelligence. The Snell SDK provides deterministic, ELO-based routing recommendations before you send a prompt.

The Problem: Black-Box Routing

When you use a generic tool like openrouter/auto, you surrender control of your margins. The system reads your prompt, secretly selects an expensive flagship model, runs the inference, and bills you. You cannot predict the cost or define the exact intelligence tradeoff.

The Solution: Mathematical Pre-Flight

Snell is a White-Box routing engine. We do not execute prompts. Instead, you query our SDK with an intent (e.g., 'reasoning'), and we mathematically evaluate the entire OpenRouter market against live LMSys Chatbot Arena ELO data in under 20ms.

We return the Global Flagship and the Smart Budget Alternative, allowing you to protect your profit margins dynamically.


Installation

npm install model-delights-snell

Quick Start

You must obtain a B2B API Key from the Enterprise Dashboard to authenticate.

import { IntelligenceRouter } from 'model-delights-snell';

const router = new IntelligenceRouter({
  apiKey: process.env.SNELL_API_KEY // e.g., sk_snell_xxxxxxxx
});

async function main() {
    // 1. Ask Snell for the best math on a specific task
    // Valid intents: 'reasoning', 'coding', 'drafting', 'vision', 'agentic'
    const routing = await router.getOptimalRouting('reasoning');

    console.log(`Global Flagship: ${routing.flagship.model}`);
    // Output: anthropic/claude-3.5-sonnet

    if (routing.smart_value) {
        console.log(`Budget Alternative: ${routing.smart_value.model}`);
        // Output: google/gemini-flash-1.5
        
        console.log(`The Math: ${routing.smart_value.financial_tradeoff}`);
        // Output: "12.5x cheaper for a -4.2% intelligence drop"
    }

    console.log(`Safe Fallback Chain: ${routing.fallback_array.join(', ')}`);
    // Output: anthropic/claude-3.5-sonnet, google/gemini-flash-1.5, openai/gpt-4o-mini
}

Margin Protection Tactics

Because Snell is a pre-flight check, you can use the math to build dynamic business logic directly into your app.

Example: Tiered Execution

let modelId = routing.smart_value.model; // Default to the 12.5x cheaper model

// If the user paid for a Premium subscription, upgrade them to the Flagship
if (user.subscription === 'PRO') {
    modelId = routing.flagship.model;
}

// Now securely execute the request on your own OpenRouter instance
const response = await fetch("https://openrouter.ai/api/v1/chat/completions", {
    method: "POST",
    headers: { "Authorization": `Bearer ${process.env.OPENROUTER_API_KEY}` },
    body: JSON.stringify({
        model: modelId,
        messages: [{ role: "user", content: "Write a React component" }]
    })
});

Security & Privacy

Because Snell is a pre-flight routing calculator, we never see your user's prompts or data. You only send us the intent category (e.g., 'coding'), and we return the model names. You handle the actual AI execution directly with OpenRouter on your own servers.