@blockrun/clawrouter 0.12.250 → 0.12.252

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.
@@ -96,7 +96,7 @@ if (inflight) {
96
96
  // Extract user's last message
97
97
  const prompt = messages.findLast((m) => m.role === "user")?.content;
98
98
 
99
- // Router Core V3.4 (@blockrun/router-core): 15-dimension scorer → hard
99
+ // Router Core V3.5 (@blockrun/router-core): 15-dimension scorer → hard
100
100
  // capability filters → portfolio ranking. Model capabilities come from the
101
101
  // live catalog, injected at proxy startup.
102
102
  const decision = route(prompt, systemPrompt, maxTokens, {
@@ -247,7 +247,7 @@ data: [DONE]
247
247
 
248
248
  ## Routing Engine
249
249
 
250
- The routing engine lives in [`@blockrun/router-core`](https://github.com/BlockRunAI/router-core) (Router Core V3.4), a product-neutral package shared by ClawRouter, Franklin, the `@blockrun/llm` SDKs and ClawRouter-Hermes. `src/router/index.ts` is a single `export * from "@blockrun/router-core"`; the package is a `devDependency` inlined by tsup at build time and pinned to an immutable commit SHA. Nothing in the decision path touches the network.
250
+ The routing engine lives in [`@blockrun/router-core`](https://github.com/BlockRunAI/router-core) (Router Core V3.5), a product-neutral package shared by ClawRouter, Franklin, the `@blockrun/llm` SDKs and ClawRouter-Hermes. `src/router/index.ts` is a single `export * from "@blockrun/router-core"`; the package is a `devDependency` inlined by tsup at build time and pinned to an immutable commit SHA. Nothing in the decision path touches the network.
251
251
 
252
252
  ### 1. Classify — 15-dimension weighted scorer
253
253
 
@@ -554,7 +554,7 @@ src/
554
554
  ├── retry.ts # Fetch retry with exponential backoff
555
555
  ├── version.ts # Version from package.json
556
556
  └── router/
557
- ├── index.ts # export * from "@blockrun/router-core" (Router Core V3.4)
557
+ ├── index.ts # export * from "@blockrun/router-core" (Router Core V3.5)
558
558
  ├── free-model-liveness.test.ts # build-time guard: no chain names a dead free model
559
559
  └── brand-numbers.test.ts # README/SKILL brand markers stay in sync
560
560
  ```
@@ -438,12 +438,12 @@ plugins:
438
438
 
439
439
  Curated primaries from router-core's `DEFAULT_ROUTING_CONFIG.tiers`; chains truncated. The full chains for every profile — and the eco / premium / agentic tier sets — are in [routing-profiles.md](./routing-profiles.md).
440
440
 
441
- | Tier | Primary Model | Fallback Chain (head) |
442
- | --------- | ----------------------------- | ------------------------------------------------------------ |
443
- | SIMPLE | `google/gemini-2.5-flash` | `google/gemini-3-flash-preview`, `deepseek/deepseek-chat`, … |
444
- | MEDIUM | `moonshot/kimi-k2.7` | `moonshot/kimi-k2.6`, `moonshot/kimi-k2.5`, … |
445
- | COMPLEX | `google/gemini-3.1-pro` | `google/gemini-3-flash-preview`, `xai/grok-4-0709`, … |
446
- | REASONING | `xai/grok-4-1-fast-reasoning` | `xai/grok-4-fast-reasoning`, `deepseek/deepseek-reasoner`, … |
441
+ | Tier | Primary Model | Fallback Chain (head) |
442
+ | --------- | ---------------------------- | ------------------------------------------------------------------ |
443
+ | SIMPLE | `google/gemini-2.5-flash` | `google/gemini-3-flash-preview`, `google/gemini-3.5-flash-lite`, … |
444
+ | MEDIUM | `google/gemini-3.5-flash` | `google/gemini-3.6-flash`, `zai/glm-5.3-flash`, … |
445
+ | COMPLEX | `google/gemini-3.1-pro` | `google/gemini-3.6-flash`, `google/gemini-3.5-flash`, … |
446
+ | REASONING | `deepseek/deepseek-reasoner` | `deepseek/deepseek-v4-pro`, `xai/grok-4.3`, … |
447
447
 
448
448
  ### Fallback Chain
449
449
 
@@ -19,12 +19,12 @@ The tables show each tier's **curated primary** and its fallback chain as config
19
19
 
20
20
  Use `blockrun/auto` (or `/model auto`) for the best quality/price balance.
21
21
 
22
- | Tier | Primary Model | Input | Output | Fallback chain (in order) |
23
- | --------- | --------------------------- | ----- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
24
- | SIMPLE | google/gemini-2.5-flash | $0.30 | $2.50 | gemini-3-flash-preview → deepseek-chat → kimi-k2.5 → gemini-3.1-flash-lite → gemini-2.5-flash-lite → gpt-5.4-nano → grok-4-fast-non-reasoning → step-3.7-flash (free) |
25
- | MEDIUM | moonshot/kimi-k2.7 | $0.95 | $4.00 | kimi-k2.6 → kimi-k2.5 → gemini-3-flash-preview → deepseek-chat → gemini-2.5-flash → gemini-3.1-flash-lite → gemini-2.5-flash-lite → grok-4-1-fast-non-reasoning → grok-3-mini |
26
- | COMPLEX | google/gemini-3.1-pro | $2.00 | $12.00 | gemini-3-flash-preview → grok-4-0709 → gemini-2.5-pro → claude-sonnet-5 → claude-sonnet-4.6 → deepseek-chat → gemini-2.5-flash → gpt-5.6-terra → gpt-5.5 → gpt-5.4 |
27
- | REASONING | xai/grok-4-1-fast-reasoning | $0.20 | $0.50 | grok-4-fast-reasoning → deepseek-reasoner → deepseek-v4-pro → o4-mini → o3 |
22
+ | Tier | Primary Model | Input | Output | Fallback chain (in order) |
23
+ | --------- | -------------------------- | ----- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
24
+ | SIMPLE | google/gemini-2.5-flash | $0.30 | $2.50 | gemini-3-flash-preview → gemini-3.5-flash-lite → deepseek-chat → gemini-3.1-flash-lite → gpt-5.6-luna → gpt-5.4-nano → gemini-2.5-flash-lite → step-3.7-flash (free) |
25
+ | MEDIUM | google/gemini-3.5-flash | $1.50 | $9.00 | gemini-3.6-flash → glm-5.3-flash → gpt-5.6-terra → gemini-3-flash-preview → deepseek-chat → gemini-2.5-flash → minimax-m3 → gemini-3.1-flash-lite → gpt-5.6-luna → gemini-2.5-flash-lite |
26
+ | COMPLEX | google/gemini-3.1-pro | $2.00 | $12.00 | gemini-3.6-flash → gemini-3.5-flash → claude-sonnet-5 → grok-4.5 → gemini-2.5-pro → claude-sonnet-4.6 → gpt-5.6-terra → gpt-5.5 → gpt-5.4 → glm-5.3 → kimi-k3 → deepseek-v4-pro → deepseek-chat → gemini-2.5-flash |
27
+ | REASONING | deepseek/deepseek-reasoner | $0.14 | $0.28 | deepseek-v4-pro → grok-4.3 → qwen3.7-plus → gemini-3.5-flash → o4-mini → o3 |
28
28
 
29
29
  ---
30
30
 
@@ -32,12 +32,12 @@ Use `blockrun/auto` (or `/model auto`) for the best quality/price balance.
32
32
 
33
33
  Use `blockrun/eco` for maximum cost savings. The first stop is the free tier, so simple requests can cost $0.00.
34
34
 
35
- | Tier | Primary Model | Input | Output | Fallback chain (in order) |
36
- | --------- | ---------------------------- | ----- | ------ | --------------------------------------------------------------------------------------------------------------------- |
37
- | SIMPLE | free/step-3.7-flash | $0.00 | $0.00 | nemotron-nano-9b-v2 (free) → gemini-3.1-flash-lite → gpt-5.4-nano → gemini-2.5-flash-lite → grok-4-fast-non-reasoning |
38
- | MEDIUM | google/gemini-3.1-flash-lite | $0.25 | $1.50 | gpt-5.4-nano → gemini-2.5-flash-lite → grok-4-fast-non-reasoning → gemini-2.5-flash |
39
- | COMPLEX | google/gemini-3.1-flash-lite | $0.25 | $1.50 | gemini-2.5-flash-lite → grok-4-0709 → gemini-2.5-flash → deepseek-chat |
40
- | REASONING | xai/grok-4-1-fast-reasoning | $0.20 | $0.50 | grok-4-fast-reasoning → deepseek-reasoner → deepseek-v4-pro |
35
+ | Tier | Primary Model | Input | Output | Fallback chain (in order) |
36
+ | --------- | -------------------------- | ----- | ------ | ------------------------------------------------------------------------------------------------------------------------ |
37
+ | SIMPLE | free/step-3.7-flash | $0.00 | $0.00 | nemotron-nano-9b-v2 (free) → gemini-2.5-flash-lite → glm-5.3-flash → gpt-5.6-luna → gpt-5.4-nano → gemini-3.1-flash-lite |
38
+ | MEDIUM | zai/glm-5.3-flash | $0.15 | $0.50 | deepseek-chat → gemini-3.1-flash-lite → gpt-5.6-luna → gpt-5.4-nano → gemini-2.5-flash-lite → gemini-2.5-flash |
39
+ | COMPLEX | zai/glm-5.3-flash | $0.15 | $0.50 | deepseek-chat → minimax-m3 → deepseek-v4-pro → gemini-3.1-flash-lite → gemini-2.5-flash |
40
+ | REASONING | deepseek/deepseek-reasoner | $0.14 | $0.28 | deepseek-v4-pro → qwen3.7-plus → minimax-m3 → glm-5.3-flash |
41
41
 
42
42
  The two free rungs at the head of ECO SIMPLE follow NVIDIA's free hosting, which retires models without notice (deepseek-v4-flash 410'd 2026-08-12, seed-oss-36b 2026-08-03, gpt-oss-120b hung 2026-08-16). Each retirement retargets the free rungs to the current free tier; the paid rungs never move. `src/router/free-model-liveness.test.ts` fails the build if a chain names a free model the picker no longer lists.
43
43
 
@@ -45,16 +45,16 @@ The two free rungs at the head of ECO SIMPLE follow NVIDIA's free hosting, which
45
45
 
46
46
  ## PREMIUM (Best Quality)
47
47
 
48
- Use `blockrun/premium` for maximum quality. Codex for complex coding, Kimi for simple coding, Sonnet for reasoning/instructions, Fable/Opus for architecture, audits and PM-grade work.
48
+ Use `blockrun/premium` for maximum quality. Codex for complex coding, Gemini 3.5 Flash for simple work, Sonnet 5 for reasoning/instructions, Fable/Opus for architecture, audits and PM-grade work.
49
49
 
50
- | Tier | Primary Model | Input | Output | Fallback chain (in order) |
51
- | --------- | --------------------------- | ------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
52
- | SIMPLE | moonshot/kimi-k2.7 | $0.95 | $4.00 | kimi-k2.6 → kimi-k2.5 → gemini-2.5-flash → claude-haiku-4.5 → gemini-2.5-flash-lite → deepseek-chat |
53
- | MEDIUM | openai/gpt-5.3-codex | $1.75 | $14.00 | kimi-k2.7 → kimi-k2.6 → kimi-k2.5 → gemini-2.5-flash → gemini-2.5-pro → grok-4-0709 → claude-sonnet-5 → claude-sonnet-4.6 |
54
- | COMPLEX | anthropic/claude-fable-5 | $10.00 | $50.00 | claude-opus-5 → claude-opus-4.8 → claude-opus-4.7 → claude-opus-4.6 → claude-sonnet-5 → claude-sonnet-4.6 → grok-4.5 → grok-4-0709 → kimi-k2.7 → kimi-k2.6 → kimi-k2.5 → gpt-5.6-terra → gpt-5.5 → gpt-5.4 → gpt-5.3-codex → deepseek-chat → step-3.7-flash (free) |
55
- | REASONING | anthropic/claude-sonnet-4.6 | $3.00 | $15.00 | claude-sonnet-5 → claude-opus-5 → claude-opus-4.8 → claude-opus-4.7 → claude-opus-4.6 → grok-4-1-fast-reasoning → o4-mini → o3 |
50
+ | Tier | Primary Model | Input | Output | Fallback chain (in order) |
51
+ | --------- | ------------------------- | ------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
52
+ | SIMPLE | google/gemini-3.5-flash | $1.50 | $9.00 | gemini-3.6-flash → claude-haiku-4.5 → glm-5.3 → gemini-2.5-flash → gemini-3.5-flash-lite → deepseek-chat |
53
+ | MEDIUM | openai/gpt-5.3-codex | $1.75 | $14.00 | claude-sonnet-5 → kimi-k3 → glm-5.3 → gemini-3.6-flash → gemini-3.5-flash → gemini-2.5-pro → grok-4.5 → claude-sonnet-4.6 → gpt-5.6-terra |
54
+ | COMPLEX | anthropic/claude-fable-5 | $10.00 | $50.00 | claude-opus-5 → claude-opus-4.8 → claude-opus-4.7 → claude-sonnet-5 → claude-sonnet-4.6 → grok-4.5 → kimi-k3 → gpt-5.6-terra → gpt-5.5 → gpt-5.4 → gpt-5.3-codex → glm-5.3 → deepseek-v4-pro → deepseek-chat → step-3.7-flash (free) |
55
+ | REASONING | anthropic/claude-sonnet-5 | $3.00 | $15.00 | claude-sonnet-4.6 → claude-opus-5 → claude-opus-4.8 → claude-opus-4.7 → grok-4.5 → deepseek-v4-pro → grok-4.3 → o4-mini → o3 |
56
56
 
57
- The premium COMPLEX chain is deliberately de-Gemini'd: Google's "high demand" 503s correlate with Anthropic outages (everyone falls back to Google at the same time), so the chain prefers the in-family Opus hot swaps, then xAI, Moonshot and OpenAI — providers on independent infrastructure.
57
+ The premium COMPLEX chain is deliberately de-Gemini'd: Google's "high demand" 503s correlate with Anthropic outages (everyone falls back to Google at the same time), so the chain prefers the in-family Opus hot swaps, then xAI, Moonshot, OpenAI and Z.AI — providers on independent infrastructure.
58
58
 
59
59
  ---
60
60
 
@@ -62,12 +62,12 @@ The premium COMPLEX chain is deliberately de-Gemini'd: Google's "high demand" 50
62
62
 
63
63
  Not a profile you pick — router-core switches to these tiers when the turn actually needs its attached tools (`inferToolRequirement`: `tool_choice: "none"` is authoritative, and host tool _descriptions_ alone do not trigger it). Primaries favour models that keep going instead of stopping to ask.
64
64
 
65
- | Tier | Primary Model | Input | Output | Fallback chain (in order) |
66
- | --------- | --------------------------- | ----- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
67
- | SIMPLE | openai/gpt-4o-mini | $0.15 | $0.60 | kimi-k2.5 → claude-haiku-4.5 → grok-4-1-fast-non-reasoning |
68
- | MEDIUM | moonshot/kimi-k2.7 | $0.95 | $4.00 | kimi-k2.6 → kimi-k2.5 → grok-4-1-fast-non-reasoning → gpt-4o-mini → claude-haiku-4.5 → deepseek-chat |
69
- | COMPLEX | anthropic/claude-sonnet-4.6 | $3.00 | $15.00 | claude-sonnet-5 → claude-opus-5 → claude-opus-4.8 → claude-opus-4.7 → claude-opus-4.6 → grok-4-0709 → kimi-k2.7 → kimi-k2.5 → gpt-5.6-terra → gpt-5.5 → gpt-5.4 → deepseek-chat → step-3.7-flash (free) |
70
- | REASONING | anthropic/claude-sonnet-4.6 | $3.00 | $15.00 | claude-sonnet-5 → claude-opus-5 → claude-opus-4.8 → claude-opus-4.7 → claude-opus-4.6 → grok-4-1-fast-reasoning → deepseek-reasoner |
65
+ | Tier | Primary Model | Input | Output | Fallback chain (in order) |
66
+ | --------- | ------------------------- | ----- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
67
+ | SIMPLE | openai/gpt-4o-mini | $0.15 | $0.60 | gpt-5.6-luna → glm-5.3-flash → claude-haiku-4.5 → gemini-2.5-flash |
68
+ | MEDIUM | openai/gpt-5-mini | $0.25 | $2.00 | gemini-3.5-flash → glm-5.3-flash → gpt-5.6-terra → gpt-4o-mini → claude-haiku-4.5 → deepseek-chat → kimi-k3 |
69
+ | COMPLEX | anthropic/claude-sonnet-5 | $3.00 | $15.00 | claude-sonnet-4.6 → claude-opus-5 → claude-opus-4.8 → claude-opus-4.7 → grok-4.5 → kimi-k3 → gpt-5.6-terra → gpt-5.5 → gpt-5.4 → gpt-5.3-codex → glm-5.3 → deepseek-v4-pro → deepseek-chat → step-3.7-flash (free) |
70
+ | REASONING | anthropic/claude-sonnet-5 | $3.00 | $15.00 | claude-sonnet-4.6 → claude-opus-5 → claude-opus-4.8 → claude-opus-4.7 → grok-4.5 → deepseek-v4-pro → deepseek-reasoner |
71
71
 
72
72
  Set `routing.overrides.agenticMode: false` to disable the agentic tier set, or `true` to force it.
73
73
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockrun/clawrouter",
3
- "version": "0.12.250",
3
+ "version": "0.12.252",
4
4
  "description": "Smart LLM router — save 88% on inference costs. 71 models (5 free), one wallet, x402 micropayments.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -111,7 +111,7 @@
111
111
  }
112
112
  },
113
113
  "devDependencies": {
114
- "@blockrun/router-core": "https://codeload.github.com/BlockRunAI/router-core/tar.gz/d7bc10ce184b3daa40bcc115b523fd629d847a52",
114
+ "@blockrun/router-core": "https://codeload.github.com/BlockRunAI/router-core/tar.gz/5d911879d7f1eddf93d513b08798998320272cc8",
115
115
  "@eslint/js": "^10.0.1",
116
116
  "eslint": "^10.2.0",
117
117
  "openclaw": "^2026.7.2-beta.7",