@alexeiled/claude-router 1.3.0 → 1.3.1
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/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +7 -0
- package/README.md +1 -1
- package/docs/architecture.md +2 -2
- package/docs/configuration.md +3 -3
- package/docs/native-router.md +1 -1
- package/docs/router-pane-now.svg +1 -1
- package/docs/router-pane-routing.svg +4 -4
- package/docs/user-guide.md +1 -1
- package/lib/config.mjs +10 -8
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "router",
|
|
3
3
|
"displayName": "Router",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.1",
|
|
5
5
|
"description": "Model and effort routing for the main conversation, advised by a prompt classifier (Jev, Clef or Clef Flash). Preserves subagent model choices.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Alexei Ledenev",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.3.1 (2026-10-08)
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- `micro` is now Haiku 5.5 at `low` effort (was Haiku 4.5 with no effort setting). The `haiku` alias is `claude-haiku-5-5` with a 1,000,000-token window, all five effort levels, and list prices of 0.1 / 0.5 / 0.01 USD per million tokens. Those prices hold for prompts up to 100,000 tokens and are higher above, so estimates run low there.
|
|
8
|
+
- To keep Haiku 4.5, set `models.haiku` to `claude-haiku-4-5` with `"efforts": []`, a 200,000-token window, and 1 / 5 / 0.1 prices, and set `routes.micro.effort` to `null`.
|
|
9
|
+
|
|
3
10
|
## 1.3.0 (2026-10-06)
|
|
4
11
|
|
|
5
12
|
### Changed
|
package/README.md
CHANGED
|
@@ -40,7 +40,7 @@ The active classifier labels a new logical turn once. Tool continuations keep th
|
|
|
40
40
|
|
|
41
41
|
| Tier | Default model | Effort |
|
|
42
42
|
| -------- | ------------- | ------------------------ |
|
|
43
|
-
| `micro` | Haiku
|
|
43
|
+
| `micro` | Haiku 5.5 | `low` |
|
|
44
44
|
| `low` | Sonnet 5.5 | Keeps the session effort |
|
|
45
45
|
| `medium` | Opus 5.5 | `medium` |
|
|
46
46
|
| `high` | Opus 5.5 | `xhigh` |
|
package/docs/architecture.md
CHANGED
|
@@ -34,7 +34,7 @@ The active classifier receives only the current prompt and up to six recent user
|
|
|
34
34
|
|
|
35
35
|
All classifiers share one wire contract: the same `state` and typed `questions` request, and the same `answers.route` choice with per-tier probabilities. Cloudflare's REST API wraps the answer in `{ result, success, errors }`, which the parser unwraps.
|
|
36
36
|
|
|
37
|
-
Claude Code builds each request for the model the Mod selects, so no request rewriting is needed: Haiku
|
|
37
|
+
Claude Code builds each request for the model the Mod selects, so no request rewriting is needed: Haiku 4.5 got its own thinking mode and a 32K output cap. On Claude Code 2.1.289, a billed chain of pinned turns (Opus, Haiku 4.5, Sonnet at `xhigh`, Sonnet, Haiku 4.5) used a tool on every turn over the previous models' history, and no request was rejected. Sonnet and Opus accepted histories above 589K input tokens. These checks cover tested requests. They do not prove every Claude Code feature combination.
|
|
38
38
|
|
|
39
39
|
## Responsibilities
|
|
40
40
|
|
|
@@ -78,7 +78,7 @@ In a 20-process loopback test, timeout fallback had 1,504 ms p95 and 1,505 ms wo
|
|
|
78
78
|
|
|
79
79
|
## Cache and cost
|
|
80
80
|
|
|
81
|
-
Cache identity uses the exact response model ID and effective effort. The
|
|
81
|
+
Cache identity uses the exact response model ID and effective effort. The Haiku 4.5 dated snapshot has an explicit mapping; Haiku 5.5 has no dated ID. An unrecognized substituted model gets no cache credit for the requested route.
|
|
82
82
|
|
|
83
83
|
The cached prefix is observed `cache_read + cache_creation`. Output tokens count only toward the next context size. Freshness uses the configured five-minute lifetime with its safety margin. Claude's usage counters do not prove one-hour cache lifetime.
|
|
84
84
|
|
package/docs/configuration.md
CHANGED
|
@@ -32,7 +32,7 @@ The default baseline is tier `low`. Each route refers to an alias in `models`.
|
|
|
32
32
|
|
|
33
33
|
| Tier | Model alias | Model ID | Effort |
|
|
34
34
|
| -------- | ----------- | ------------------- | ------------------------------------ |
|
|
35
|
-
| `micro` | `haiku` | `claude-haiku-
|
|
35
|
+
| `micro` | `haiku` | `claude-haiku-5-5` | `low` |
|
|
36
36
|
| `low` | `sonnet` | `claude-sonnet-5-5` | Keeps the effort sent by Claude Code |
|
|
37
37
|
| `medium` | `opus` | `claude-opus-5-5` | `medium` |
|
|
38
38
|
| `high` | `opus` | `claude-opus-5-5` | `xhigh` |
|
|
@@ -43,9 +43,9 @@ Default model settings:
|
|
|
43
43
|
| -------- | --------------------------------------------------- | -------------- | ------- | --------------------------------------- |
|
|
44
44
|
| `opus` | 4 / 20 / 0.2 | 1,000,000 | `plan` | `low`, `medium`, `high`, `xhigh`, `max` |
|
|
45
45
|
| `sonnet` | 2 / 10 / 0.2 | 1,000,000 | `plan` | `low`, `medium`, `high`, `xhigh`, `max` |
|
|
46
|
-
| `haiku` | 1 / 5 / 0.
|
|
46
|
+
| `haiku` | 0.1 / 0.5 / 0.01 | 1,000,000 | `plan` | `low`, `medium`, `high`, `xhigh`, `max` |
|
|
47
47
|
|
|
48
|
-
Prices are configured list-price inputs for estimates. They are not a subscription bill or a claim of savings. Haiku receives no effort field. A route without an effort keeps the session effort, clamped to what the model supports. To make a tier whose default names an effort keep the session effort instead, set `"effort": null`, for example `"routes": { "high": { "model": "opus", "effort": null } }`.
|
|
48
|
+
Prices are configured list-price inputs for estimates. They are not a subscription bill or a claim of savings. Haiku 5.5 prices are for prompts up to 100,000 tokens; above that Anthropic charges more, so estimates run low there. A model with `"efforts": []` receives no effort field. A route without an effort keeps the session effort, clamped to what the model supports. To make a tier whose default names an effort keep the session effort instead, set `"effort": null`, for example `"routes": { "high": { "model": "opus", "effort": null } }`.
|
|
49
49
|
|
|
50
50
|
## Classifiers
|
|
51
51
|
|
package/docs/native-router.md
CHANGED
|
@@ -80,6 +80,6 @@ On 2026-10-05, live probes of Clef and Clef Flash on Workers AI took 0.7 to 1.3
|
|
|
80
80
|
|
|
81
81
|
Recorded acceptance checks cover the local HTTP deadline and one-request admission, session clear/resume, circuit-breaker pause, reload, replacement, unload, engine fallback, and interrupt during Jev advice. The interrupt check closed the loopback socket within 4 ms and discarded late advice without changing the active route or UI. Results are stored under [`experiments/mod-router/results`](../experiments/mod-router/results/).
|
|
82
82
|
|
|
83
|
-
A billed chain of pinned turns moved across Opus, Haiku, and Sonnet with a tool call on every turn, and no request was rejected. Claude Code builds each model's request itself; Haiku
|
|
83
|
+
A billed chain of pinned turns moved across Opus, Haiku 4.5, and Sonnet with a tool call on every turn, and no request was rejected. Claude Code builds each model's request itself; Haiku 4.5 received its own thinking mode and a 32K output cap. Haiku 5.5 was not probed. Sonnet and Opus accepted histories above 589K input tokens. These probes validate the tested path only. Claude Code and organization policy control other model and request combinations.
|
|
84
84
|
|
|
85
85
|
To stop routing in a session, run `/router off`. To stop loading the Mod, run `claude plugin disable router@alexei-led-claude-router` and restart.
|
package/docs/router-pane-now.svg
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
<text x="351.6" y="243" fill="#d0d0d0" xml:space="preserve"> 3% </text>
|
|
42
42
|
<text x="406.2" y="243" fill="#d0d0d0" xml:space="preserve">[ pin ]</text>
|
|
43
43
|
<text x="39.6" y="262" fill="#5fd7af" font-weight="700" xml:space="preserve">micro </text>
|
|
44
|
-
<text x="102.0" y="262" fill="#d0d0d0" xml:space="preserve">Haiku
|
|
44
|
+
<text x="102.0" y="262" fill="#d0d0d0" xml:space="preserve">Haiku 5.5 · low </text>
|
|
45
45
|
<text x="273.6" y="262" fill="#5fd7af" xml:space="preserve">░░░░░░░░░░</text>
|
|
46
46
|
<text x="351.6" y="262" fill="#d0d0d0" xml:space="preserve"> 2% </text>
|
|
47
47
|
<text x="406.2" y="262" fill="#d0d0d0" xml:space="preserve">[ pin ]</text>
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
<text x="304.8" y="186" fill="#d0d0d0" xml:space="preserve">2 · 10</text>
|
|
38
38
|
<text x="414.0" y="186" fill="#d0d0d0" xml:space="preserve">1M</text>
|
|
39
39
|
<text x="24.0" y="205" fill="#5fd7af" font-weight="700" xml:space="preserve">micro</text>
|
|
40
|
-
<text x="86.4" y="205" fill="#d0d0d0" xml:space="preserve">Haiku
|
|
41
|
-
<text x="195.6" y="205" fill="#
|
|
42
|
-
<text x="304.8" y="205" fill="#d0d0d0" xml:space="preserve">1 · 5</text>
|
|
43
|
-
<text x="414.0" y="205" fill="#d0d0d0" xml:space="preserve">
|
|
40
|
+
<text x="86.4" y="205" fill="#d0d0d0" xml:space="preserve">Haiku 5.5 ▾</text>
|
|
41
|
+
<text x="195.6" y="205" fill="#d0d0d0" xml:space="preserve">low ▾</text>
|
|
42
|
+
<text x="304.8" y="205" fill="#d0d0d0" xml:space="preserve">0.1 · 0.5</text>
|
|
43
|
+
<text x="414.0" y="205" fill="#d0d0d0" xml:space="preserve">1M</text>
|
|
44
44
|
<text x="24.0" y="224" fill="#d0d0d0" xml:space="preserve">Baseline tier: low ▾</text>
|
|
45
45
|
<text x="304.8" y="224" fill="#7c7c7c" xml:space="preserve">start here, fall back here</text>
|
|
46
46
|
<text x="24.0" y="262" fill="#5fafd7" font-weight="700" xml:space="preserve">SWITCH COST · from these routes</text>
|
package/docs/user-guide.md
CHANGED
|
@@ -118,7 +118,7 @@ A pin does not change the next turn after the pinned turn finishes. A fresh sess
|
|
|
118
118
|
|
|
119
119
|
## Edit routes and policy
|
|
120
120
|
|
|
121
|
-
On the **Routing** tab, pick a model and an effort for any tier. The model list comes from the aliases in `router.json` `models`, limited by the `availableModels` setting. `session` keeps the effort Claude Code sends. A model without effort levels, such as
|
|
121
|
+
On the **Routing** tab, pick a model and an effort for any tier. The model list comes from the aliases in `router.json` `models`, limited by the `availableModels` setting. `session` keeps the effort Claude Code sends. A model without effort levels, such as a custom one with `"efforts": []`, shows `none`.
|
|
122
122
|
|
|
123
123
|
Changed tiers show **●**. **Reset routes to defaults** (`r`) loads the built-in routes into the draft; **Save** then removes your route overrides from `router.json`.
|
|
124
124
|
|
package/lib/config.mjs
CHANGED
|
@@ -6,15 +6,17 @@ export const DEFAULTS = {
|
|
|
6
6
|
baselineTier: 'low',
|
|
7
7
|
// Sonnet 5.5 is the worker at `low`, at the effort the user picked. `medium` is Opus 5.5 at medium effort, a balance
|
|
8
8
|
// of speed and cost per task; `high` is Opus 5.5 at xhigh, the strongest setting this router asks for.
|
|
9
|
+
// `micro` is Haiku 5.5 at low effort: Claude Code owns the thinking field, so low effort is the least thinking the router can ask for.
|
|
9
10
|
// These are routing defaults, not a claim of equal model quality.
|
|
10
11
|
routes: {
|
|
11
12
|
high: { model: 'opus', effort: 'xhigh' },
|
|
12
13
|
medium: { model: 'opus', effort: 'medium' },
|
|
13
14
|
low: { model: 'sonnet' },
|
|
14
|
-
micro: { model: 'haiku' },
|
|
15
|
+
micro: { model: 'haiku', effort: 'low' },
|
|
15
16
|
},
|
|
16
17
|
// `id` selects the native model. List prices in USD per million tokens; `cacheRead` is absolute,
|
|
17
|
-
// not a multiplier (Opus 5.5 reads at 0.05x input, the rest at the standard 0.1x).
|
|
18
|
+
// not a multiplier (Opus 5.5 reads at 0.05x input, the rest at the standard 0.1x). Haiku 5.5 lists the rates for
|
|
19
|
+
// prompts up to 100k tokens; above that Anthropic charges 5x on input, output and cache read, so estimates run low there. A price change must also change
|
|
18
20
|
// test/fixtures/list-prices.json, with its source and date. `output` feeds the shadow estimate and the downgrade tax.
|
|
19
21
|
// `efforts` lists what the model accepts; an empty list means no effort field and no adaptive thinking. A change
|
|
20
22
|
// must also change test/fixtures/effort-support.json, from a new probe against the real API.
|
|
@@ -38,13 +40,13 @@ export const DEFAULTS = {
|
|
|
38
40
|
efforts: EFFORTS,
|
|
39
41
|
},
|
|
40
42
|
haiku: {
|
|
41
|
-
id: 'claude-haiku-
|
|
42
|
-
input: 1,
|
|
43
|
-
output: 5,
|
|
44
|
-
cacheRead: 0.
|
|
45
|
-
contextWindow:
|
|
43
|
+
id: 'claude-haiku-5-5',
|
|
44
|
+
input: 0.1,
|
|
45
|
+
output: 0.5,
|
|
46
|
+
cacheRead: 0.01,
|
|
47
|
+
contextWindow: 1_000_000,
|
|
46
48
|
billing: 'plan',
|
|
47
|
-
efforts:
|
|
49
|
+
efforts: EFFORTS,
|
|
48
50
|
},
|
|
49
51
|
},
|
|
50
52
|
cache: {
|
package/package.json
CHANGED