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

@robot-resources/router

v2.0.0

Published

Intelligent LLM routing proxy — cost optimization per message. Automatically selects the cheapest model capable of each task.

Readme

@robot-resources/router

Intelligent LLM cost optimization via local proxy.

Automatically route each LLM request to the cheapest model that can handle it. 60-90% cost savings with no quality loss.

Quick Start

# Run directly (no install needed)
npx @robot-resources/router start

# Or install globally
npm install -g @robot-resources/router
rr-router start

Set your API keys and point your agent to http://localhost:3838 with model: "auto".

Requirements

  • Node.js >= 18.0.0
  • Python >= 3.10 (auto-detected; used for the routing engine)

On first run, the package automatically creates an isolated Python environment in ~/.robot-resources/.venv/ and installs the Router engine. Subsequent runs start instantly.

How It Works

Your Agent (Claude Code, Cursor, etc.)
    |
    | POST /v1/chat/completions  (OpenAI-compatible)
    | model: "auto"
    v
┌─────────────────────────────┐
│  Robot Resources Router     │
│  localhost:3838              │
│                             │
│  1. Detect task type        │
│  2. Find cheapest model     │
│  3. Forward to provider     │
│  4. Track cost savings      │
└─────────────────────────────┘
    |
    v
  Anthropic / OpenAI / Google

Each message is classified (coding, reasoning, simple_qa, etc.) and routed to the cheapest model with sufficient capability for that task.

Example Savings

Turn 1: "hello"                    → gemini-2.0-flash-lite        $0.0000
Turn 2: "what's 2+2?"              → gemini-2.0-flash-lite        $0.0000
Turn 3: "refactor this React code" → gpt-4o-mini                  $0.0002
Turn 4: "thanks, looks good"       → gemini-2.0-flash-lite        $0.0000
─────────────────────────────────────────────────────────────────────────
Total with RR:       $0.0002
Without RR (gpt-4o): $0.0075
Savings:             97%

Configuration

Set provider API keys as environment variables:

export ANTHROPIC_API_KEY="sk-ant-..."
export OPENAI_API_KEY="sk-..."
export GOOGLE_API_KEY="..."

CLI Commands

rr-router start              # Start proxy on localhost:3838
rr-router start --port 4000  # Custom port
rr-router status             # Show status
rr-router report weekly      # Cost savings report (7 days)
rr-router report monthly     # Cost savings report (30 days)

Agent Integration

Point any OpenAI-compatible agent to the proxy:

{
  "baseUrl": "http://localhost:3838",
  "model": "auto"
}

The proxy handles routing transparently. Your agent doesn't need to know about model selection.

License

MIT