@blockrun/clawrouter 0.12.66 → 0.12.67
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 +24 -0
- package/dist/cli.js +438 -330
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +0 -4
- package/dist/index.js +438 -330
- package/dist/index.js.map +1 -1
- package/docs/clawrouter-vs-openrouter-llm-routing-comparison.md +24 -0
- package/package.json +1 -1
- package/scripts/reinstall.sh +7 -7
- package/scripts/update.sh +17 -12
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
> _OpenRouter is the most popular LLM aggregator. It's also the source of the most frustration in OpenClaw's issue tracker._
|
|
4
4
|
|
|
5
|
+

|
|
6
|
+
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
## The Data
|
|
@@ -21,6 +23,10 @@ We searched OpenClaw's GitHub issues for "openrouter" and read every result. 100
|
|
|
21
23
|
|
|
22
24
|
These aren't edge cases. They're structural consequences of how OpenRouter works: a middleman that adds latency, mangles model IDs, obscures routing decisions, and introduces its own failure modes on top of the providers it aggregates.
|
|
23
25
|
|
|
26
|
+

|
|
27
|
+
|
|
28
|
+

|
|
29
|
+
|
|
24
30
|
---
|
|
25
31
|
|
|
26
32
|
## 1. Broken Fallback — The #1 Pain Point
|
|
@@ -53,6 +59,8 @@ ClawRouter maintains 8-deep fallback chains per routing tier. When a model fails
|
|
|
53
59
|
|
|
54
60
|
No silent failures. No raw 429s surfaced to the agent.
|
|
55
61
|
|
|
62
|
+

