RelayPlane Open Source Proxy Shows 73% Cost Reduction with Claude Model Routing

Open Source Proxy for Claude API Routing
RelayPlane is an open source, npm-native proxy that sits in front of the Anthropic API. The tool was built using Claude Code, which accelerated development. It's free to self-host and designed to handle routing between different Claude models based on prompt complexity.
Benchmark Results and Configuration
The benchmark used a mixed workload with 60% simple tasks and 40% complex tasks. Two scenarios were compared:
- Direct (all Sonnet): p50 latency 1.55s, cost per 10 requests $0.0323
- Via RelayPlane with routing: p50 latency 0.78s, cost per 10 requests $0.0086
This represents a 73.4% cost reduction. At 10,000 requests per day, this translates to approximately $712 in monthly savings.
Routing Configuration
The routing configuration is straightforward:
{
"routing": {
"complexity": {
"enabled": true,
"simple": "claude-haiku-4-5",
"moderate": "claude-sonnet-4-6",
"complex": "claude-opus-4-6"
}
}
}The routing logic uses a complexity classifier that examines token count, code indicators, and analytical keywords. Response headers include x-relayplane-routed-model to verify which model actually processed the request.
Model Pricing and Routing Logic
The routing system directs prompts to appropriate models based on complexity:
- Simple prompts → Haiku ($0.80 per million tokens)
- Moderate prompts → Sonnet ($3 per million tokens)
- Complex prompts → Opus ($15 per million tokens)
The author notes the classifier isn't perfect but is "good enough to capture most of the savings." The full benchmark methodology is available in a Gist linked in the source material.
📖 Read the full source: r/ClaudeAI
👀 See Also

Open-sourced Claude Code prompts reverse-engineered using Claude
A developer used Claude to rewrite all 26 prompts from Claude Code's source after studying the TypeScript codebase during a brief public availability window. The MIT-licensed collection includes system, tool, agent, memory, coordinator, and utility prompts.

Clawpage: A Tool That Converts OpenClaw Conversations to Static Websites
A developer created Clawpage, a skill that transforms OpenClaw session history into static web pages to preserve valuable conversations, including the back-and-forth, research, and debugging process. The tool is available on GitHub.

SpecLock: Open Source Constraint Engine for AI Coding Agents
SpecLock is an MCP server that actively enforces constraints on AI coding agents like Claude Code. It blocks violations with semantic conflict warnings using synonym expansion, negation detection, and destructive action flagging.

Cortex v1.2 adds LLM enrichment, Q&A with citations, and conflict resolution
Cortex, a local memory layer for OpenClaw agents, has released v1.2 with LLM-augmented enrichment by default, a question-answering command with citations, and improved deduplication and conflict resolution. The tool now includes unified configuration management and intent-based search pre-filtering.