@blockrun/clawrouter 0.12.156 → 0.12.158

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockrun/clawrouter",
3
- "version": "0.12.156",
3
+ "version": "0.12.158",
4
4
  "description": "Smart LLM router — save 85% on inference costs. 55+ models (11 free), one wallet, x402 micropayments.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,13 +1,81 @@
1
1
  ---
2
2
  name: clawrouter
3
- description: Smart LLM router — save 67% on inference costs. Routes every request to the cheapest capable model across 55+ models from OpenAI, Anthropic, Google, DeepSeek, xAI, NVIDIA, and more. 11 free NVIDIA models included.
3
+ description: Hosted-gateway LLM router — save 67% on inference costs. A local proxy that forwards each request to the blockrun.ai gateway, which routes to the cheapest capable model across 55+ models from OpenAI, Anthropic, Google, DeepSeek, xAI, NVIDIA, and more. 11 free NVIDIA models included. Not a local-inference tool — prompts are sent to the blockrun.ai gateway.
4
4
  homepage: https://blockrun.ai/clawrouter.md
5
- metadata: { "openclaw": { "emoji": "🦀", "requires": { "config": ["models.providers.blockrun"] } } }
5
+ repository: https://github.com/BlockRunAI/ClawRouter
6
+ license: MIT
7
+ metadata:
8
+ {
9
+ "openclaw":
10
+ {
11
+ "emoji": "🦀",
12
+ "requires": { "config": ["models.providers.blockrun"] },
13
+ "install":
14
+ [
15
+ {
16
+ "id": "node",
17
+ "kind": "node",
18
+ "package": "@blockrun/clawrouter",
19
+ "bins": ["clawrouter"],
20
+ "label": "Install ClawRouter (npm)",
21
+ },
22
+ ],
23
+ },
24
+ }
6
25
  ---
7
26
 
8
27
  # ClawRouter
9
28
 
10
- Smart LLM router that saves 67% on inference costs by routing each request to the cheapest model that can handle it. 55+ models across 9 providers (11 free NVIDIA models), all through one wallet.
29
+ Hosted-gateway LLM router that saves 67% on inference costs by forwarding each request to the blockrun.ai gateway, which picks the cheapest model capable of handling it across 55+ models from 9 providers (11 free NVIDIA models). All billing flows through one USDC wallet; you do not hold provider API keys.
30
+
31
+ **This is not a local-inference tool.** ClawRouter is a thin local proxy. Your prompts are sent over HTTPS to the blockrun.ai gateway for model execution. If your workload requires inference that never leaves your machine, use a local runtime like Ollama — ClawRouter is not the right tool for that use case.
32
+
33
+ Source: https://github.com/BlockRunAI/ClawRouter · npm: https://www.npmjs.com/package/@blockrun/clawrouter · License: MIT.
34
+
35
+ ## Data Flow
36
+
37
+ ```
38
+ Your app → localhost proxy (ClawRouter) → https://blockrun.ai/api (or sol.blockrun.ai/api)
39
+ ↓
40
+ OpenAI / Anthropic / Google / etc.
41
+ ↓
42
+ Response → back through proxy → your app
43
+ ```
44
+
45
+ **Sent to blockrun.ai on every request:** the model name, the full prompt/messages body, sampling params (temperature, max_tokens, tools, etc.), and an `X-PAYMENT` header containing a signed x402 USDC micropayment.
46
+
47
+ **Not sent:** your wallet private key (only the detached payment signature is sent), any other local files, environment variables, or OpenClaw config beyond what's needed for this request.
48
+
49
+ **Blockrun's privacy stance:** https://blockrun.ai/privacy. Treat prompts the same way you'd treat prompts sent to any hosted LLM API (OpenAI, Anthropic, etc.) — do not send data you would not share with a third-party API provider.
50
+
51
+ ## Credentials & Local Key Storage
52
+
53
+ ClawRouter does **not** collect or forward third-party provider API keys. You do not supply OpenAI, Anthropic, Google, DeepSeek, xAI, or NVIDIA credentials — the blockrun.ai gateway owns those relationships.
54
+
55
+ **What `models.providers.blockrun` stores (fully enumerated):**
56
+
57
+ | Field | Sensitive | Purpose |
58
+ |-------|-----------|---------|
59
+ | `walletKey` | Yes | EVM private key used to sign USDC micropayments via x402. **Auto-generated locally on first run** — no user input required. Never transmitted over the network; only detached payment signatures are sent. |
60
+ | `solanaKey` | Yes | Solana keypair (BIP-44 `m/44'/501'/0'/0'`). Auto-derived from the same local mnemonic via `@scure/bip32` + `@scure/bip39`. |
61
+ | `gateway` | No | Gateway URL. Defaults: `https://blockrun.ai/api` (Base) · `https://sol.blockrun.ai/api` (Solana). |
62
+ | `routing` | No | Optional override of the default four-tier router. |
63
+
64
+ **How and where keys are stored:**
65
+
66
+ - Keys live in the OpenClaw user config file — typically `~/.config/openclaw/config.json` on Linux, `~/Library/Application Support/openclaw/config.json` on macOS, `%APPDATA%\openclaw\config.json` on Windows — under the `models.providers.blockrun` path.
67
+ - Written by OpenClaw's standard config writer with `0600` permissions on POSIX systems (owner read/write only).
68
+ - **Stored in plaintext**, the same way every OpenClaw provider's API key is stored. ClawRouter does not add an extra encryption layer; your filesystem permissions are the security boundary. If you require an encrypted keystore, run OpenClaw on an encrypted volume (FileVault, LUKS, BitLocker) or use a dedicated burner wallet funded only with what you intend to spend.
69
+ - Auto-generation uses `@scure/bip39` to produce a 24-word mnemonic, then BIP-44 derivation for both chains. Source: [`src/wallet.ts`](https://github.com/BlockRunAI/ClawRouter/blob/main/src/wallet.ts).
70
+
71
+ **Operational guidance:** treat the wallet as a spending account with a small top-up, not a long-term store of value. Fund it with what you expect to spend on LLM calls. If the host machine is compromised, the wallet key is compromised — rotate and refund.
72
+
73
+ ## Supply-Chain Integrity
74
+
75
+ - Every release is tagged on GitHub: https://github.com/BlockRunAI/ClawRouter/releases
76
+ - Every release publishes to npm with a matching version: https://www.npmjs.com/package/@blockrun/clawrouter?activeTab=versions
77
+ - The `skills/release/SKILL.md` mandatory checklist enforces: same version in `package.json`, matching git tag, matching GitHub release, and matching npm publish.
78
+ - To verify locally: `npm pack @blockrun/clawrouter@<version>` and compare the tarball contents to the tagged commit.
11
79
 
12
80
  ## Install
13
81
 
@@ -15,6 +83,8 @@ Smart LLM router that saves 67% on inference costs by routing each request to th
15
83
  openclaw plugins install @blockrun/clawrouter
16
84
  ```
17
85
 
86
+ The structured `install` block above tells OpenClaw to install the auditable npm package `@blockrun/clawrouter`. Source for every version is on GitHub; every release is tagged.
87
+
18
88
  ## Setup
19
89
 
20
90
  ```bash