|
|
63
|
+
|
|
56
64
|
---
|
|
57
65
|
|
|
58
66
|
## 2. Model ID Mangling — Death by Prefix
|
|
@@ -82,6 +90,8 @@ ClawRouter uses clean aliases. You say `sonnet` and get `anthropic/claude-sonnet
|
|
|
82
90
|
|
|
83
91
|
One canonical format. No mangling. No UI inconsistency.
|
|
84
92
|
|
|
93
|
+

|
|
94
|
+
|
|
85
95
|
---
|
|
86
96
|
|
|
87
97
|
## 3. API Key Hell — 401s, Leakage, and Rotation
|
|
@@ -111,6 +121,8 @@ No keys to expire.
|
|
|
111
121
|
|
|
112
122
|
The wallet is the identity. The signature is the authentication. Nothing to configure, nothing to paste into a config file, nothing for the LLM to accidentally serialize.
|
|
113
123
|
|
|
124
|
+

|
|
125
|
+
|
|
114
126
|
---
|
|
115
127
|
|
|
116
128
|
## 4. Cost and Billing Opacity — Surprise Bills
|
|
@@ -141,6 +153,8 @@ x-clawrouter-model: google/gemini-2.5-flash
|
|
|
141
153
|
|
|
142
154
|
**Usage logging.** Every request logs to `~/.openclaw/blockrun/logs/usage-YYYY-MM-DD.jsonl` with model, tier, cost, baseline cost, savings, and latency. `/stats` shows the breakdown.
|
|
143
155
|
|
|
156
|
+

|
|
157
|
+
|
|
144
158
|
---
|
|
145
159
|
|
|
146
160
|
## 5. Routing Opacity — "Which Model Did I Just Pay For?"
|
|
@@ -184,6 +198,8 @@ x-clawrouter-reasoning: "Code task with moderate complexity"
|
|
|
184
198
|
|
|
185
199
|
No black box. No mystery routing. Full visibility, full control.
|
|
186
200
|
|
|
201
|
+

|
|
202
|
+
|
|
187
203
|
---
|
|
188
204
|
|
|
189
205
|
## 6. Missing Feature Parity — Images, Tools, Caching
|
|
@@ -206,6 +222,8 @@ OpenRouter doesn't always pass through provider-specific features correctly. Ima
|
|
|
206
222
|
|
|
207
223
|
**Direct provider routing.** ClawRouter routes through BlockRun's API directly to providers — not through a second aggregator. One hop, not two. Provider-specific features work because there's no middleman translating them.
|
|
208
224
|
|
|
225
|
+

|
|
226
|
+
|
|
209
227
|
---
|
|
210
228
|
|
|
211
229
|
## 7. Model Catalog Staleness — "Where's the New Model?"
|
|
@@ -232,6 +250,8 @@ ClawRouter maintains a curated catalog of 46+ models across 8 providers, updated
|
|
|
232
250
|
|
|
233
251
|
No silent drops. No stale catalog. Models are benchmarked for speed, quality, and tool support before inclusion.
|
|
234
252
|
|
|
253
|
+

|
|
254
|
+
|
|
235
255
|
---
|
|
236
256
|
|
|
237
257
|
## The Full Comparison
|
|
@@ -253,6 +273,8 @@ No silent drops. No stale catalog. Models are benchmarked for speed, quality, an
|
|
|
253
273
|
| **Setup** | Create account, paste key | Agent generates wallet, auto-configured |
|
|
254
274
|
| **Average cost** | $25/M tokens (Opus direct) | $2.05/M tokens (auto-routed) = **92% savings** |
|
|
255
275
|
|
|
276
|
+

|
|
277
|
+
|
|
256
278
|
---
|
|
257
279
|
|
|
258
280
|
## Getting Started
|
|
@@ -275,6 +297,8 @@ ClawRouter auto-injects itself into `~/.openclaw/openclaw.json` as a provider on
|
|
|
275
297
|
|
|
276
298
|
Load a wallet with USDC on Base or Solana, pick a routing profile, and run.
|
|
277
299
|
|
|
300
|
+

|
|
301
|
+
|
|
278
302
|
---
|
|
279
303
|
|
|
280
304
|
_[github.com/BlockRunAI/ClawRouter](https://github.com/BlockRunAI/ClawRouter) · [blockrun.ai](https://blockrun.ai) · `npm install -g @blockrun/clawrouter`_
|
package/package.json
CHANGED
package/scripts/reinstall.sh
CHANGED
|
@@ -354,18 +354,18 @@ try {
|
|
|
354
354
|
}
|
|
355
355
|
|
|
356
356
|
const allowlist = config.agents.defaults.models;
|
|
357
|
-
const
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
];
|
|
357
|
+
const currentKeys = new Set(TOP_MODELS.map(id => 'blockrun/' + id));
|
|
358
|
+
|
|
359
|
+
// Remove any blockrun/* entries not in the current TOP_MODELS list
|
|
361
360
|
let removed = 0;
|
|
362
|
-
for (const key of
|
|
363
|
-
if (
|
|
361
|
+
for (const key of Object.keys(allowlist)) {
|
|
362
|
+
if (key.startsWith('blockrun/') && !currentKeys.has(key)) {
|
|
364
363
|
delete allowlist[key];
|
|
365
|
-
changed = true;
|
|
366
364
|
removed++;
|
|
367
365
|
}
|
|
368
366
|
}
|
|
367
|
+
|
|
368
|
+
// Add any missing current models
|
|
369
369
|
let added = 0;
|
|
370
370
|
for (const id of TOP_MODELS) {
|
|
371
371
|
const key = 'blockrun/' + id;
|
package/scripts/update.sh
CHANGED
|
@@ -51,16 +51,20 @@ restore_previous_install() {
|
|
|
51
51
|
|
|
52
52
|
run_dependency_install() {
|
|
53
53
|
local plugin_dir="$1"
|
|
54
|
-
local log_file
|
|
55
|
-
log_file="$(mktemp -t clawrouter-update-npm.XXXXXX.log)"
|
|
54
|
+
local log_file="$HOME/clawrouter-npm-install.log"
|
|
56
55
|
|
|
56
|
+
echo " (log: $log_file)"
|
|
57
57
|
if (cd "$plugin_dir" && npm install --omit=dev >"$log_file" 2>&1); then
|
|
58
58
|
tail -1 "$log_file"
|
|
59
|
-
rm -f "$log_file"
|
|
60
59
|
else
|
|
61
|
-
echo "
|
|
62
|
-
|
|
63
|
-
echo "
|
|
60
|
+
echo ""
|
|
61
|
+
echo " ✗ npm install failed. Error log:"
|
|
62
|
+
echo " ─────────────────────────────────"
|
|
63
|
+
tail -30 "$log_file" >&2 || true
|
|
64
|
+
echo " ─────────────────────────────────"
|
|
65
|
+
echo ""
|
|
66
|
+
echo " Full log saved: $log_file"
|
|
67
|
+
echo " Send this file to @bc1max on Telegram for help."
|
|
64
68
|
return 1
|
|
65
69
|
fi
|
|
66
70
|
}
|
|
@@ -286,17 +290,18 @@ try {
|
|
|
286
290
|
}
|
|
287
291
|
|
|
288
292
|
const allowlist = config.agents.defaults.models;
|
|
289
|
-
const
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
];
|
|
293
|
+
const currentKeys = new Set(TOP_MODELS.map(id => 'blockrun/' + id));
|
|
294
|
+
|
|
295
|
+
// Remove any blockrun/* entries not in the current TOP_MODELS list
|
|
293
296
|
let removed = 0;
|
|
294
|
-
for (const key of
|
|
295
|
-
if (
|
|
297
|
+
for (const key of Object.keys(allowlist)) {
|
|
298
|
+
if (key.startsWith('blockrun/') && !currentKeys.has(key)) {
|
|
296
299
|
delete allowlist[key];
|
|
297
300
|
removed++;
|
|
298
301
|
}
|
|
299
302
|
}
|
|
303
|
+
|
|
304
|
+
// Add any missing current models
|
|
300
305
|
let added = 0;
|
|
301
306
|
for (const id of TOP_MODELS) {
|
|
302
307
|
const key = 'blockrun/' + id;
|