@blockrun/clawrouter 0.12.84 → 0.12.86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -7
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/docs/11-free-ai-models-zero-cost-blockrun.md +1 -1
- package/docs/anthropic-cost-savings.md +2 -2
- package/docs/clawrouter-vs-openrouter-llm-routing-comparison.md +3 -3
- package/docs/smart-llm-router-14-dimension-classifier.md +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -74,17 +74,67 @@ This is the stack that lets agents operate autonomously: **x402 + USDC + local r
|
|
|
74
74
|
|
|
75
75
|
## Quick Start
|
|
76
76
|
|
|
77
|
+
### Option A — OpenClaw Agent
|
|
78
|
+
|
|
79
|
+
[OpenClaw](https://openclaw.ai) is an AI coding agent. If you're using it, ClawRouter installs as a plugin:
|
|
80
|
+
|
|
77
81
|
```bash
|
|
78
|
-
# 1. Install with smart routing enabled
|
|
79
82
|
curl -fsSL https://blockrun.ai/ClawRouter-update | bash
|
|
80
83
|
openclaw gateway restart
|
|
81
|
-
|
|
82
|
-
# 2. Fund your wallet with USDC on Base or Solana (address printed on install)
|
|
83
|
-
# $5 is enough for thousands of requests
|
|
84
84
|
```
|
|
85
85
|
|
|
86
86
|
Done. Smart routing (`blockrun/auto`) is now your default model.
|
|
87
87
|
|
|
88
|
+
### Option B — Standalone (continue.dev, Cursor, VS Code, any OpenAI-compatible client)
|
|
89
|
+
|
|
90
|
+
> **Using Claude Code?** Check out [BRCC](https://github.com/BlockRunAI/brcc) — it's purpose-built for Claude Code with the same smart routing and x402 payments.
|
|
91
|
+
|
|
92
|
+
No OpenClaw required. ClawRouter runs as a local proxy on port 8402.
|
|
93
|
+
|
|
94
|
+
**1. Start the proxy**
|
|
95
|
+
```bash
|
|
96
|
+
npx @blockrun/clawrouter
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**2. Fund your wallet**
|
|
100
|
+
Your wallet address is printed on first run. Send a few USDC on Base or Solana — $5 covers thousands of requests.
|
|
101
|
+
|
|
102
|
+
**3. Point your client at `http://localhost:8402`**
|
|
103
|
+
|
|
104
|
+
<details>
|
|
105
|
+
<summary><strong>continue.dev</strong> — <code>~/.continue/config.json</code></summary>
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"models": [
|
|
110
|
+
{
|
|
111
|
+
"title": "ClawRouter Auto",
|
|
112
|
+
"provider": "openai",
|
|
113
|
+
"model": "blockrun/auto",
|
|
114
|
+
"apiBase": "http://localhost:8402",
|
|
115
|
+
"apiKey": "x402"
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
</details>
|
|
121
|
+
|
|
122
|
+
<details>
|
|
123
|
+
<summary><strong>Cursor</strong> — Settings → Models → OpenAI-compatible</summary>
|
|
124
|
+
|
|
125
|
+
Set base URL to `http://localhost:8402`, API key to `x402`, model to `blockrun/auto`.
|
|
126
|
+
</details>
|
|
127
|
+
|
|
128
|
+
<details>
|
|
129
|
+
<summary><strong>Any OpenAI SDK</strong></summary>
|
|
130
|
+
|
|
131
|
+
```python
|
|
132
|
+
from openai import OpenAI
|
|
133
|
+
client = OpenAI(base_url="http://localhost:8402", api_key="x402")
|
|
134
|
+
response = client.chat.completions.create(model="blockrun/auto", messages=[...])
|
|
135
|
+
```
|
|
136
|
+
</details>
|
|
137
|
+
|
|
88
138
|
---
|
|
89
139
|
|
|
90
140
|
## Routing Profiles
|
|
@@ -233,7 +283,7 @@ Edit existing images with `/img2img`:
|
|
|
233
283
|
| openai/gpt-5.2-pro | $21.00 | $168.00 | $0.0945 | 400K | reasoning, tools |
|
|
234
284
|
| openai/gpt-5.4-pro | $30.00 | $180.00 | $0.1050 | 400K | reasoning, tools |
|
|
235
285
|
|
|
236
|
-
> **Free tier:** 11
|
|
286
|
+
> **Free tier:** 11 models cost nothing — `/model free` points to nemotron-ultra-253b, or pick any free model directly (e.g., `/model nemotron`, `/model deepseek-free`, `/model devstral`).
|
|
237
287
|
> **Best value:** `gpt-5-nano` and `gemini-2.5-flash-lite` deliver strong results at ~$0.0003/request.
|
|
238
288
|
|
|
239
289
|
---
|
|
@@ -459,7 +509,7 @@ ClawRouter is an open-source (MIT licensed) smart LLM router built for autonomou
|
|
|
459
509
|
|
|
460
510
|
### How much can ClawRouter save on LLM costs?
|
|
461
511
|
|
|
462
|
-
ClawRouter's blended average cost is $2.05 per million tokens compared to $25/M for Claude Opus, representing 92% savings. Actual savings depend on your workload — simple queries are routed to
|
|
512
|
+
ClawRouter's blended average cost is $2.05 per million tokens compared to $25/M for Claude Opus, representing 92% savings. Actual savings depend on your workload — simple queries are routed to free models ($0/request), while complex tasks get premium models.
|
|
463
513
|
|
|
464
514
|
### How does ClawRouter compare to OpenRouter?
|
|
465
515
|
|
|
@@ -471,7 +521,7 @@ Both are open source and run locally. But ClawRouter adds smart routing (automat
|
|
|
471
521
|
|
|
472
522
|
### What agents does ClawRouter work with?
|
|
473
523
|
|
|
474
|
-
ClawRouter
|
|
524
|
+
ClawRouter works with any tool that makes OpenAI-compatible API calls — point it at `http://localhost:8402`. This includes continue.dev, Cursor, VS Code extensions, ElizaOS, and custom agents. It also integrates as a plugin with [OpenClaw](https://openclaw.ai) (an AI coding agent), which enables additional features like slash commands and usage reports.
|
|
475
525
|
|
|
476
526
|
### Is ClawRouter free?
|
|
477
527
|
|
package/dist/cli.js
CHANGED
|
@@ -49885,9 +49885,9 @@ data: [DONE]
|
|
|
49885
49885
|
maxTokens,
|
|
49886
49886
|
routingProfile ?? void 0
|
|
49887
49887
|
);
|
|
49888
|
-
logCost = costs.costEstimate;
|
|
49888
|
+
logCost = FREE_MODELS.has(logModel) ? 0 : costs.costEstimate;
|
|
49889
49889
|
logBaseline = costs.baselineCost;
|
|
49890
|
-
logSavings = costs.savings;
|
|
49890
|
+
logSavings = FREE_MODELS.has(logModel) ? 1 : costs.savings;
|
|
49891
49891
|
}
|
|
49892
49892
|
const entry = {
|
|
49893
49893
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|