@blockrun/clawrouter 0.12.85 → 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 +55 -5
- 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/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
|
|
@@ -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(),
|