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

@relayplane/proxy

v1.1.2

Published

RelayPlane proxy server - intelligent AI model routing with observability

Readme

@relayplane/proxy

Intelligent AI model routing proxy for cost optimization and observability.

Installation

npm install -g @relayplane/proxy

Quick Start

# Set your API keys
export ANTHROPIC_API_KEY=your-key
export OPENAI_API_KEY=your-key

# Start the proxy
relayplane-proxy

# Configure your tools to use the proxy
export ANTHROPIC_BASE_URL=http://localhost:3001
export OPENAI_BASE_URL=http://localhost:3001

# Run your AI tools (Claude Code, Cursor, Aider, etc.)

Features

  • Intelligent Routing: Routes requests to the optimal model based on task type
  • Cost Tracking: Tracks and reports API costs across all providers
  • Provider Agnostic: Works with Anthropic, OpenAI, Gemini, xAI, and more
  • Local Learning: Learns from your usage patterns to improve routing
  • Privacy First: Never sees your prompts or responses

CLI Options

relayplane-proxy [command] [options]

Commands:
  (default)              Start the proxy server
  telemetry [on|off|status]  Manage telemetry settings
  stats                  Show usage statistics
  config                 Show configuration

Options:
  --port <number>    Port to listen on (default: 3001)
  --host <string>    Host to bind to (default: 127.0.0.1)
  --offline          Disable all network calls except LLM endpoints
  --audit            Show telemetry payloads before sending
  -v, --verbose      Enable verbose logging
  -h, --help         Show this help message
  --version          Show version

Telemetry

RelayPlane collects anonymous telemetry to improve model routing. This data helps us understand usage patterns and optimize routing decisions.

What We Collect (Exact Schema)

{
  "device_id": "anon_8f3a...",
  "task_type": "code_review",
  "model": "claude-3-5-haiku",
  "tokens_in": 1847,
  "tokens_out": 423,
  "latency_ms": 2341,
  "success": true,
  "cost_usd": 0.02
}

Field Descriptions

| Field | Type | Description | |-------|------|-------------| | device_id | string | Anonymous random ID (not fingerprintable) | | task_type | string | Inferred from token patterns, NOT prompt content | | model | string | The model that handled the request | | tokens_in | number | Input token count | | tokens_out | number | Output token count | | latency_ms | number | Request latency in milliseconds | | success | boolean | Whether the request succeeded | | cost_usd | number | Estimated cost in USD |

Task Types

Task types are inferred from request characteristics (token counts, ratios, etc.) - never from prompt content:

  • quick_task - Short input/output (< 500 tokens each)
  • code_review - Medium-long input, medium output
  • generation - High output/input ratio
  • classification - Low output/input ratio, short output
  • long_context - Input > 10,000 tokens
  • content_generation - Output > 1,000 tokens
  • tool_use - Request includes tool calls
  • general - Default classification

What We NEVER Collect

  • ❌ Your prompts
  • ❌ Model responses
  • ❌ File paths or contents
  • ❌ Anything that could identify you or your project

Verification

You can verify exactly what data is collected:

# See telemetry payloads before they're sent
relayplane-proxy --audit

# Disable all telemetry transmission
relayplane-proxy --offline

# View the source code
# https://github.com/RelayPlane/proxy

Opt-Out

To disable telemetry completely:

relayplane-proxy telemetry off

To re-enable:

relayplane-proxy telemetry on

Check current status:

relayplane-proxy telemetry status

Configuration

Configuration is stored in ~/.relayplane/config.json.

Set API Key (Pro Features)

relayplane-proxy config set-key your-api-key

View Configuration

relayplane-proxy config

Usage Statistics

View your usage statistics:

relayplane-proxy stats

This shows:

  • Total requests and cost
  • Success rate
  • Breakdown by model
  • Breakdown by task type

Environment Variables

| Variable | Description | |----------|-------------| | ANTHROPIC_API_KEY | Anthropic API key | | OPENAI_API_KEY | OpenAI API key | | GEMINI_API_KEY | Google Gemini API key | | XAI_API_KEY | xAI/Grok API key | | MOONSHOT_API_KEY | Moonshot API key |

License

MIT