@blockrun/clawrouter 0.9.34 → 0.9.36
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 +81 -79
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -33,17 +33,17 @@ One wallet, 30+ models, zero API keys.
|
|
|
33
33
|
|
|
34
34
|
## 📑 Quick Navigation
|
|
35
35
|
|
|
36
|
-
| Section
|
|
37
|
-
|
|
38
|
-
| [Quick Start](#-quick-start)
|
|
39
|
-
| [Routing Profiles](#-routing-profiles)
|
|
40
|
-
| [How It Works](#-how-it-works)
|
|
41
|
-
| [Models & Pricing](#-models--pricing)
|
|
42
|
-
| [Screenshots](#-screenshots)
|
|
43
|
-
| [Payment](#-payment)
|
|
44
|
-
| [Configuration](#%EF%B8%8F-configuration) | Environment variables
|
|
45
|
-
| [vs OpenRouter](#-vs-openrouter)
|
|
46
|
-
| [Support](#-support)
|
|
36
|
+
| Section | Description |
|
|
37
|
+
| ----------------------------------------- | --------------------------- |
|
|
38
|
+
| [Quick Start](#-quick-start) | Install in 2 minutes |
|
|
39
|
+
| [Routing Profiles](#-routing-profiles) | eco / auto / premium / free |
|
|
40
|
+
| [How It Works](#-how-it-works) | 15-dimension local routing |
|
|
41
|
+
| [Models & Pricing](#-models--pricing) | 30+ models, full price list |
|
|
42
|
+
| [Screenshots](#-screenshots) | See it in action |
|
|
43
|
+
| [Payment](#-payment) | x402 non-custodial USDC |
|
|
44
|
+
| [Configuration](#%EF%B8%8F-configuration) | Environment variables |
|
|
45
|
+
| [vs OpenRouter](#-vs-openrouter) | Why ClawRouter wins |
|
|
46
|
+
| [Support](#-support) | Telegram, X, founders |
|
|
47
47
|
|
|
48
48
|
---
|
|
49
49
|
|
|
@@ -66,12 +66,12 @@ Done! Smart routing (`blockrun/auto`) is now your default model.
|
|
|
66
66
|
|
|
67
67
|
Choose your routing strategy with `/model <profile>`:
|
|
68
68
|
|
|
69
|
-
| Profile
|
|
70
|
-
|
|
71
|
-
| `/model auto`
|
|
72
|
-
| `/model eco`
|
|
73
|
-
| `/model premium` | Best quality
|
|
74
|
-
| `/model free`
|
|
69
|
+
| Profile | Strategy | Savings | Best For |
|
|
70
|
+
| ---------------- | ------------------ | ------- | ---------------- |
|
|
71
|
+
| `/model auto` | Balanced (default) | 74-100% | General use |
|
|
72
|
+
| `/model eco` | Cheapest possible | 95-100% | Maximum savings |
|
|
73
|
+
| `/model premium` | Best quality | 0% | Mission-critical |
|
|
74
|
+
| `/model free` | Free tier only | 100% | Zero cost |
|
|
75
75
|
|
|
76
76
|
**Shortcuts:** `/model grok`, `/model br-sonnet`, `/model gpt5`, `/model o3`
|
|
77
77
|
|
|
@@ -85,12 +85,12 @@ Choose your routing strategy with `/model <profile>`:
|
|
|
85
85
|
Request → Weighted Scorer (15 dimensions) → Tier → Cheapest Model → Response
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
| Tier
|
|
89
|
-
|
|
90
|
-
| SIMPLE
|
|
91
|
-
| MEDIUM
|
|
92
|
-
| COMPLEX
|
|
93
|
-
| REASONING | grok-4-fast ($0.20/$0.50)
|
|
88
|
+
| Tier | ECO Model | AUTO Model | PREMIUM Model |
|
|
89
|
+
| --------- | ------------------------------ | ---------------------------- | ------------------------- |
|
|
90
|
+
| SIMPLE | nvidia/gpt-oss-120b (FREE) | kimi-k2.5 ($0.50/$2.40) | kimi-k2.5 |
|
|
91
|
+
| MEDIUM | gemini-2.5-flash ($0.15/$0.60) | grok-code-fast ($0.20/$1.50) | gpt-5.2-codex ($2.50/$10) |
|
|
92
|
+
| COMPLEX | gemini-2.5-flash ($0.15/$0.60) | gemini-3-pro ($2/$12) | claude-opus-4 ($15/$75) |
|
|
93
|
+
| REASONING | grok-4-fast ($0.20/$0.50) | grok-4-fast ($0.20/$0.50) | claude-sonnet-4 ($3/$15) |
|
|
94
94
|
|
|
95
95
|
**Blended average: $2.05/M** vs $25/M for Claude Opus = **92% savings**
|
|
96
96
|
|
|
@@ -103,34 +103,34 @@ Request → Weighted Scorer (15 dimensions) → Tier → Cheapest Model → Resp
|
|
|
103
103
|
<details>
|
|
104
104
|
<summary><strong>Click to expand full model list</strong></summary>
|
|
105
105
|
|
|
106
|
-
| Model
|
|
107
|
-
|
|
108
|
-
| **OpenAI**
|
|
109
|
-
| gpt-5.2
|
|
110
|
-
| gpt-4o
|
|
111
|
-
| gpt-4o-mini
|
|
112
|
-
| gpt-oss-120b
|
|
113
|
-
| o3
|
|
114
|
-
| o4-mini
|
|
115
|
-
| **Anthropic**
|
|
116
|
-
| claude-opus-4.5
|
|
117
|
-
| claude-sonnet-4.6
|
|
118
|
-
| claude-haiku-4.5
|
|
119
|
-
| **Google**
|
|
120
|
-
| gemini-3-pro-preview
|
|
121
|
-
| gemini-2.5-pro
|
|
122
|
-
| gemini-2.5-flash
|
|
123
|
-
| **DeepSeek**
|
|
124
|
-
| deepseek-chat
|
|
125
|
-
| deepseek-reasoner
|
|
126
|
-
| **xAI**
|
|
127
|
-
| grok-4-0709
|
|
128
|
-
| grok-4-1-fast-reasoning | $0.20
|
|
129
|
-
| grok-code-fast-1
|
|
130
|
-
| **Moonshot**
|
|
131
|
-
| kimi-k2.5
|
|
132
|
-
| **MiniMax**
|
|
133
|
-
| minimax-m2.5
|
|
106
|
+
| Model | Input $/M | Output $/M | Context | Reasoning |
|
|
107
|
+
| ----------------------- | --------- | ---------- | ------- | :-------: |
|
|
108
|
+
| **OpenAI** | | | | |
|
|
109
|
+
| gpt-5.2 | $1.75 | $14.00 | 400K | \* |
|
|
110
|
+
| gpt-4o | $2.50 | $10.00 | 128K | |
|
|
111
|
+
| gpt-4o-mini | $0.15 | $0.60 | 128K | |
|
|
112
|
+
| gpt-oss-120b | **FREE** | **FREE** | 128K | |
|
|
113
|
+
| o3 | $2.00 | $8.00 | 200K | \* |
|
|
114
|
+
| o4-mini | $1.10 | $4.40 | 128K | \* |
|
|
115
|
+
| **Anthropic** | | | | |
|
|
116
|
+
| claude-opus-4.5 | $5.00 | $25.00 | 200K | \* |
|
|
117
|
+
| claude-sonnet-4.6 | $3.00 | $15.00 | 200K | \* |
|
|
118
|
+
| claude-haiku-4.5 | $1.00 | $5.00 | 200K | |
|
|
119
|
+
| **Google** | | | | |
|
|
120
|
+
| gemini-3-pro-preview | $2.00 | $12.00 | 1M | \* |
|
|
121
|
+
| gemini-2.5-pro | $1.25 | $10.00 | 1M | \* |
|
|
122
|
+
| gemini-2.5-flash | $0.15 | $0.60 | 1M | |
|
|
123
|
+
| **DeepSeek** | | | | |
|
|
124
|
+
| deepseek-chat | $0.14 | $0.28 | 128K | |
|
|
125
|
+
| deepseek-reasoner | $0.55 | $2.19 | 128K | \* |
|
|
126
|
+
| **xAI** | | | | |
|
|
127
|
+
| grok-4-0709 | $0.20 | $1.50 | 131K | \* |
|
|
128
|
+
| grok-4-1-fast-reasoning | $0.20 | $0.50 | 131K | \* |
|
|
129
|
+
| grok-code-fast-1 | $0.20 | $1.50 | 131K | |
|
|
130
|
+
| **Moonshot** | | | | |
|
|
131
|
+
| kimi-k2.5 | $0.50 | $2.40 | 262K | \* |
|
|
132
|
+
| **MiniMax** | | | | |
|
|
133
|
+
| minimax-m2.5 | $0.30 | $1.20 | 205K | \* |
|
|
134
134
|
|
|
135
135
|
</details>
|
|
136
136
|
|
|
@@ -154,6 +154,7 @@ Request → Weighted Scorer (15 dimensions) → Tier → Cheapest Model → Resp
|
|
|
154
154
|
</table>
|
|
155
155
|
|
|
156
156
|
**The flow:**
|
|
157
|
+
|
|
157
158
|
1. **Wallet auto-generated** on Base (L2) — saved at `~/.openclaw/blockrun/wallet.key`
|
|
158
159
|
2. **Fund with $1 USDC** — enough for hundreds of requests
|
|
159
160
|
3. **Request any model** — ClawRouter picks the cheapest capable one
|
|
@@ -177,6 +178,7 @@ USDC stays in your wallet until spent — non-custodial. Price is visible in the
|
|
|
177
178
|
```
|
|
178
179
|
|
|
179
180
|
**Fund your wallet:**
|
|
181
|
+
|
|
180
182
|
- **Coinbase:** Buy USDC, send to Base
|
|
181
183
|
- **Bridge:** Move USDC from any chain to Base
|
|
182
184
|
- **CEX:** Withdraw USDC to Base network
|
|
@@ -187,11 +189,11 @@ USDC stays in your wallet until spent — non-custodial. Price is visible in the
|
|
|
187
189
|
|
|
188
190
|
For basic usage, no configuration needed. For advanced options:
|
|
189
191
|
|
|
190
|
-
| Variable
|
|
191
|
-
|
|
192
|
+
| Variable | Default | Description |
|
|
193
|
+
| --------------------- | -------------- | ----------------------- |
|
|
192
194
|
| `BLOCKRUN_WALLET_KEY` | auto-generated | Your wallet private key |
|
|
193
|
-
| `BLOCKRUN_PROXY_PORT` | `8402`
|
|
194
|
-
| `CLAWROUTER_DISABLED` | `false`
|
|
195
|
+
| `BLOCKRUN_PROXY_PORT` | `8402` | Local proxy port |
|
|
196
|
+
| `CLAWROUTER_DISABLED` | `false` | Disable smart routing |
|
|
195
197
|
|
|
196
198
|
**Full reference:** [docs/configuration.md](docs/configuration.md)
|
|
197
199
|
|
|
@@ -199,14 +201,14 @@ For basic usage, no configuration needed. For advanced options:
|
|
|
199
201
|
|
|
200
202
|
## 🥊 vs OpenRouter
|
|
201
203
|
|
|
202
|
-
|
|
|
203
|
-
|
|
204
|
-
| **Setup**
|
|
205
|
-
| **Auth**
|
|
206
|
-
| **Payment**
|
|
207
|
-
| **Routing**
|
|
208
|
-
| **Rate limits** | Per-key quotas
|
|
209
|
-
| **Cost**
|
|
204
|
+
| | OpenRouter / LiteLLM | ClawRouter |
|
|
205
|
+
| --------------- | --------------------------- | -------------------------------- |
|
|
206
|
+
| **Setup** | Human creates account | Agent generates wallet |
|
|
207
|
+
| **Auth** | API key (shared secret) | Wallet signature (cryptographic) |
|
|
208
|
+
| **Payment** | Prepaid balance (custodial) | Per-request (non-custodial) |
|
|
209
|
+
| **Routing** | Proprietary / closed | Open source, client-side |
|
|
210
|
+
| **Rate limits** | Per-key quotas | None (your wallet, your limits) |
|
|
211
|
+
| **Cost** | $25/M (Opus equivalent) | $2.05/M blended average |
|
|
210
212
|
|
|
211
213
|
**[Full comparison →](docs/vs-openrouter.md)**
|
|
212
214
|
|
|
@@ -226,28 +228,28 @@ npm test
|
|
|
226
228
|
|
|
227
229
|
## 📞 Support
|
|
228
230
|
|
|
229
|
-
| Channel
|
|
230
|
-
|
|
231
|
-
| 📅 Schedule Demo
|
|
232
|
-
| 💬 Community Telegram | [t.me/blockrunAI](https://t.me/blockrunAI)
|
|
233
|
-
| 🐦 X / Twitter
|
|
234
|
-
| 📱 Founder Telegram
|
|
235
|
-
| ✉️ Email
|
|
231
|
+
| Channel | Link |
|
|
232
|
+
| --------------------- | ------------------------------------------------------------------ |
|
|
233
|
+
| 📅 Schedule Demo | [calendly.com/vickyfu9/30min](https://calendly.com/vickyfu9/30min) |
|
|
234
|
+
| 💬 Community Telegram | [t.me/blockrunAI](https://t.me/blockrunAI) |
|
|
235
|
+
| 🐦 X / Twitter | [x.com/BlockRunAI](https://x.com/BlockRunAI) |
|
|
236
|
+
| 📱 Founder Telegram | [@bc1max](https://t.me/bc1max) |
|
|
237
|
+
| ✉️ Email | vicky@blockrun.ai |
|
|
236
238
|
|
|
237
239
|
---
|
|
238
240
|
|
|
239
241
|
## 📚 More Resources
|
|
240
242
|
|
|
241
|
-
| Resource
|
|
242
|
-
|
|
243
|
-
| [Documentation](https://blockrun.ai/docs)
|
|
244
|
-
| [Model Pricing](https://blockrun.ai/models)
|
|
243
|
+
| Resource | Description |
|
|
244
|
+
| -------------------------------------------- | ------------------------ |
|
|
245
|
+
| [Documentation](https://blockrun.ai/docs) | Full docs |
|
|
246
|
+
| [Model Pricing](https://blockrun.ai/models) | All models & prices |
|
|
245
247
|
| [Routing Profiles](docs/routing-profiles.md) | ECO/AUTO/PREMIUM details |
|
|
246
|
-
| [Architecture](docs/architecture.md)
|
|
247
|
-
| [Configuration](docs/configuration.md)
|
|
248
|
-
| [vs OpenRouter](docs/vs-openrouter.md)
|
|
249
|
-
| [Features](docs/features.md)
|
|
250
|
-
| [Troubleshooting](docs/troubleshooting.md)
|
|
248
|
+
| [Architecture](docs/architecture.md) | Technical deep dive |
|
|
249
|
+
| [Configuration](docs/configuration.md) | Environment variables |
|
|
250
|
+
| [vs OpenRouter](docs/vs-openrouter.md) | Why ClawRouter wins |
|
|
251
|
+
| [Features](docs/features.md) | All features |
|
|
252
|
+
| [Troubleshooting](docs/troubleshooting.md) | Common issues |
|
|
251
253
|
|
|
252
254
|
---
|
|
253
255
|
|
package/dist/index.js
CHANGED
|
@@ -5811,6 +5811,19 @@ var plugin = {
|
|
|
5811
5811
|
}
|
|
5812
5812
|
});
|
|
5813
5813
|
if (!isGatewayMode()) {
|
|
5814
|
+
resolveOrGenerateWalletKey().then(({ address, source }) => {
|
|
5815
|
+
if (source === "generated") {
|
|
5816
|
+
api.logger.info(`Generated new wallet: ${address}`);
|
|
5817
|
+
} else if (source === "saved") {
|
|
5818
|
+
api.logger.info(`Using saved wallet: ${address}`);
|
|
5819
|
+
} else {
|
|
5820
|
+
api.logger.info(`Using wallet from BLOCKRUN_WALLET_KEY: ${address}`);
|
|
5821
|
+
}
|
|
5822
|
+
}).catch((err) => {
|
|
5823
|
+
api.logger.warn(
|
|
5824
|
+
`Failed to initialize wallet: ${err instanceof Error ? err.message : String(err)}`
|
|
5825
|
+
);
|
|
5826
|
+
});
|
|
5814
5827
|
api.logger.info("Not in gateway mode \u2014 proxy will start when gateway runs");
|
|
5815
5828
|
return;
|
|
5816
5829
|
}
|