@alexeiled/claude-router 1.25.0 → 1.25.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "router",
3
3
  "displayName": "Router",
4
- "version": "1.25.0",
4
+ "version": "1.25.1",
5
5
  "description": "Native model and effort routing within your provider. Anthropic, DeepSeek, z.ai, MiniMax, MiMo and Kimi defaults, custom provider profiles, classifier advice and one model per subagent.",
6
6
  "author": {
7
7
  "name": "Alexei Ledenev",
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.25.1 (2026-11-18)
4
+
5
+ ### Summary
6
+
7
+ Documentation and developer-guide work, and one fewer CI workflow. Pictures of the band and pane, drawn from the real component tree, now sit in the README and the user guide; CONTRIBUTING.md, AGENTS.md and CLAUDE.md describe how to work on the router. Routing, costs and the pane's behaviour are unchanged, so this is a patch.
8
+
9
+ ### Added
10
+
11
+ - **API failover:** when a turn ends because the model is overloaded, rate limited, failing on the server or not found, the router holds that model out for a few minutes (an hour when not found) and runs the next turns on the nearest tier's route on another model, pinned turns too. A toast and the route line (`! held out`) say so; when the hold ends, routing returns to the held route. The `auto` routing engine holds no model.
12
+
13
+ ### Changed
14
+
15
+ - Terminal controls: from 72 columns the pane's Now blocks, the Policy controls and the active classifier sit in single-line boxes; the Now tab pins the next turn from one dropdown (pick a tier, or **No pin** to unpin) instead of a button per tier; and the band's Router reads `[ Router ]` when the band has room for it without dropping anything.
16
+ - Desktop, VS Code and mobile: the pane's five tabs are drawn as a segmented control, the same as the On | Off switch, with the same keys and 1-5 hotkeys.
17
+
18
+ ### Fixed
19
+
20
+ - The "Routing off" toast now also shows on a desktop, VS Code or mobile surface that attaches after the session started, once per surface. The once-a-day rule per cause is unchanged.
21
+ - A model chosen in the model picker, or set from the SDK, an IDE or Remote Control, now turns routing off as `/model` does, so the router no longer overrides it.
22
+ - After you switch models with `/model` or the picker, the Now tab names the model you chose instead of the last routed one.
23
+ - The pin row no longer reads like a model picker: the Now tab's pin row and the band's pin dropdown are named for pinning the next turn to a tier, show the model that runs now, and point to `/model` (with routing off) for models no tier routes to, such as Sonnet. Closes #91.
24
+
25
+ ### Removed
26
+
27
+ - The `ai-review` label and its GitHub workflow, which 1.25.0 added for maintainer-started AI reviews of pull requests. CI keeps its four checks.
28
+
29
+ ### Docs
30
+
31
+ - Pictures of the desktop, VS Code and mobile band and pane (every tab, the Set up card, dark and light) in the README and the user guide, drawn from the real component tree by `npm run docs:desktop-images`. They approximate the Claude app's layout and colours.
32
+
3
33
  ## 1.25.0 (2026-11-18)
4
34
 
5
35
  ### Summary
package/README.md CHANGED
@@ -52,9 +52,36 @@ Jev 1.14 is the default; a configured model override stays in force. [Configurat
52
52
 
53
53
  The band above the prompt shows the tier, activity, model, and reason for each turn. `/router` opens a pane to pin a tier, edit the model and effort of each tier, and tune the policy. See the [user guide](docs/user-guide.md#read-the-status-band).
54
54
 
55
- In the desktop app, VS Code and mobile, the band is one fixed row with nothing revealed on hover: a tier meter icon, the route, activity and reason on the left; the readings, a **Pin next turn** dropdown and **Router** on the right. The pane has a header, five tabs (Now, Routes, Policy, Classifier, Usage), one warnings slot and a save bar. Colours follow the app's theme. These surfaces cannot open the plugin settings dialog, so **Set up** shows a card with the command that saves the classifier's key from a terminal.
55
+ In the desktop app, VS Code and mobile, the band is one fixed row with nothing revealed on hover: a tier meter icon, the route, activity and reason on the left; the readings, a **Pin to a tier** dropdown and **Router** on the right. The pane has a header, five tabs (Now, Routes, Policy, Classifier, Usage), one warnings slot and a save bar. Colours follow the app's theme. These surfaces cannot open the plugin settings dialog, so **Set up** shows a card with the command that saves the classifier's key from a terminal.
56
+
57
+ <picture>
58
+ <source media="(prefers-color-scheme: dark)" srcset="docs/images/desktop-band-routed-dark.png">
59
+ <img src="docs/images/desktop-band-routed-light.png" alt="The desktop band in one row: a tier meter, Opus 5.5 xhigh, the code activity and the reason &quot;clearly stronger&quot; on the left; context and cache readings, the Pin to a tier dropdown and the Router button on the right." width="900">
60
+ </picture>
61
+
62
+ *Rendered from the real component tree with a browser's layout and approximate theme colours; not a screenshot of the Claude app.*
63
+
64
+ <table>
65
+ <tr>
66
+ <td width="50%">
67
+
68
+ <picture>
69
+ <source media="(prefers-color-scheme: dark)" srcset="docs/images/desktop-pane-now-dark.png">
70
+ <img src="docs/images/desktop-pane-now-light.png" alt="The Now tab of the pane: the next turn route with a pin button per tier, plan usage bars, context and cache, and this session's cost against no routing with a strip of replies by tier.">
71
+ </picture>
72
+
73
+ </td>
74
+ <td width="50%">
75
+
76
+ <picture>
77
+ <source media="(prefers-color-scheme: dark)" srcset="docs/images/desktop-pane-routes-dark.png">
78
+ <img src="docs/images/desktop-pane-routes-light.png" alt="The Routes tab: a grid of tiers by activities with the models they run, an editor card for code at High, and an Unsaved changes table with Discard and Save.">
79
+ </picture>
80
+
81
+ </td>
82
+ </tr>
83
+ </table>
56
84
 
57
- <!-- TODO: capture desktop screenshots: band, Now, Routes, Policy, Classifier, Usage, key card (dark and light) -->
58
85
 
59
86
  In the terminal, the picture above shows the band, whose controls appear on its own row on hover; the colours follow your Claude Code theme. The pane's warnings share one slot under the tab row, and a pending pin shows on its pin button (press it again to unpin).
60
87
 
@@ -163,19 +190,7 @@ npm run check && npm run typecheck && npm test && npm run validate && npm run te
163
190
 
164
191
  ## Contributing
165
192
 
166
- Pull requests from forks run CI automatically (a maintainer may have to approve the first run). Each check is its own job, and failures show as annotations on the changed lines: `Lint (biome)`, `Types (tsc)`, `Unit tests (node --test)`, and `Plugin (validate and engine tests)`. Run them locally before pushing:
167
-
168
- ```sh
169
- npm run setup
170
- npm run check && npm run typecheck && npm test && npm run validate && npm run test:plugin
171
- ```
172
-
173
- `npm test` runs the unit tests; CI runs the same files as `npm run test:ci`, which adds a reporter that annotates failures on the changed lines. `npm run format` fixes biome formatting. A maintainer can request an AI review by adding the `ai-review` label.
174
-
175
- ### Code quality
176
-
177
- - `npm run check` is Biome with `--error-on-warnings`, so a warning fails like an error. Besides the recommended rules it catches unawaited or misused promises, an `await` on a non-promise, an incomplete `switch` over a union, unused imports and variables, import cycles, throws of non-Error values, a lost `cause` when an error is rethrown, shadowed bindings, conditions the types prove constant, and read-modify-write updates split by an `await` (`useAtomicUpdates`). Use `biome-ignore` only with a one-line reason for code that is deliberate.
178
- - `npm run typecheck` is `tsc` over `lib` and `hooks` with `strictNullChecks`, `noUncheckedIndexedAccess`, `useUnknownInCatchVariables`, `strictFunctionTypes`, `noImplicitReturns`, `noFallthroughCasesInSwitch`, `noUnusedLocals`/`noUnusedParameters`, `verbatimModuleSyntax` and `erasableSyntaxOnly`.
193
+ Read [CONTRIBUTING.md](CONTRIBUTING.md): set-up and commands, the layer rules, test conventions and the pull request checklist. Coding agents start with [AGENTS.md](AGENTS.md). Run `npm run setup` once, then `npm run check && npm run typecheck && npm test && npm run test:plugin` before you push.
179
194
 
180
195
  ## Documentation
181
196
 
@@ -187,4 +202,5 @@ npm run check && npm run typecheck && npm test && npm run validate && npm run te
187
202
  - [Routing modes](docs/routing-modes.md): `cost`, `balanced` and `quality`, where the mode comes from, and every decision per mode.
188
203
  - [Native router details](docs/native-router.md): panel semantics, tuning, and accepted limits.
189
204
  - [Evaluation](docs/evaluation.md): limits, text-free trace export and replay, and the paired benchmark proposal.
205
+ - [Contributing](CONTRIBUTING.md): set up, commands, architecture rules, tests, and pull requests.
190
206
  - [Changelog](CHANGELOG.md): user-visible changes by version.
@@ -54,6 +54,7 @@ Claude Code builds each request for the model the Mod selects, so no request rew
54
54
  | [Classifier contract](../lib/classifier-contract.mjs) | Route criteria and instructions shared by every protocol, credentials and endpoint filling, and retry rules. |
55
55
  | [Classifier APIs](../lib/classifier-apis.mjs) | One adapter per wire protocol: request payload, answer validation, and the shared advice shape. |
56
56
  | [Classifier client](../lib/classifier-client.mjs) | Classifier HTTP, deadline, in-flight admission, and circuit breaker. |
57
+ | [Failover](../lib/failover.mjs) | How long each API error holds the failed model out of routing, and which holds still run. |
57
58
  | [Router controller](../lib/route.mjs) | Context fit, model identity, engine fallback, cache observations, one-turn pins, and the tier-and-activity cell. |
58
59
  | [Activity rules](../lib/activity.mjs) | Which activity applies, how two routes compare, and when a route change inside a tier is worth it. |
59
60
  | [Activity stats](../lib/activity-stats.mjs) | Session and stored activity counts, the tool-agreement table, and the per-turn record. |
@@ -89,7 +90,7 @@ lib/ui/graphical/ kit.mjs, frame.mjs, band.mjs, charts.mjs, meter.mjs, sq
89
90
 
90
91
  **Surface dispatch.** Every `ui.render` event carries `e.surface`, which the hook passes on. `terminal`, or no surface, picks the terminal tree. `desktop`, `vscode` and `mobile` pick the graphical tree, which is one tree for all three. If a graphical renderer throws and the caller passed `onFallback`, `orTerminal` hands it the error and draws the terminal tree; the hook's callback writes the error to the debug log. Without `onFallback` the throw propagates, so a test sees a broken renderer instead of the terminal tree standing in for it. The terminal's own throw is never caught.
91
92
 
92
- **Data flow.** `renderPanel` builds a context from the config, the stored view, the usage readings and `e.surface`. The selected tab's `modelOf` turns it into a model in which every condition, word and number format is already decided; where the words differ by surface the model holds a `{ terminal, graphical }` pair. The renderer only lays the model out with its kit. A tab renderer never reads `view` or the config; if it needs a fact, the model carries it. The frame (header, tabs, notices slot, save bar) has its own model, `frameOf`, and its own renderer per surface kind. The band follows the same idea with less separation: `lib/ui/model/band.mjs` returns segments of parts with a priority (`bandSegments`, `sessionSegments`, `agentSegments`, `routeLineSegments`), and `fitSegments` drops them by priority to fit `columns`. The terminal band draws the segments, adds the hover controls as absolutely placed Boxes, and still takes `config` and `view` for those controls; the graphical band splits the segments into a left group that shrinks and a right group that never does. A graphical band never adds anything on hover.
93
+ **Data flow.** `renderPanel` builds a context from the config, the stored view, the usage readings and `e.surface`. The selected tab's `modelOf` turns it into a model in which every condition, word and number format is already decided; where the words differ by surface the model holds a `{ terminal, graphical }` pair. The renderer only lays the model out with its kit. On the terminal, `kit.panel` puts a section (a Now block, the Policy controls, the active classifier) in a single-line box from 72 columns (`PANEL_COLUMNS`) or with no width, and `kit.inner` gives its lines the box's inner width; a narrower pane gets the plain lines. A tab renderer never reads `view` or the config; if it needs a fact, the model carries it. The frame (header, tabs, notices slot, save bar) has its own model, `frameOf`, and its own renderer per surface kind. The band follows the same idea with less separation: `lib/ui/model/band.mjs` returns segments of parts with a priority (`bandSegments`, `sessionSegments`, `agentSegments`, `routeLineSegments`), and `fitSegments` drops them by priority to fit `columns`. The terminal band draws the segments, adds Router in brackets only where that costs no reading or hover control, adds the hover controls as absolutely placed Boxes, and still takes `config` and `view` for those controls; the graphical band splits the segments into a left group that shrinks and a right group that never does. A graphical band never adds anything on hover.
93
94
 
94
95
  **State.** `lib/ui/` keeps no module state. A function takes the elements it draws with (`$.ui.resolve(e)` in the hook), the model, and the actions it binds to a `Button` or `Select`; the hook owns the view, the config and every host call.
95
96
 
@@ -107,6 +108,8 @@ A move to a smaller context window needs a main-response measurement from the cu
107
108
 
108
109
  An explicit context-window failure marks that model ineligible until the next history reset. An engine fallback suspends rewriting for the rest of the turn. The router does not retry an Anthropic request.
109
110
 
111
+ A main turn that ends on an API error (`classic.StopFailure`) holds the model of the last main request out of routing (`loop.held`, `lib/failover.mjs`): `rate_limit` and `overloaded` for 5 minutes, `server_error` for 2, `model_not_found` for an hour; other errors are not the model's and hold nothing. The event carries neither the model nor a retry-after, so the hook keeps the last request's model and the times are fixed. At the next turn a cell whose route runs a held model falls back to the nearest tier, the stronger of two as near, at the turn's activity, with reason `model-held`. That fallback serves the turn only, as a pin does: `lastRoute` and `loop.route` keep the held route, so the turn after the hold runs it again with no switching gate. That is so only when the cell's configured route runs a held model too. A held `loop.route` is not usable, so `routeTurn` rebuilds the incumbent from config; where `loop.route` was kept apart from config (a routing-mode change or a route edit since it was chosen, or `ownRoute` for a session model no tier routes to) and the configured route runs another model, the turn runs that route with its usual reason, `chooseRoute` stores it as `loop.route`, and the held route does not come back. The policy state also stays as it was, only the turn counted, so a failure whose escalation the hold turned away still escalates once it ends. A compaction keeps the holds. Inside a turn no move lands on a held model: `observedMove` keeps the running route, and `continueRoute` skips a held route for a context fit or an image tier as it skips an ineligible one. The `auto` engine does not read holds, so with it the hook writes none and shows no toast.
112
+
110
113
  ## Activity routing
111
114
 
112
115
  The router decides on a _cell_: a tier and an activity. The route is `{ ...routes[tier], ...activities[activity][tier] }`; the (model, effort) pair, not the label, is what Claude Code receives and what owns a cache. Two cells that resolve to the same route never switch.
@@ -133,7 +133,7 @@ The engine is selected in this file, not by a `/router` command.
133
133
 
134
134
  - **`table` (default):** the deterministic tier-by-activity routes are used. Routing modes transform those routes before the table policy.
135
135
  - **`shadow`:** the table still sends every request. The automatic engine records one-step proposals against the real incumbent and cache, without keeping a separate route history or asking the classifier again. The Now pane and `/router decisions` show demand, target, capability (or unknown), outcome and a next-turn estimate. While shadow is enabled, the main-turn hook also records bounded replay traces. Export with `/router trace export`; for the work profile (`CLAUDE_CONFIG_DIR=~/.claude-team`) the file is `~/.claude-team/router-traces.json`. Retain all incremental export and rollover files. From a source checkout, run `node scripts/replay-traces.mjs ~/.claude-team/router-traces.json`, adding every rollover file as another argument. The export lives beside the selected profile config; the replay CLI is not included in the npm package. Replay checks table fidelity first; evaluation and exposure gates remain unestablished. See [evaluation](evaluation.md#replay-trace-recorder).
136
- - **`auto`:** the stateful engine selects each main-turn model and effort from the configured catalog using classifier demand, a mode margin, and hard/cache constraints. It does not use route tables or mode policy patches. Tier pins set exact demand for one turn, without a mode margin, and still obey hard constraints. A first routed decision can move from a known below-requirement native model to a declared qualifying candidate under the normal switch-tax and cash gates; failures can escalate to stronger eligible candidates. Demand, votes, holds and routed demand persist across turns. If no eligible candidate fits, the native request is kept with reason `no-route-native`; after an observed provider fallback, the rest of that turn stays native, and the next turn can re-enter an eligible route.
136
+ - **`auto`:** the stateful engine selects each main-turn model and effort from the configured catalog using classifier demand, a mode margin, and hard/cache constraints. It does not use route tables or mode policy patches. Tier pins set exact demand for one turn, without a mode margin, and still obey hard constraints. A first routed decision can move from a known below-requirement native model to a declared qualifying candidate under the normal switch-tax and cash gates; failures can escalate to stronger eligible candidates. Demand, votes, holds and routed demand persist across turns. If no eligible candidate fits, the native request is kept with reason `no-route-native`; after an observed provider fallback, the rest of that turn stays native, and the next turn can re-enter an eligible route. Unlike `table` and `shadow`, it does not hold out a model whose turn ended on an API error ([When a model fails](user-guide.md#when-a-model-fails)).
137
137
 
138
138
  Auto asks the active classifier for demand. Configure a classifier credential when the provider requires a key; local Ollama needs no key. Without classifier advice, the engine cannot detect demand and holds the startup route; a qualifying startup capability move based on the prompt tier may still occur.
139
139
 
@@ -26,7 +26,7 @@ The activity is what the turn produces: `code`, `debug`, `explore`, `plan`, `rev
26
26
  | `/router mode <cost\|balanced\|quality\|default>` | Set or clear this session's [routing mode](routing-modes.md), from the next turn. Kept for a resume in `$.store` `routing-mode:<session id>`. Never aborts a turn. |
27
27
  | `/router decisions [n]` | Print this session's last `n` routing decisions (default 20, at most 60): origin, classifier answer, task, tier, route, reason with the mass and bar it compared, and each turn's end. No text. |
28
28
  | `/router line <off\|moves\|all>` | Set when a turn leaves a route line (default `moves`: only when its route moved). Kept in `$.store` as `route:line`, across sessions. |
29
- | `/model <name>` | Select a model and turn routing off. `/router auto` turns it back on. |
29
+ | `/model <name>` | Select a model and turn routing off. `/router auto` turns it back on. A `classic.PostModelSwitch` from the picker or the SDK (`source` `picker` or `sdk`) does the same; `command` is left to the `/model` and `config.set` hooks, which skip a plugin's own switch, and `auto` and `resume` change nothing. |
30
30
 
31
31
  The prompt's typeahead (`prompt.autocomplete`) offers these words after `/router ` and their values after `pin `, `mode `, `activities ` and `line `. It starts with the first typed character, because the engine passes a token that is never empty. The command, the typeahead and the argument hint all read one table, `lib/subcommands.mjs`, and a test runs the command with every word and value in it.
32
32
 
@@ -17,14 +17,15 @@
17
17
  <text x="211.2" y="56" fill="#d77757" font-style="italic" xml:space="preserve">code</text>
18
18
  <text x="265.8" y="56" fill="#7c7c7c" xml:space="preserve">↑ clearly stronger</text>
19
19
  <text x="429.6" y="56" fill="#7c7c7c" xml:space="preserve">Jev 88% ≥ 82%</text>
20
- <text x="593.4" y="56" fill="#7c7c7c" xml:space="preserve">ctx </text>
21
- <text x="624.6" y="56" fill="#87d787" xml:space="preserve">▰▰</text>
22
- <text x="640.2" y="56" fill="#7c7c7c" xml:space="preserve">▱▱▱</text>
23
- <text x="663.6" y="56" fill="#87d787" xml:space="preserve"> 40%</text>
24
- <text x="718.2" y="56" fill="#7c7c7c" xml:space="preserve">cache </text>
25
- <text x="765.0" y="56" fill="#87d787" xml:space="preserve">100%</text>
26
- <text x="796.2" y="56" fill="#7c7c7c" xml:space="preserve"> last</text>
27
- <text x="850.8" y="56" fill="#d0d0d0" xml:space="preserve">Router</text>
20
+ <text x="562.2" y="56" fill="#7c7c7c" xml:space="preserve">ctx </text>
21
+ <text x="593.4" y="56" fill="#87d787" xml:space="preserve">▰▰</text>
22
+ <text x="609.0" y="56" fill="#7c7c7c" xml:space="preserve">▱▱▱</text>
23
+ <text x="632.4" y="56" fill="#87d787" xml:space="preserve"> 40%</text>
24
+ <text x="687.0" y="56" fill="#7c7c7c" xml:space="preserve">cache </text>
25
+ <text x="733.8" y="56" fill="#87d787" xml:space="preserve">100%</text>
26
+ <text x="765.0" y="56" fill="#7c7c7c" xml:space="preserve"> last</text>
27
+ <rect x="819.6" y="42" width="78.0" height="18" rx="4" fill="#2e3340"/>
28
+ <text x="819.6" y="56" fill="#d0d0d0" xml:space="preserve">[ Router ]</text>
28
29
  <text class="cap" x="20" y="95">Two rows on a Claude plan, with the hover controls shown over the readings: plan windows, the session as a configured-rate API estimate against your model, pins</text>
29
30
  <rect x="12" y="103" width="897.6" height="48" rx="5" fill="#232323"/>
30
31
  <text x="24.0" y="121" fill="#e0708a" xml:space="preserve">▂</text>
@@ -46,7 +47,8 @@
46
47
  <text x="484.2" y="121" fill="#d0d0d0" xml:space="preserve">[ Turn off ]</text>
47
48
  <rect x="593.4" y="107" width="70.2" height="18" rx="4" fill="#2e3340"/>
48
49
  <text x="593.4" y="121" fill="#d0d0d0" xml:space="preserve">[ 1 row ]</text>
49
- <text x="850.8" y="121" fill="#d0d0d0" xml:space="preserve">Router</text>
50
+ <rect x="819.6" y="107" width="78.0" height="18" rx="4" fill="#2e3340"/>
51
+ <text x="819.6" y="121" fill="#d0d0d0" xml:space="preserve">[ Router ]</text>
50
52
  <text x="24.0" y="140" fill="#7c7c7c" xml:space="preserve">plan 5h </text>
51
53
  <text x="86.4" y="140" fill="#87d787" xml:space="preserve">▰▰▰▰</text>
52
54
  <text x="117.6" y="140" fill="#7c7c7c" xml:space="preserve">▱▱▱▱</text>
@@ -70,14 +72,15 @@
70
72
  <text x="125.4" y="205" fill="#d0d0d0" xml:space="preserve"> · xhigh</text>
71
73
  <text x="211.2" y="205" fill="#d77757" font-style="italic" xml:space="preserve">code</text>
72
74
  <text x="265.8" y="205" fill="#7c7c7c" xml:space="preserve">↑ clearly stronger</text>
73
- <text x="593.4" y="205" fill="#7c7c7c" xml:space="preserve">ctx </text>
74
- <text x="624.6" y="205" fill="#87d787" xml:space="preserve">▰▰</text>
75
- <text x="640.2" y="205" fill="#7c7c7c" xml:space="preserve">▱▱▱</text>
76
- <text x="663.6" y="205" fill="#87d787" xml:space="preserve"> 40%</text>
77
- <text x="718.2" y="205" fill="#7c7c7c" xml:space="preserve">cache </text>
78
- <text x="765.0" y="205" fill="#87d787" xml:space="preserve">100%</text>
79
- <text x="796.2" y="205" fill="#7c7c7c" xml:space="preserve"> last</text>
80
- <text x="850.8" y="205" fill="#d0d0d0" xml:space="preserve">Router</text>
75
+ <text x="562.2" y="205" fill="#7c7c7c" xml:space="preserve">ctx </text>
76
+ <text x="593.4" y="205" fill="#87d787" xml:space="preserve">▰▰</text>
77
+ <text x="609.0" y="205" fill="#7c7c7c" xml:space="preserve">▱▱▱</text>
78
+ <text x="632.4" y="205" fill="#87d787" xml:space="preserve"> 40%</text>
79
+ <text x="687.0" y="205" fill="#7c7c7c" xml:space="preserve">cache </text>
80
+ <text x="733.8" y="205" fill="#87d787" xml:space="preserve">100%</text>
81
+ <text x="765.0" y="205" fill="#7c7c7c" xml:space="preserve"> last</text>
82
+ <rect x="819.6" y="191" width="78.0" height="18" rx="4" fill="#2e3340"/>
83
+ <text x="819.6" y="205" fill="#d0d0d0" xml:space="preserve">[ Router ]</text>
81
84
  <text x="24.0" y="224" fill="#7c7c7c" xml:space="preserve">session </text>
82
85
  <text x="86.4" y="224" fill="#d0d0d0" font-weight="700" xml:space="preserve">≈$6.40</text>
83
86
  <text x="133.2" y="224" fill="#7c7c7c" xml:space="preserve"> API estimate</text>
@@ -118,7 +121,8 @@
118
121
  <text x="320.4" y="354" fill="#d0d0d0" font-weight="700" xml:space="preserve">Haiku 5.5</text>
119
122
  <text x="390.6" y="354" fill="#d0d0d0" xml:space="preserve"> · high</text>
120
123
  <text x="468.6" y="354" fill="#7c7c7c" xml:space="preserve">= no advice</text>
121
- <text x="570.0" y="354" fill="#d0d0d0" xml:space="preserve">Router</text>
124
+ <rect x="570.0" y="340" width="78.0" height="18" rx="4" fill="#2e3340"/>
125
+ <text x="570.0" y="354" fill="#d0d0d0" xml:space="preserve">[ Router ]</text>
122
126
  <text class="cap" x="20" y="393">Routing off: /model chose the model; Turn on resumes routing</text>
123
127
  <rect x="12" y="401" width="897.6" height="29" rx="5" fill="#232323"/>
124
128
  <text x="24.0" y="419" fill="#7c7c7c" xml:space="preserve">○ </text>
@@ -126,7 +130,8 @@
126
130
  <rect x="125.4" y="405" width="85.8" height="18" rx="4" fill="#87afff"/>
127
131
  <text x="125.4" y="419" fill="#0d1016" font-weight="700" xml:space="preserve">[ Turn on ]</text>
128
132
  <text x="234.6" y="419" fill="#7c7c7c" xml:space="preserve">routing off · /model</text>
129
- <text x="406.2" y="419" fill="#d0d0d0" xml:space="preserve">Router</text>
133
+ <rect x="406.2" y="405" width="78.0" height="18" rx="4" fill="#2e3340"/>
134
+ <text x="406.2" y="419" fill="#d0d0d0" xml:space="preserve">[ Router ]</text>
130
135
  <text class="cap" x="20" y="458">Activity routing on: an ops turn at medium moves from Opus to Haiku</text>
131
136
  <rect x="12" y="466" width="897.6" height="29" rx="5" fill="#232323"/>
132
137
  <text x="24.0" y="484" fill="#d7af5f" xml:space="preserve">▂</text>
@@ -136,14 +141,15 @@
136
141
  <text x="63.0" y="484" fill="#d0d0d0" font-weight="700" xml:space="preserve">Haiku 5.5</text>
137
142
  <text x="133.2" y="484" fill="#d0d0d0" xml:space="preserve"> · high</text>
138
143
  <text x="211.2" y="484" fill="#7c7c7c" xml:space="preserve">↓ ops</text>
139
- <text x="593.4" y="484" fill="#7c7c7c" xml:space="preserve">ctx </text>
140
- <text x="624.6" y="484" fill="#87d787" xml:space="preserve">▰▰</text>
141
- <text x="640.2" y="484" fill="#7c7c7c" xml:space="preserve">▱▱▱</text>
142
- <text x="663.6" y="484" fill="#87d787" xml:space="preserve"> 40%</text>
143
- <text x="718.2" y="484" fill="#7c7c7c" xml:space="preserve">cache </text>
144
- <text x="765.0" y="484" fill="#87d787" xml:space="preserve">100%</text>
145
- <text x="796.2" y="484" fill="#7c7c7c" xml:space="preserve"> last</text>
146
- <text x="850.8" y="484" fill="#d0d0d0" xml:space="preserve">Router</text>
144
+ <text x="562.2" y="484" fill="#7c7c7c" xml:space="preserve">ctx </text>
145
+ <text x="593.4" y="484" fill="#87d787" xml:space="preserve">▰▰</text>
146
+ <text x="609.0" y="484" fill="#7c7c7c" xml:space="preserve">▱▱▱</text>
147
+ <text x="632.4" y="484" fill="#87d787" xml:space="preserve"> 40%</text>
148
+ <text x="687.0" y="484" fill="#7c7c7c" xml:space="preserve">cache </text>
149
+ <text x="733.8" y="484" fill="#87d787" xml:space="preserve">100%</text>
150
+ <text x="765.0" y="484" fill="#7c7c7c" xml:space="preserve"> last</text>
151
+ <rect x="819.6" y="470" width="78.0" height="18" rx="4" fill="#2e3340"/>
152
+ <text x="819.6" y="484" fill="#d0d0d0" xml:space="preserve">[ Router ]</text>
147
153
  <text class="cap" x="20" y="523">Cost mode for this session: high runs Opus at high instead of xhigh</text>
148
154
  <rect x="12" y="531" width="897.6" height="29" rx="5" fill="#232323"/>
149
155
  <text x="24.0" y="549" fill="#e0708a" xml:space="preserve">▂</text>
@@ -157,12 +163,13 @@
157
163
  <rect x="328.2" y="535" width="46.8" height="18" rx="4" fill="#2a3040"/>
158
164
  <text x="328.2" y="549" fill="#7c7c7c" xml:space="preserve"> cost </text>
159
165
  <text x="375.0" y="549" fill="#7c7c7c" xml:space="preserve"> effort only</text>
160
- <text x="593.4" y="549" fill="#7c7c7c" xml:space="preserve">ctx </text>
161
- <text x="624.6" y="549" fill="#87d787" xml:space="preserve">▰▰</text>
162
- <text x="640.2" y="549" fill="#7c7c7c" xml:space="preserve">▱▱▱</text>
163
- <text x="663.6" y="549" fill="#87d787" xml:space="preserve"> 40%</text>
164
- <text x="718.2" y="549" fill="#7c7c7c" xml:space="preserve">cache </text>
165
- <text x="765.0" y="549" fill="#87d787" xml:space="preserve">100%</text>
166
- <text x="796.2" y="549" fill="#7c7c7c" xml:space="preserve"> last</text>
167
- <text x="850.8" y="549" fill="#d0d0d0" xml:space="preserve">Router</text>
166
+ <text x="562.2" y="549" fill="#7c7c7c" xml:space="preserve">ctx </text>
167
+ <text x="593.4" y="549" fill="#87d787" xml:space="preserve">▰▰</text>
168
+ <text x="609.0" y="549" fill="#7c7c7c" xml:space="preserve">▱▱▱</text>
169
+ <text x="632.4" y="549" fill="#87d787" xml:space="preserve"> 40%</text>
170
+ <text x="687.0" y="549" fill="#7c7c7c" xml:space="preserve">cache </text>
171
+ <text x="733.8" y="549" fill="#87d787" xml:space="preserve">100%</text>
172
+ <text x="765.0" y="549" fill="#7c7c7c" xml:space="preserve"> last</text>
173
+ <rect x="819.6" y="535" width="78.0" height="18" rx="4" fill="#2e3340"/>
174
+ <text x="819.6" y="549" fill="#d0d0d0" xml:space="preserve">[ Router ]</text>
168
175
  </svg>
@@ -1,12 +1,12 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 727 610" role="img" aria-labelledby="title desc">
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 922 648" role="img" aria-labelledby="title desc">
2
2
  <title id="title">Router pane, Classifier tab</title>
3
3
  <desc id="desc">One row per classifier to compare: where the prompt goes, its activity probe, its p95 wait and whether its credentials are complete, with Set up for a missing Jev API key; the active classifier’s deadline against its wait, the host that receives the prompt, health and credentials; the agreement with tools across sessions; and Undo after a switch.</desc>
4
4
  <style>
5
5
  text { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace; font-size: 13px; }
6
6
  .cap { font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 12px; fill: #9a988f; }
7
7
  </style>
8
- <rect width="727" height="610" rx="8" fill="#1c1c1c"/>
9
- <rect x="10" y="10" width="707" height="590" rx="6" fill="none" stroke="#3f5f8f"/>
8
+ <rect width="922" height="648" rx="8" fill="#1c1c1c"/>
9
+ <rect x="10" y="10" width="902" height="628" rx="6" fill="none" stroke="#3f5f8f"/>
10
10
  <text x="24.0" y="34" fill="#5fafd7" font-weight="700" xml:space="preserve">ROUTER</text>
11
11
  <rect x="86.4" y="20" width="62.4" height="18" rx="4" fill="#87afff"/>
12
12
  <text x="86.4" y="34" fill="#0d1016" font-weight="700" xml:space="preserve">[ ◉ on ]</text>
@@ -69,30 +69,46 @@
69
69
  <text x="382.8" y="224" fill="#d0d0d0" xml:space="preserve">3483 ms</text>
70
70
  <text x="460.8" y="224" fill="#87d787" xml:space="preserve">● ready</text>
71
71
  <text x="24.0" y="243" fill="#7c7c7c" xml:space="preserve"> probe: historical turn-activity questions, not goal/phase accuracy; p95 from that run</text>
72
- <text x="24.0" y="281" fill="#5fafd7" font-weight="700" xml:space="preserve">CLEF FLASH</text>
73
- <text x="102.0" y="281" fill="#7c7c7c" xml:space="preserve"> · active</text>
74
- <text x="24.0" y="300" fill="#d0d0d0" xml:space="preserve">Deadline</text>
75
- <text x="117.6" y="300" fill="#d0d0d0" xml:space="preserve">3000 ms ▾</text>
76
- <text x="211.2" y="300" fill="#7c7c7c" xml:space="preserve">p95 874 ms in its probe</text>
77
- <text x="24.0" y="319" fill="#7c7c7c" xml:space="preserve"> past the deadline the turn keeps its model</text>
78
- <text x="24.0" y="338" fill="#d0d0d0" xml:space="preserve">Sends</text>
79
- <text x="117.6" y="338" fill="#d0d0d0" xml:space="preserve">prompt + 6 recent turns → api.cloudflare.com</text>
80
- <text x="24.0" y="357" fill="#7c7c7c" xml:space="preserve"> the bounded active goal and current step also go to the classifier</text>
81
- <text x="24.0" y="376" fill="#d0d0d0" xml:space="preserve">Health</text>
82
- <text x="117.6" y="376" fill="#d0d0d0" xml:space="preserve">not paused</text>
83
- <text x="195.6" y="376" fill="#d0d0d0" xml:space="preserve"> · 0 recent failures</text>
84
- <text x="24.0" y="395" fill="#d0d0d0" xml:space="preserve">Credentials</text>
85
- <rect x="117.6" y="381" width="62.4" height="18" rx="4" fill="#2e3340"/>
86
- <text x="117.6" y="395" fill="#d0d0d0" xml:space="preserve">[ Edit ]</text>
87
- <text x="180.0" y="395" fill="#7c7c7c" xml:space="preserve"> opens /plugin configure</text>
88
- <text x="24.0" y="433" fill="#5fafd7" font-weight="700" xml:space="preserve">ACROSS SESSIONS · since the last reset</text>
89
- <text x="24.0" y="452" fill="#d0d0d0" xml:space="preserve">Labelled 83 turns</text>
90
- <text x="24.0" y="471" fill="#d0d0d0" xml:space="preserve">Tool compatibility (not accuracy): 78 of 83 turns (94%)</text>
91
- <text x="24.0" y="490" fill="#d0d0d0" xml:space="preserve">Code/ops/explore classifier vs tools: 78 of 83 turns (94%)</text>
92
- <text x="24.0" y="509" fill="#d0d0d0" xml:space="preserve">Mismatch code → read 4 · ops → code 1</text>
93
- <text x="24.0" y="528" fill="#d0d0d0" xml:space="preserve">Activity moves 9 taken · 4 refused</text>
94
- <text x="24.0" y="547" fill="#d0d0d0" xml:space="preserve">Escalations after a cheaper activity move: 0 in 7 moves</text>
95
- <text x="24.0" y="585" fill="#87d787" xml:space="preserve">Saved: classifier Clef → Clef Flash. Applies from the next turn. </text>
96
- <rect x="538.8" y="571" width="62.4" height="18" rx="4" fill="#2e3340"/>
97
- <text x="538.8" y="585" fill="#d0d0d0" xml:space="preserve">[ Undo ]</text>
72
+ <path d="M27.9 286V276H893.7V286" fill="none" stroke="#7c7c7c"/>
73
+ <path d="M27.9 286V305" fill="none" stroke="#7c7c7c"/>
74
+ <text x="39.6" y="300" fill="#5fafd7" font-weight="700" xml:space="preserve">CLEF FLASH</text>
75
+ <text x="117.6" y="300" fill="#7c7c7c" xml:space="preserve"> · active</text>
76
+ <path d="M893.7 286V305" fill="none" stroke="#7c7c7c"/>
77
+ <path d="M27.9 305V324" fill="none" stroke="#7c7c7c"/>
78
+ <text x="39.6" y="319" fill="#d0d0d0" xml:space="preserve">Deadline</text>
79
+ <text x="133.2" y="319" fill="#d0d0d0" xml:space="preserve">3000 ms ▾</text>
80
+ <text x="226.8" y="319" fill="#7c7c7c" xml:space="preserve">p95 874 ms in its probe</text>
81
+ <path d="M893.7 305V324" fill="none" stroke="#7c7c7c"/>
82
+ <path d="M27.9 324V343" fill="none" stroke="#7c7c7c"/>
83
+ <text x="133.2" y="338" fill="#7c7c7c" xml:space="preserve">past the deadline the turn keeps its model</text>
84
+ <path d="M893.7 324V343" fill="none" stroke="#7c7c7c"/>
85
+ <path d="M27.9 343V362" fill="none" stroke="#7c7c7c"/>
86
+ <text x="39.6" y="357" fill="#d0d0d0" xml:space="preserve">Sends</text>
87
+ <text x="133.2" y="357" fill="#d0d0d0" xml:space="preserve">prompt + 6 recent turns → api.cloudflare.com</text>
88
+ <path d="M893.7 343V362" fill="none" stroke="#7c7c7c"/>
89
+ <path d="M27.9 362V381" fill="none" stroke="#7c7c7c"/>
90
+ <text x="133.2" y="376" fill="#7c7c7c" xml:space="preserve">the bounded active goal and current step also go to the classifier</text>
91
+ <path d="M893.7 362V381" fill="none" stroke="#7c7c7c"/>
92
+ <path d="M27.9 381V400" fill="none" stroke="#7c7c7c"/>
93
+ <text x="39.6" y="395" fill="#d0d0d0" xml:space="preserve">Health</text>
94
+ <text x="133.2" y="395" fill="#d0d0d0" xml:space="preserve">not paused</text>
95
+ <text x="211.2" y="395" fill="#d0d0d0" xml:space="preserve"> · 0 recent failures</text>
96
+ <path d="M893.7 381V400" fill="none" stroke="#7c7c7c"/>
97
+ <path d="M27.9 400V419" fill="none" stroke="#7c7c7c"/>
98
+ <text x="39.6" y="414" fill="#d0d0d0" xml:space="preserve">Credentials</text>
99
+ <rect x="133.2" y="400" width="62.4" height="18" rx="4" fill="#2e3340"/>
100
+ <text x="133.2" y="414" fill="#d0d0d0" xml:space="preserve">[ Edit ]</text>
101
+ <text x="195.6" y="414" fill="#7c7c7c" xml:space="preserve"> opens /plugin configure</text>
102
+ <path d="M893.7 400V419" fill="none" stroke="#7c7c7c"/>
103
+ <path d="M27.9 419V428H893.7V419" fill="none" stroke="#7c7c7c"/>
104
+ <text x="24.0" y="471" fill="#5fafd7" font-weight="700" xml:space="preserve">ACROSS SESSIONS · since the last reset</text>
105
+ <text x="24.0" y="490" fill="#d0d0d0" xml:space="preserve">Labelled 83 turns</text>
106
+ <text x="24.0" y="509" fill="#d0d0d0" xml:space="preserve">Tool compatibility (not accuracy): 78 of 83 turns (94%)</text>
107
+ <text x="24.0" y="528" fill="#d0d0d0" xml:space="preserve">Code/ops/explore classifier vs tools: 78 of 83 turns (94%)</text>
108
+ <text x="24.0" y="547" fill="#d0d0d0" xml:space="preserve">Mismatch code → read 4 · ops → code 1</text>
109
+ <text x="24.0" y="566" fill="#d0d0d0" xml:space="preserve">Activity moves 9 taken · 4 refused</text>
110
+ <text x="24.0" y="585" fill="#d0d0d0" xml:space="preserve">Escalations after a cheaper activity move: 0 in 7 moves</text>
111
+ <text x="24.0" y="623" fill="#87d787" xml:space="preserve">Saved: classifier Clef → Clef Flash. Applies from the next turn. </text>
112
+ <rect x="538.8" y="609" width="62.4" height="18" rx="4" fill="#2e3340"/>
113
+ <text x="538.8" y="623" fill="#d0d0d0" xml:space="preserve">[ Undo ]</text>
98
114
  </svg>