ClawRouter  by BlockRunAI

Smart LLM routing for cost optimization

Created 2 weeks ago

New!

2,617 stars

Top 17.8% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This project addresses the high cost of Large Language Model (LLM) inference by providing an intelligent, automated routing system. It targets developers building LLM-powered agents and applications, enabling significant cost savings (up to 96%) and simplifying API key management through a unified wallet and per-request payment system.

How It Works

The core of ClawRouter is its client-side, 14-dimension weighted scoring engine that analyzes prompts in under 1ms. This engine evaluates factors like reasoning markers, code presence, technical terms, and prompt complexity to predict the most cost-effective LLM capable of handling the request. Requests are then routed to one of four tiers (SIMPLE, MEDIUM, COMPLEX, REASONING), each mapped to specific models, ensuring optimal cost-performance balance without external API calls for routing decisions.

Quick Start & Requirements

  • Install: Use the openclaw plugin manager: openclaw plugin install @blockrun/clawrouter.
  • Prerequisites: Node.js (>=20), TypeScript (5.7), openclaw CLI, and USDC on the Base network for funding.
  • Funding: Approximately $5 USDC on Base is sufficient for thousands of requests.
  • Enable Smart Routing: Configure openclaw with openclaw config set model blockrun/auto.
  • Links: Docs, Models

Highlighted Details

  • Achieves up to 96% cost savings on LLM inference by intelligently routing requests to the cheapest capable model.
  • Integrates over 30 models from major providers including OpenAI, Anthropic, Google, DeepSeek, and xAI, accessible through a single wallet.
  • Employs a novel x402 micropayment system using USDC on the Base network, eliminating the need for traditional API keys and enabling non-custodial, per-request payments.
  • Features a fully inspectable, open-source routing logic and a 100% local execution model, ensuring privacy and <1ms routing latency.

Maintenance & Community

Community engagement is facilitated via Telegram and X. The project is developed by BlockRun AI.

Licensing & Compatibility

The project is licensed under the MIT license, permitting commercial use and integration within closed-source applications without significant restrictions.

Limitations & Caveats

Features such as cascade routing (escalating to more expensive models if quality is insufficient) and granular spend controls are listed on the roadmap and not yet implemented. Users must fund a wallet on the Base network to utilize the service.

Health Check
Last Commit

20 hours ago

Responsiveness

Inactive

Pull Requests (30d)
15
Issues (30d)
19
Star History
2,697 stars in the last 14 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems") and David Cramer David Cramer(Cofounder of Sentry).

llmgateway by theopenco

1.5%
873
LLM API gateway for unified provider access
Created 10 months ago
Updated 14 hours ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems") and Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera).

LLMRouter by ulab-uiuc

4.7%
1k
Optimize LLM inference with intelligent routing
Created 4 months ago
Updated 5 days ago
Starred by David Cournapeau David Cournapeau(Author of scikit-learn), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
11 more.

llm-numbers by ray-project

0.1%
4k
LLM developer's reference for key numbers
Created 2 years ago
Updated 2 years ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Elie Bursztein Elie Bursztein(Cybersecurity Lead at Google DeepMind), and
10 more.

RouteLLM by lm-sys

0.5%
5k
Framework for LLM routing and cost reduction (research paper)
Created 1 year ago
Updated 1 year ago
Feedback? Help us improve.