@blockrun/clawrouter 0.12.307 → 0.12.309
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 +35 -32
- package/dist/cli.js +233 -40
- package/dist/index.d.ts +3 -1
- package/dist/index.js +231 -38
- package/docs/9-free-ai-models-zero-cost-blockrun.md +33 -16
- package/docs/anthropic-cost-savings.md +3 -3
- package/docs/anthropic-third-party-harness-changes.md +3 -3
- package/docs/clawrouter-vs-openrouter-llm-routing-comparison.md +3 -3
- package/docs/configuration.md +8 -3
- package/docs/routing-profiles.md +4 -4
- package/package.json +2 -2
- package/scripts/reinstall.sh +2 -2
- package/skills/clawrouter/SKILL.md +8 -8
- package/src/top-models.json +2 -1
|
@@ -50,13 +50,13 @@ This is where you're paying for real value:
|
|
|
50
50
|
|
|
51
51
|
## The Solution: ClawRouter
|
|
52
52
|
|
|
53
|
-
[ClawRouter](https://github.com/BlockRunAI/ClawRouter) is an open-source local proxy that sits between your app and <!-- br:models.chatVisible -->
|
|
53
|
+
[ClawRouter](https://github.com/BlockRunAI/ClawRouter) is an open-source local proxy that sits between your app and <!-- br:models.chatVisible -->91<!-- /br:models.chatVisible --> AI models. It saves you money in three ways: **smart routing**, **token optimization**, and **response caching**.
|
|
54
54
|
|
|
55
55
|
```
|
|
56
56
|
┌─────────────┐ ┌──────────────────────────────┐ ┌──────────────────┐
|
|
57
|
-
│ Your App │────▶│ ClawRouter │────▶│
|
|
57
|
+
│ Your App │────▶│ ClawRouter │────▶│ 90+ AI Models │
|
|
58
58
|
│ (OpenAI │ │ (local proxy) │ │ │
|
|
59
|
-
│ SDK) │ │ │ │ FREE (
|
|
59
|
+
│ SDK) │ │ │ │ FREE (8 free) │
|
|
60
60
|
│ │ │ 1. Route to cheapest model │ │ $0.10 (gemini) │
|
|
61
61
|
│ model: │ │ 2. Compress tokens │ │ $3.00 (sonnet) │
|
|
62
62
|
│ "auto" │ │ 3. Cache repeated requests │ │ $0.20 (grok) │
|
|
@@ -31,7 +31,7 @@ This is exactly the problem [ClawRouter](https://github.com/BlockRunAI/ClawRoute
|
|
|
31
31
|
|
|
32
32
|
## ClawRouter: Smart Routing for Agents
|
|
33
33
|
|
|
34
|
-
ClawRouter is an open-source local proxy that sits between your agent and <!-- br:models.chatVisible -->
|
|
34
|
+
ClawRouter is an open-source local proxy that sits between your agent and <!-- br:models.chatVisible -->91<!-- /br:models.chatVisible --> LLM models across 9 providers. It analyzes every request across 15 dimensions and routes it to the cheapest model that can handle it — in under 1ms, entirely locally.
|
|
35
35
|
|
|
36
36
|
```
|
|
37
37
|
Your Agent → ClawRouter (localhost:8402) → Best model for the job
|
|
@@ -74,12 +74,12 @@ Then point your agent at `http://localhost:8402/v1/` with any OpenAI-compatible
|
|
|
74
74
|
|
|
75
75
|
- **No API keys to manage** — wallet-based cryptographic auth
|
|
76
76
|
- **No subscriptions** — pay per request in USDC (Base or Solana)
|
|
77
|
-
- **No vendor lock-in** — <!-- br:models.chatVisible -->
|
|
77
|
+
- **No vendor lock-in** — <!-- br:models.chatVisible -->91<!-- /br:models.chatVisible --> models, switch anytime
|
|
78
78
|
- **You control your wallet** — non-custodial, funds never held by a third party
|
|
79
79
|
- **Budget caps** — set a max spend per session, ClawRouter gracefully downgrades when budget runs low
|
|
80
80
|
- **Token compression** — 7-layer pipeline reduces token costs by 7–40% before they hit any provider
|
|
81
81
|
- **Response caching** — identical requests within 10 minutes cost $0
|
|
82
|
-
- **<!-- br:models.free -->
|
|
82
|
+
- **<!-- br:models.free -->8<!-- /br:models.free --> free models** — for tasks that don't need a paid model at all
|
|
83
83
|
|
|
84
84
|
### Routing Profiles
|
|
85
85
|
|
|
@@ -222,7 +222,7 @@ OpenRouter doesn't always pass through provider-specific features correctly. Ima
|
|
|
222
222
|
|
|
223
223
|
**Direct provider routing.** ClawRouter routes through BlockRun's API directly to providers — not through a second aggregator. One hop, not two. Provider-specific features work because there's no middleman translating them.
|
|
224
224
|
|
|
225
|
-

|
|
226
226
|
|
|
227
227
|
---
|
|
228
228
|
|
|
@@ -240,7 +240,7 @@ When new models launch, OpenRouter's catalog lags. Users configure a model that
|
|
|
240
240
|
|
|
241
241
|
### How ClawRouter Solves This
|
|
242
242
|
|
|
243
|
-
ClawRouter maintains a curated catalog of <!-- br:models.chatVisible -->
|
|
243
|
+
ClawRouter maintains a curated catalog of <!-- br:models.chatVisible -->91<!-- /br:models.chatVisible --> models across 9 providers (including <!-- br:models.free -->8<!-- /br:models.free --> free models), updated with each release. Delisted models have automatic redirect aliases:
|
|
244
244
|
|
|
245
245
|
```typescript
|
|
246
246
|
// Delisted models redirect automatically
|
|
@@ -268,7 +268,7 @@ No silent drops. No stale catalog. Models are benchmarked for speed, quality, an
|
|
|
268
268
|
| **Rate limits** | Per-key, shared | Per-wallet, independent |
|
|
269
269
|
| **Vision support** | Images sometimes dropped | Auto-detected, vision-only fallback |
|
|
270
270
|
| **Tool calling** | Silent failures with some models | Flag-based filtering, guaranteed support |
|
|
271
|
-
| **Model catalog** | Laggy, silent drops | Curated <!-- br:models.chatVisible -->
|
|
271
|
+
| **Model catalog** | Laggy, silent drops | Curated <!-- br:models.chatVisible -->91<!-- /br:models.chatVisible --> models, redirect aliases |
|
|
272
272
|
| **Budget control** | Monthly invoice | Per-session cap (`maxCostPerRun`) |
|
|
273
273
|
| **Setup** | Create account, paste key | Agent generates wallet, auto-configured |
|
|
274
274
|
| **Average cost** | $25/M tokens (Opus direct) | auto-routed = **<!-- br:savings.autoVsBaselinePct -->84<!-- /br:savings.autoVsBaselinePct -->% savings** |
|
package/docs/configuration.md
CHANGED
|
@@ -533,7 +533,9 @@ plugins:
|
|
|
533
533
|
- id: "@blockrun/clawrouter"
|
|
534
534
|
config:
|
|
535
535
|
# Maximum spend per session/run in USD.
|
|
536
|
-
# Default: disabled (no limit)
|
|
536
|
+
# Default: disabled (no limit). 0 refuses every paid call on every endpoint,
|
|
537
|
+
# so only free models answer. Pin a free model: strict mode refuses auto and
|
|
538
|
+
# premium, and graceful mode refuses them on tool calls.
|
|
537
539
|
maxCostPerRun: 0.50 # $0.50 per session
|
|
538
540
|
|
|
539
541
|
# How to enforce the budget cap. Default: graceful
|
|
@@ -552,8 +554,11 @@ plugins:
|
|
|
552
554
|
# fallbacks) is checked against the cap before it is signed.
|
|
553
555
|
maxCostPerRunMode: graceful # or: strict
|
|
554
556
|
|
|
555
|
-
# Note:
|
|
556
|
-
#
|
|
557
|
+
# Note: a positive cap applies to /v1/chat/completions and /v1/messages, which share
|
|
558
|
+
# a session's budget. /v1/messages forwards the model you asked for and never
|
|
559
|
+
# downgrades, so it answers 429 in either mode when the budget can't cover a paid call.
|
|
560
|
+
# Image, video, music and speech generation and the partner and data APIs bypass the
|
|
561
|
+
# cap. Their cost is charged directly and is not tracked per-session.
|
|
557
562
|
|
|
558
563
|
routing:
|
|
559
564
|
# Strategy. Default: portfolio (Router Core V3.4 — constraint-first ranking
|
package/docs/routing-profiles.md
CHANGED
|
@@ -75,13 +75,13 @@ Set `routing.overrides.agenticMode: false` to disable the agentic tier set, or `
|
|
|
75
75
|
|
|
76
76
|
## FREE (`/model free`)
|
|
77
77
|
|
|
78
|
-
`free` is an alias, not a routed profile: it pins the free-tier default, currently **`free/nemotron-3.5-lightning`** — the same model that opens ECO SIMPLE. If that model is excluded (`/exclude add lightning`) or the budget cap forces a free fallback, the proxy walks the free cascade in this order: nemotron-3.5-lightning → laguna-xs-2.1 → north-mini-code → nemotron-3-nano-omni-30b-a3b-reasoning → nemotron-3-
|
|
78
|
+
`free` is an alias, not a routed profile: it pins the free-tier default, currently **`free/nemotron-3.5-lightning`** — the same model that opens ECO SIMPLE. If that model is excluded (`/exclude add lightning`) or the budget cap forces a free fallback, the proxy walks the free cascade in this order: nemotron-3.5-lightning → laguna-xs-2.1 → north-mini-code → nemotron-3.5-bolt → nemotron-3-nano-omni-30b-a3b-reasoning → nemotron-3-super-120b → nemotron-3-ultra-550b. All seven are $0.00 and need no USDC, and only Bolt is treated as reading images — see the vision note below.
|
|
79
79
|
|
|
80
|
-
The order is not arbitrary. The head is whatever the gateway itself redirects the previous head to, so the proxy and the gateway never name different models. After it come the two sub-second coders — adjacent on purpose, because they sit on _different_ capacity pools (our own NVIDIA key vs OpenRouter's $0 pool), so one pool's outage cannot take both. The vision model sits mid-chain, and the
|
|
80
|
+
The order is not arbitrary. The head is whatever the gateway itself redirects the previous head to, so the proxy and the gateway never name different models. After it come the two sub-second coders — adjacent on purpose, because they sit on _different_ capacity pools (our own NVIDIA key vs OpenRouter's $0 pool), so one pool's outage cannot take both. The vision model sits mid-chain, and the largest, slowest rung goes last. The tier stopped being NVIDIA-only on 2026-08-30: two of the eight come from Cohere and Poolside. The fastest rung, `nemotron-3-nano-30b`, left on 2026-09-08 when NVIDIA deprovisioned it for blockrun's account; its aliases (`nano-30b`, `nemotron-nano`) now follow the gateway's redirect to `nemotron-3-nano-omni`.
|
|
81
81
|
|
|
82
|
-
Pin any of them directly with `/model lightning`, `/model laguna`, `/model north-mini`, `/model nemotron-omni`, `/model ultra-550b` or `/model llama-vision
|
|
82
|
+
Pin any of them directly with `/model lightning`, `/model laguna`, `/model north-mini`, `/model nemotron-omni`, `/model ultra-550b`, `/model bolt`, `/model super-120b` or `/model muse`. `free/llama-3.2-11b-vision` was retired on 2026-11-02; its pins still route, and are answered by a live free model.
|
|
83
83
|
|
|
84
|
-
**
|
|
84
|
+
**Only `free/nemotron-3.5-bolt` carries the `vision` flag.** A 64×64 solid-colour probe on 2026-11-05 got 8 of 8 right across Base and Solana, and each response's `model` field named Bolt itself. The other catalogued models don't clear that bar: `nemotron-3-nano-omni` was right 1 time in 4 on Base on 2026-08-31 and said "white" for red on Solana, and on 2026-11-05 only 2 of 8 probes of `nemotron-3-super-120b` were answered by that model, with the rest rescued or refused for capacity. A wrong answer is an HTTP 200, so the caller has nothing to branch on. Since `vision` is what `filterByVision()` uses to _aim_ image turns at a model, flagging them would route real traffic into that. Requests carrying an `image_url` go to a paid vision model.
|
|
85
85
|
|
|
86
86
|
---
|
|
87
87
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockrun/clawrouter",
|
|
3
|
-
"version": "0.12.
|
|
4
|
-
"description": "Smart LLM router — save 84% on inference costs.
|
|
3
|
+
"version": "0.12.309",
|
|
4
|
+
"description": "Smart LLM router — save 84% on inference costs. 91 models (8 free). Pay by credit card (API key) or USDC (x402 wallet).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
package/scripts/reinstall.sh
CHANGED
|
@@ -990,9 +990,9 @@ echo "Free models (no wallet needed):"
|
|
|
990
990
|
echo " /model lightning → nemotron-3.5-lightning (1M ctx, reasoning)"
|
|
991
991
|
echo " /model north-mini → north-mini-code (Cohere, coding, sub-second)"
|
|
992
992
|
echo " /model laguna → laguna-xs-2.1 (Poolside, coding, ~161 tok/s)"
|
|
993
|
-
echo " /model vision-free → nemotron-3-
|
|
993
|
+
echo " /model vision-free → nemotron-3.5-bolt (fast, reads images)"
|
|
994
994
|
echo " /model ultra-550b → nemotron-3-ultra-550b (550B MoE, 1M ctx)"
|
|
995
|
-
echo " /model
|
|
995
|
+
echo " /model super-120b → nemotron-3-super-120b (reasoning)"
|
|
996
996
|
echo ""
|
|
997
997
|
echo "OpenClaw slash commands:"
|
|
998
998
|
echo " /wallet → wallet balance, address, chain"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: clawrouter
|
|
3
|
-
description: Hosted-gateway LLM router — save 84% on inference costs. A local proxy that forwards each request to the blockrun.ai gateway, which routes to the cheapest capable model across
|
|
3
|
+
description: Hosted-gateway LLM router — save 84% on inference costs. A local proxy that forwards each request to the blockrun.ai gateway, which routes to the cheapest capable model across 91 models from OpenAI, Anthropic, Google, DeepSeek, xAI, Z.AI, and more. Free open-weight models included. Also exposes realtime market data (global stocks, crypto, FX, commodities), Twitter/X intelligence, prediction-market data across Polymarket, Kalshi, Limitless, Opinion, Predict.Fun, dFlow + UMA oracle resolution + wallet identity & clustering, phone-number intelligence (carrier + SIM-swap fraud detection) plus AI-powered outbound voice calls (Twilio + Bland.ai) as built-in agent tools. Not a local-inference tool — prompts are sent to the blockrun.ai gateway.
|
|
4
4
|
triggers:
|
|
5
5
|
- "clawrouter"
|
|
6
6
|
- "claw router"
|
|
@@ -46,7 +46,7 @@ metadata:
|
|
|
46
46
|
|
|
47
47
|
# ClawRouter
|
|
48
48
|
|
|
49
|
-
Hosted-gateway LLM router that saves <!-- br:savings.autoVsBaselinePct -->84<!-- /br:savings.autoVsBaselinePct -->% on inference costs by forwarding each request to the blockrun.ai gateway, which picks the cheapest model capable of handling it across <!-- br:models.chatVisible -->
|
|
49
|
+
Hosted-gateway LLM router that saves <!-- br:savings.autoVsBaselinePct -->84<!-- /br:savings.autoVsBaselinePct -->% on inference costs by forwarding each request to the blockrun.ai gateway, which picks the cheapest model capable of handling it across <!-- br:models.chatVisible -->91<!-- /br:models.chatVisible --> models from 9 providers (<!-- br:models.free -->8<!-- /br:models.free --> free open-weight models). All billing flows through one BlockRun credential — either a USDC wallet paying x402 per call, or a BlockRun API key drawing on card-funded account credit. Either way you do not hold provider API keys.
|
|
50
50
|
|
|
51
51
|
**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.
|
|
52
52
|
|
|
@@ -140,7 +140,7 @@ it against a baseline nobody wrote down. See
|
|
|
140
140
|
|
|
141
141
|
## Available Models
|
|
142
142
|
|
|
143
|
-
<!-- br:models.chatVisible -->
|
|
143
|
+
<!-- br:models.chatVisible -->91<!-- /br:models.chatVisible --> models including: gpt-6-astra [GPT-6 flagship, 1M ctx], gpt-6-sol, gpt-6.1-sol [refreshed Sol], gpt-6-luna [fast], gpt-5.6-terra [balanced, stable default], gpt-5.6-sol [flagship], gpt-5.6-luna [cost-efficient], gpt-5.6-sol/terra/luna-pro [pro reasoning tiers], gpt-5.5, gpt-5.5-pro [max compute], chat-latest [ChatGPT Instant], gpt-5.4, gpt-5.1, gpt-4o, o3, claude-fable-5.1, claude-fable-5, claude-opus-5.5 [newest Opus], claude-opus-5 [1M ctx], claude-opus-4.8, claude-opus-4.7, claude-opus-4.5, claude-sonnet-5.5, claude-sonnet-5, claude-sonnet-4.6, gemini-3.1-pro, gemini-3.6-flash, gemini-3.5-flash-lite, gemini-2.5-flash, deepseek-v4-pro, deepseek-chat, grok-4.7, grok-4.6, grok-4.5, grok-4.3, grok-build-0.1, glm-5.3 [Z.AI flagship, 1M ctx], glm-5.3-flash [natively multimodal, 1M ctx], glm-5.2, minimax-m3, kimi-k3 [1M ctx flagship], kimi-k2.7, qwen3.8-max [Qwen 3.8 flagship, 1M ctx], qwen3.7-max, qwen3.7-plus, qwen3.7-flash, mimo [Xiaomi MiMo-V2.5 Pro, 1M ctx], mistral-large-4 [Mistral flagship, 512K ctx, vision], hy4-preview [Tencent, 770B MoE], laguna-s-2.1 [Poolside, coding], and <!-- br:models.free -->8<!-- /br:models.free --> free open-weight models (nemotron-3.5-lightning [1M ctx, thinking mode — the free default], nemotron-3-ultra-550b [550B/55B MoE, 1M ctx — the largest free model], nemotron-3.5-bolt [about a second to answer, reads images], nemotron-3-super-120b [reasoning], nemotron-3-nano-omni-30b-a3b-reasoning [256K ctx], north-mini-code [Cohere, coding, sub-second], laguna-xs-2.1 [Poolside, coding, ~161 tok/s], muse-glimmer-30b [Meta Muse, reasoning]). Only Bolt is flagged for vision: pin it with `/model vision-free`. Otherwise image turns route to a paid vision model, because the other free models the catalogs advertise as vision-capable don't pass a solid-colour probe on both chains.
|
|
144
144
|
|
|
145
145
|
## Model Prices — Look Them Up Live
|
|
146
146
|
|
|
@@ -189,11 +189,11 @@ Realtime prices and historical OHLC across every asset class. The agent should c
|
|
|
189
189
|
|
|
190
190
|
### Image & Video Generation
|
|
191
191
|
|
|
192
|
-
| Tool | Purpose
|
|
193
|
-
| --------------------------- |
|
|
194
|
-
| `blockrun_image_generation` | 12 image models — GPT Image 1/2/2.5 (Flare, Sunburst), Nano Banana / 2 / Pro, Seedream 5 Pro, Grok Imagine / 2.0 / Pro, CogView-4
|
|
195
|
-
| `blockrun_image_edit` | Edit / inpaint existing image (GPT Image 1/2, 2.5 Sunburst, Nano Banana; `model` param)
|
|
196
|
-
| `blockrun_video_generation` | Grok Imagine + ByteDance Seedance (1.5-pro
|
|
192
|
+
| Tool | Purpose | Price |
|
|
193
|
+
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
|
|
194
|
+
| `blockrun_image_generation` | 12 image models — GPT Image 1/2/2.5 (Flare, Sunburst), Nano Banana / 2 / Pro, Seedream 5 Pro, Grok Imagine / 2.0 / Pro, CogView-4 | per model — see [Model Prices](#model-prices--look-them-up-live) |
|
|
195
|
+
| `blockrun_image_edit` | Edit / inpaint existing image (GPT Image 1/2, 2.5 Sunburst, Nano Banana; `model` param) | per model — see [Model Prices](#model-prices--look-them-up-live) |
|
|
196
|
+
| `blockrun_video_generation` | Grok Imagine (`xai/grok-imagine-video`, `-1.5`, up to 15s) + ByteDance Seedance (1.5-pro up to 12s; 2.0-fast / 2.0-mini / 2.0 up to 15s; 2.5 up to 30s) at 720p with synced audio (t2v default). Seedance is token-priced upstream (~20,256 tokens/sec at the 720p+audio default — 2× the prior 480p rate); `image_url` (image-to-video) costs the same as t2v since 2026-06-01. Seedance 2.0 variants accept optional `real_face_asset_id` (`ta_…`) for BytePlus RealFace character-consistency — mutually exclusive with `image_url`. | per model — see [Model Prices](#model-prices--look-them-up-live) |
|
|
197
197
|
|
|
198
198
|
### Phone & Voice (Twilio + Bland.ai)
|
|
199
199
|
|
package/src/top-models.json
CHANGED