@blockrun/clawrouter 0.12.62 → 0.12.63
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/docs/anthropic-cost-savings.md +349 -0
- package/docs/architecture.md +559 -0
- package/docs/assets/blockrun-248-day-cost-overrun-problem.png +0 -0
- package/docs/assets/blockrun-clawrouter-7-layer-token-compression-openclaw.png +0 -0
- package/docs/assets/blockrun-clawrouter-observation-compression-97-percent-token-savings.png +0 -0
- package/docs/assets/blockrun-clawrouter-openclaw-agentic-proxy-architecture.png +0 -0
- package/docs/assets/blockrun-clawrouter-openclaw-automatic-tier-routing-model-selection.png +0 -0
- package/docs/assets/blockrun-clawrouter-openclaw-error-classification-retry-storm-prevention.png +0 -0
- package/docs/assets/blockrun-clawrouter-openclaw-session-memory-journaling-vs-context-compounding.png +0 -0
- package/docs/assets/blockrun-clawrouter-vs-openclaw-standalone-comparison-production-safety.png +0 -0
- package/docs/assets/blockrun-clawrouter-x402-usdc-micropayment-wallet-budget-control.png +0 -0
- package/docs/assets/blockrun-openclaw-inference-layer-blind-spots.png +0 -0
- package/docs/blog-benchmark-2026-03.md +184 -0
- package/docs/blog-openclaw-cost-overruns.md +197 -0
- package/docs/clawrouter-savings.png +0 -0
- package/docs/configuration.md +512 -0
- package/docs/features.md +257 -0
- package/docs/image-generation.md +380 -0
- package/docs/plans/2026-02-03-smart-routing-design.md +267 -0
- package/docs/plans/2026-02-13-e2e-docker-deployment.md +1260 -0
- package/docs/plans/2026-02-28-worker-network.md +947 -0
- package/docs/plans/2026-03-18-error-classification.md +574 -0
- package/docs/plans/2026-03-19-exclude-models.md +538 -0
- package/docs/routing-profiles.md +81 -0
- package/docs/subscription-failover.md +320 -0
- package/docs/technical-routing-2026-03.md +322 -0
- package/docs/troubleshooting.md +159 -0
- package/docs/vision.md +49 -0
- package/docs/vs-openrouter.md +157 -0
- package/docs/worker-network.md +1241 -0
- package/package.json +2 -1
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# Troubleshooting
|
|
2
|
+
|
|
3
|
+
Quick solutions for common ClawRouter issues.
|
|
4
|
+
|
|
5
|
+
> Need help? [Open a Discussion](https://github.com/BlockRunAI/ClawRouter/discussions) or check [existing issues](https://github.com/BlockRunAI/ClawRouter/issues).
|
|
6
|
+
|
|
7
|
+
## Table of Contents
|
|
8
|
+
|
|
9
|
+
- [Quick Checklist](#quick-checklist)
|
|
10
|
+
- [Common Errors](#common-errors)
|
|
11
|
+
- [Security Scanner Warnings](#security-scanner-warnings)
|
|
12
|
+
- [Port Conflicts](#port-conflicts)
|
|
13
|
+
- [How to Update](#how-to-update)
|
|
14
|
+
- [Verify Routing](#verify-routing)
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Quick Checklist
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# 1. Check your version (should be 0.12+)
|
|
22
|
+
cat ~/.openclaw/extensions/clawrouter/package.json | grep version
|
|
23
|
+
|
|
24
|
+
# 2. Check proxy is running
|
|
25
|
+
curl http://localhost:8402/health
|
|
26
|
+
|
|
27
|
+
# 3. Check wallet (both EVM + Solana addresses and balance)
|
|
28
|
+
/wallet
|
|
29
|
+
|
|
30
|
+
# 4. Watch routing in action
|
|
31
|
+
openclaw logs --follow
|
|
32
|
+
# Should see: kimi-k2.5 $0.0012 (saved 99%)
|
|
33
|
+
|
|
34
|
+
# 5. View cost savings
|
|
35
|
+
/stats
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Common Errors
|
|
41
|
+
|
|
42
|
+
### "Unknown model: blockrun/auto" or "Unknown model: auto"
|
|
43
|
+
|
|
44
|
+
Plugin isn't loaded or outdated. **Don't change the model name** — `blockrun/auto` is correct.
|
|
45
|
+
|
|
46
|
+
**Fix:** Update to v0.3.21+ which handles both `blockrun/auto` and `auto` (OpenClaw strips provider prefix). See [How to Update](#how-to-update).
|
|
47
|
+
|
|
48
|
+
### "No API key found for provider blockrun"
|
|
49
|
+
|
|
50
|
+
Auth profile is missing or wasn't created properly.
|
|
51
|
+
|
|
52
|
+
**Fix:** See [How to Update](#how-to-update) — the reinstall script automatically injects the auth profile.
|
|
53
|
+
|
|
54
|
+
### "Config validation failed: plugin not found: clawrouter"
|
|
55
|
+
|
|
56
|
+
Plugin directory was removed but config still references it. This blocks all OpenClaw commands until fixed.
|
|
57
|
+
|
|
58
|
+
**Fix:** See [How to Update](#how-to-update) for complete cleanup steps.
|
|
59
|
+
|
|
60
|
+
### "No USDC balance" / "Insufficient funds"
|
|
61
|
+
|
|
62
|
+
Wallet needs funding. ClawRouter accepts **USDC** (not SOL or ETH) on either chain.
|
|
63
|
+
|
|
64
|
+
**Fix:**
|
|
65
|
+
|
|
66
|
+
1. Find your wallet address: run `/wallet` in any OpenClaw conversation
|
|
67
|
+
2. Choose your preferred chain and send **USDC** to that address:
|
|
68
|
+
- **Base (EVM):** Send USDC on Base network to your EVM address (`0x...`)
|
|
69
|
+
- **Solana:** Send USDC on Solana network to your Solana address (base58)
|
|
70
|
+
3. $1–5 is enough for hundreds of requests
|
|
71
|
+
4. Restart OpenClaw (or wait up to 60s for balance cache to refresh)
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Security Scanner Warnings
|
|
76
|
+
|
|
77
|
+
### "WARNING: dangerous code patterns — possible credential harvesting"
|
|
78
|
+
|
|
79
|
+
This is a **false positive**. ClawRouter legitimately:
|
|
80
|
+
|
|
81
|
+
1. Reads `BLOCKRUN_WALLET_KEY` from environment (for authentication)
|
|
82
|
+
2. Sends authenticated requests to BlockRun API (for x402 micropayments)
|
|
83
|
+
|
|
84
|
+
This pattern triggers OpenClaw's security scanner, but it's the intended behavior — the wallet key is required to sign payment transactions. The code is fully open source and auditable.
|
|
85
|
+
|
|
86
|
+
### "env-harvesting" Warning
|
|
87
|
+
|
|
88
|
+
OpenClaw's security scanner may flag ClawRouter with:
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
[env-harvesting] Environment variable access combined with network send
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**This is a false positive.** The scanner's heuristic (`env variable + network request = suspicious`) flags all payment plugins, but this pattern is inherently required for non-custodial payments.
|
|
95
|
+
|
|
96
|
+
ClawRouter reads `BLOCKRUN_WALLET_KEY` to sign x402 payment transactions — this is required and intentional:
|
|
97
|
+
|
|
98
|
+
- The wallet key is used **locally** for cryptographic signing (EIP-712)
|
|
99
|
+
- The **signature** is transmitted, not the private key itself
|
|
100
|
+
- The key **never leaves the machine** — only cryptographic proofs are sent
|
|
101
|
+
- This is standard [x402 payment protocol](https://x402.org) behavior
|
|
102
|
+
- Source code is [MIT licensed and fully auditable](https://github.com/BlockRunAI/ClawRouter)
|
|
103
|
+
|
|
104
|
+
See [`openclaw.security.json`](../openclaw.security.json) for detailed security documentation and [this discussion](https://x.com/bc1beat/status/2020158972561428686) for more context.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Port Conflicts
|
|
109
|
+
|
|
110
|
+
### Port 8402 already in use
|
|
111
|
+
|
|
112
|
+
As of v0.4.1, ClawRouter automatically detects and reuses an existing proxy on the configured port instead of failing with `EADDRINUSE`. You should no longer see this error.
|
|
113
|
+
|
|
114
|
+
If you need to use a different port:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# Set custom port via environment variable
|
|
118
|
+
export BLOCKRUN_PROXY_PORT=8403
|
|
119
|
+
openclaw gateway restart
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
To manually check/kill the process:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
lsof -i :8402
|
|
126
|
+
# Kill the process or restart OpenClaw
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## How to Update
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
npx @blockrun/clawrouter@latest
|
|
135
|
+
openclaw gateway restart
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
This installs the latest version and restarts the gateway. Alternatively:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
curl -fsSL https://raw.githubusercontent.com/BlockRunAI/ClawRouter/main/scripts/reinstall.sh | bash
|
|
142
|
+
openclaw gateway restart
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Verify Routing
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
openclaw logs --follow
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
You should see model selection for each request:
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
[plugins] [SIMPLE] google/gemini-2.5-flash $0.0012 (saved 99%)
|
|
157
|
+
[plugins] [MEDIUM] deepseek/deepseek-chat $0.0003 (saved 99%)
|
|
158
|
+
[plugins] [REASONING] deepseek/deepseek-reasoner $0.0005 (saved 99%)
|
|
159
|
+
```
|
package/docs/vision.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# BlockRun Worker Network — Vision
|
|
2
|
+
|
|
3
|
+
## The Problem
|
|
4
|
+
|
|
5
|
+
Every company with a public API — blockchain protocols, AI providers, SaaS businesses — needs to prove to investors, customers, and regulators that their service is reliable. Today, that proof comes from centralized monitoring tools like UptimeRobot or Pingdom. The fundamental flaw: these reports are self-referential. A company can choose which tool monitors them, when to show the data, and how to present it. There is no independent, tamper-proof verification.
|
|
6
|
+
|
|
7
|
+
Meanwhile, ClawRouter users run AI agents that are idle the vast majority of the time. That idle compute has no economic value today.
|
|
8
|
+
|
|
9
|
+
## The Vision
|
|
10
|
+
|
|
11
|
+
Turn ClawRouter's distributed user base into the world's first **decentralized high-availability validation network** — where AI agents earn USDC by doing real verification work, and any company can purchase cryptographically verifiable proof that their service is always on.
|
|
12
|
+
|
|
13
|
+
The core insight: a health check result signed by 50 independent nodes across 30 countries is fundamentally different from the same check run by a single company's monitoring vendor. It cannot be fabricated. It cannot be cherry-picked. It is, for the first time, **objective proof of uptime**.
|
|
14
|
+
|
|
15
|
+
## Why This Matters
|
|
16
|
+
|
|
17
|
+
We are entering a world where AI agents are the primary consumers of APIs. As agents proliferate, the reliability of the infrastructure they depend on becomes critical. A DeFi protocol that goes down at the wrong moment, an AI API that drops requests under load, a SaaS backend that silently fails — these are existential risks for the services built on top of them.
|
|
18
|
+
|
|
19
|
+
The companies that can prove they never go down will win. BlockRun provides that proof.
|
|
20
|
+
|
|
21
|
+
## Long-Term Ambition
|
|
22
|
+
|
|
23
|
+
Start with uptime monitoring. Expand to any verification task that benefits from decentralized, independent execution:
|
|
24
|
+
|
|
25
|
+
- **Phase 1**: HTTP health checks, latency measurement, SSL/DNS validation
|
|
26
|
+
- **Phase 2**: API contract verification (does the endpoint return what it promises?)
|
|
27
|
+
- **Phase 3**: Full agentic tasks — scheduled jobs, data pipelines, anything a ClawRouter agent can run
|
|
28
|
+
|
|
29
|
+
The worker network becomes the backbone of a new trust layer for the internet — not maintained by a single company, but by thousands of independent agents earning for their work.
|
|
30
|
+
|
|
31
|
+
## The Flywheel
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
More ClawRouter users
|
|
35
|
+
→ More worker nodes → Better geographic coverage
|
|
36
|
+
→ Better product for verification buyers
|
|
37
|
+
→ More revenue → Higher worker earnings
|
|
38
|
+
→ More incentive to run ClawRouter
|
|
39
|
+
→ More ClawRouter users
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Each side of the marketplace strengthens the other. ClawRouter users are simultaneously the supply (workers) and a natural demand source (they build services that need monitoring). There is no cold start problem.
|
|
43
|
+
|
|
44
|
+
## Why BlockRun Wins This
|
|
45
|
+
|
|
46
|
+
1. **Infrastructure already exists**: x402 micropayments, USDC wallets, distributed user base — all live today
|
|
47
|
+
2. **No new trust required**: Workers are already ClawRouter users who've onboarded with a funded wallet
|
|
48
|
+
3. **Crypto-native from day one**: USDC settlement on Base, x402 protocol — the payment layer is the differentiator
|
|
49
|
+
4. **Partnership leverage**: Built on Coinbase's x402 protocol, natural alignment with Base ecosystem
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# ClawRouter vs OpenRouter
|
|
2
|
+
|
|
3
|
+
OpenRouter is a popular LLM routing service. Here's why ClawRouter is built differently — and why it matters for agents.
|
|
4
|
+
|
|
5
|
+
## TL;DR
|
|
6
|
+
|
|
7
|
+
**OpenRouter is built for developers. ClawRouter is built for agents.**
|
|
8
|
+
|
|
9
|
+
| Aspect | OpenRouter | ClawRouter |
|
|
10
|
+
| ------------------ | ------------------------------------- | -------------------------------------- |
|
|
11
|
+
| **Setup** | Human creates account, pastes API key | Agent generates wallet, receives funds |
|
|
12
|
+
| **Authentication** | API key (shared secret) | Wallet signature (cryptographic) |
|
|
13
|
+
| **Payment** | Prepaid balance (custodial) | Per-request USDC (non-custodial) |
|
|
14
|
+
| **Routing** | Server-side, proprietary | Client-side, open source, <1ms |
|
|
15
|
+
| **Rate limits** | Per-key quotas | None (your wallet, your limits) |
|
|
16
|
+
| **Empty balance** | Request fails | Auto-fallback to free tier |
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## The Problem with API Keys
|
|
21
|
+
|
|
22
|
+
OpenRouter (and every traditional LLM gateway) uses API keys for authentication. This breaks agent autonomy:
|
|
23
|
+
|
|
24
|
+
### 1. Key Leakage in LLM Context
|
|
25
|
+
|
|
26
|
+
**OpenClaw Issue [#11202](https://github.com/openclaw/openclaw/issues/11202)**: API keys configured in `openclaw.json` are resolved and serialized into every LLM request payload. Every provider sees every other provider's keys.
|
|
27
|
+
|
|
28
|
+
> "OpenRouter sees your NVIDIA key, Anthropic sees your Google key... keys are sent on every turn."
|
|
29
|
+
|
|
30
|
+
**ClawRouter**: No API keys. Authentication happens via cryptographic wallet signatures. There's nothing to leak because there are no shared secrets.
|
|
31
|
+
|
|
32
|
+
### 2. Rate Limit Hell
|
|
33
|
+
|
|
34
|
+
**OpenClaw Issue [#8615](https://github.com/openclaw/openclaw/issues/8615)**: Single API key support means heavy users hit rate limits (429 errors) quickly. Users request multi-key load balancing, but that's just patching a broken model.
|
|
35
|
+
|
|
36
|
+
**ClawRouter**: Non-custodial wallets. You control your own keys. No shared rate limits. Scale by funding more wallets if needed.
|
|
37
|
+
|
|
38
|
+
### 3. Setup Friction
|
|
39
|
+
|
|
40
|
+
**OpenClaw Issues [#16257](https://github.com/openclaw/openclaw/issues/16257), [#16226](https://github.com/openclaw/openclaw/issues/16226)**: Latest installer skips model selection, shows "No auth configured for provider anthropic". Users can't even get started without debugging config.
|
|
41
|
+
|
|
42
|
+
**ClawRouter**: One-line install. 30+ models auto-configured. No API keys to paste.
|
|
43
|
+
|
|
44
|
+
### 4. Model Path Collision
|
|
45
|
+
|
|
46
|
+
**OpenClaw Issue [#2373](https://github.com/openclaw/openclaw/issues/2373)**: `openrouter/auto` is broken because OpenClaw prefixes all OpenRouter models with `openrouter/`, so the actual model becomes `openrouter/openrouter/auto`.
|
|
47
|
+
|
|
48
|
+
**ClawRouter**: Clean namespace. `blockrun/auto` just works. No prefix collision.
|
|
49
|
+
|
|
50
|
+
### 5. False Billing Errors
|
|
51
|
+
|
|
52
|
+
**OpenClaw Issue [#16237](https://github.com/openclaw/openclaw/issues/16237)**: The regex `/\b402\b/` falsely matches normal content (e.g., "402 calories") as a billing error, replacing valid AI responses with error messages.
|
|
53
|
+
|
|
54
|
+
**ClawRouter**: Native x402 protocol support. Precise error handling. No regex hacks.
|
|
55
|
+
|
|
56
|
+
### 6. Unknown Model Failures
|
|
57
|
+
|
|
58
|
+
**OpenClaw Issues [#16277](https://github.com/openclaw/openclaw/issues/16277), [#10687](https://github.com/openclaw/openclaw/issues/10687)**: Static model catalog causes "Unknown model" errors when providers add new models or during sub-agent spawns.
|
|
59
|
+
|
|
60
|
+
**ClawRouter**: 30+ models pre-configured, auto-updated catalog.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Agent-Native: Why It Matters
|
|
65
|
+
|
|
66
|
+
Traditional LLM gateways require a human in the loop:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
Traditional Flow (Human-in-the-loop):
|
|
70
|
+
Human → creates account → gets API key → pastes into config → agent runs
|
|
71
|
+
|
|
72
|
+
Agent-Native Flow (Fully autonomous):
|
|
73
|
+
Agent → generates wallet → receives USDC → pays per request → runs
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
| Capability | OpenRouter | ClawRouter |
|
|
77
|
+
| -------------------- | ----------------------- | -------------------------- |
|
|
78
|
+
| **Account creation** | Requires human | Agent generates wallet |
|
|
79
|
+
| **Authentication** | Shared secret (API key) | Cryptographic signature |
|
|
80
|
+
| **Payment** | Human prepays balance | Agent pays per request |
|
|
81
|
+
| **Funds custody** | They hold your money | You hold your keys |
|
|
82
|
+
| **Empty balance** | Request fails | Auto-fallback to free tier |
|
|
83
|
+
|
|
84
|
+
### The x402 Difference
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
Request → 402 Response (price: $0.003)
|
|
88
|
+
→ Agent's wallet signs payment
|
|
89
|
+
→ Response delivered
|
|
90
|
+
|
|
91
|
+
No accounts. No API keys. No human intervention.
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Agents can:**
|
|
95
|
+
|
|
96
|
+
- Spawn with a fresh wallet
|
|
97
|
+
- Receive funds programmatically
|
|
98
|
+
- Pay for exactly what they use
|
|
99
|
+
- Never trust a third party with their funds
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Routing: Cloud vs Local
|
|
104
|
+
|
|
105
|
+
### OpenRouter
|
|
106
|
+
|
|
107
|
+
- Routing decisions happen on OpenRouter's servers
|
|
108
|
+
- You trust their proprietary algorithm
|
|
109
|
+
- No visibility into why a model was chosen
|
|
110
|
+
- Adds latency for every request
|
|
111
|
+
|
|
112
|
+
### ClawRouter
|
|
113
|
+
|
|
114
|
+
- **100% local routing** — 15-dimension weighted scoring runs on YOUR machine
|
|
115
|
+
- **<1ms decisions** — no API calls for routing
|
|
116
|
+
- **Open source** — inspect the exact scoring logic in [`src/router.ts`](../src/router.ts)
|
|
117
|
+
- **Transparent** — see why each model is chosen
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Quick Start
|
|
122
|
+
|
|
123
|
+
Already using OpenRouter? Switch in 60 seconds:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# 1. Install ClawRouter
|
|
127
|
+
curl -fsSL https://blockrun.ai/ClawRouter-update | bash
|
|
128
|
+
|
|
129
|
+
# 2. Restart gateway
|
|
130
|
+
openclaw gateway restart
|
|
131
|
+
|
|
132
|
+
# 3. Fund wallet (address shown during install)
|
|
133
|
+
# $5 USDC on Base = thousands of requests
|
|
134
|
+
|
|
135
|
+
# 4. Switch model
|
|
136
|
+
/model blockrun/auto
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Your OpenRouter config stays intact — ClawRouter is additive, not replacement.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Summary
|
|
144
|
+
|
|
145
|
+
> **OpenRouter**: Built for developers who paste API keys
|
|
146
|
+
>
|
|
147
|
+
> **ClawRouter**: Built for agents that manage their own wallets
|
|
148
|
+
|
|
149
|
+
The future of AI isn't humans configuring API keys. It's agents autonomously acquiring and paying for resources.
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
<div align="center">
|
|
154
|
+
|
|
155
|
+
**Questions?** [Telegram](https://t.me/blockrunAI) · [X](https://x.com/BlockRunAI) · [GitHub](https://github.com/BlockRunAI/ClawRouter)
|
|
156
|
+
|
|
157
|
+
</div>
|