@blockrun/clawrouter 0.9.34 → 0.9.35

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 CHANGED
@@ -33,17 +33,17 @@ One wallet, 30+ models, zero API keys.
33
33
 
34
34
  ## 📑 Quick Navigation
35
35
 
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 |
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 | 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 |
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 | 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) |
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 | 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 | * |
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 | Default | Description |
191
- |----------|---------|-------------|
192
+ | Variable | Default | Description |
193
+ | --------------------- | -------------- | ----------------------- |
192
194
  | `BLOCKRUN_WALLET_KEY` | auto-generated | Your wallet private key |
193
- | `BLOCKRUN_PROXY_PORT` | `8402` | Local proxy port |
194
- | `CLAWROUTER_DISABLED` | `false` | Disable smart routing |
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
- | | OpenRouter / LiteLLM | ClawRouter |
203
- |--|---------------------|------------|
204
- | **Setup** | Human creates account | Agent generates wallet |
205
- | **Auth** | API key (shared secret) | Wallet signature (cryptographic) |
206
- | **Payment** | Prepaid balance (custodial) | Per-request (non-custodial) |
207
- | **Routing** | Proprietary / closed | Open source, client-side |
208
- | **Rate limits** | Per-key quotas | None (your wallet, your limits) |
209
- | **Cost** | $25/M (Opus equivalent) | $2.05/M blended average |
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 | Link |
230
- |---------|------|
231
- | 📅 Schedule Demo | [calendly.com/vickyfu9/30min](https://calendly.com/vickyfu9/30min) |
232
- | 💬 Community Telegram | [t.me/blockrunAI](https://t.me/blockrunAI) |
233
- | 🐦 X / Twitter | [x.com/BlockRunAI](https://x.com/BlockRunAI) |
234
- | 📱 Founder Telegram | [@bc1max](https://t.me/bc1max) |
235
- | ✉️ Email | vicky@blockrun.ai |
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 | Description |
242
- |----------|-------------|
243
- | [Documentation](https://blockrun.ai/docs) | Full docs |
244
- | [Model Pricing](https://blockrun.ai/models) | All models & prices |
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) | Technical deep dive |
247
- | [Configuration](docs/configuration.md) | Environment variables |
248
- | [vs OpenRouter](docs/vs-openrouter.md) | Why ClawRouter wins |
249
- | [Features](docs/features.md) | All features |
250
- | [Troubleshooting](docs/troubleshooting.md) | Common issues |
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
@@ -5810,6 +5810,19 @@ var plugin = {
5810
5810
  }
5811
5811
  }
5812
5812
  });
5813
+ resolveOrGenerateWalletKey().then(({ address, source }) => {
5814
+ if (source === "generated") {
5815
+ api.logger.info(`Generated new wallet: ${address}`);
5816
+ } else if (source === "saved") {
5817
+ api.logger.info(`Using saved wallet: ${address}`);
5818
+ } else {
5819
+ api.logger.info(`Using wallet from BLOCKRUN_WALLET_KEY: ${address}`);
5820
+ }
5821
+ }).catch((err) => {
5822
+ api.logger.warn(
5823
+ `Failed to initialize wallet: ${err instanceof Error ? err.message : String(err)}`
5824
+ );
5825
+ });
5813
5826
  if (!isGatewayMode()) {
5814
5827
  api.logger.info("Not in gateway mode \u2014 proxy will start when gateway runs");
5815
5828
  return;