@alexeiled/claude-router 1.9.0 → 1.10.0
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 +15 -0
- package/docs/activity-routing.md +17 -16
- package/docs/configuration.md +7 -7
- package/docs/native-router.md +13 -13
- package/docs/router-pane-classifier.svg +82 -63
- package/docs/router-pane-now.svg +95 -109
- package/docs/router-pane-policy.svg +70 -0
- package/docs/router-pane-routes.svg +103 -0
- package/docs/router-pane-usage.svg +100 -127
- package/docs/user-guide.md +56 -41
- package/hooks/native-router.mjs +4 -1
- package/lib/display.mjs +10 -25
- package/lib/panel.mjs +644 -436
- package/lib/view.mjs +2 -0
- package/package.json +1 -1
- package/types/index.d.ts +5 -1
- package/docs/router-pane-routing.svg +0 -150
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "router",
|
|
3
3
|
"displayName": "Router",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.10.0",
|
|
5
5
|
"description": "Model and effort routing for the main conversation by task difficulty and activity, advised by a prompt classifier (Jev, Clef, Clef Flash, OpenAI or local Ollama). Subagents get one model at spawn: every agent that does not pin one.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Alexei Ledenev",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.10.0 (2026-10-10)
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- The pane has five tabs: Now, Routes, Policy, Classifier, Usage (`1`–`5`). The old Routing tab is split in two, and each tab now answers one question.
|
|
8
|
+
- **Routes** is one grid of tiers by activities. Each cell shows the model it runs: `·` for the tier's model, `°` for a built-in default, **●** for an unsaved edit. Select a cell to edit it. **remove** is now **Use tier model**, and **Restore default** puts a built-in override back. `5 distinct routes · 3 caches` now reads `3 prompt caches in use: one per model`, with what a cold cache costs.
|
|
9
|
+
- **Policy** writes each control as a sentence, such as `Going down after 2 ▾ agreeing turns`, shows the default beside a changed value, and says when the credits cap has no effect.
|
|
10
|
+
- **Now** leads with the next turn's model and why. The letter row under the replies strip (`eeccoo…`) is gone; replies are counted per tier and per activity instead, such as `coding 12 · exploring 4`.
|
|
11
|
+
- **Classifier** compares the classifiers in one table (where the prompt goes, probe, p95 wait, status) and flags a deadline shorter than the real wait. The counts across sessions moved here from Usage.
|
|
12
|
+
- **Usage** opens with the answer, such as `Routing saved $1.84 (22%) this session vs Opus 5.5 · xhigh`. Claude's readings fold to one line behind **details**.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- The Now picture in the docs showed `0 switches` next to a strip with three tier changes.
|
|
17
|
+
|
|
3
18
|
## 1.9.0 (2026-10-10)
|
|
4
19
|
|
|
5
20
|
### Added
|
package/docs/activity-routing.md
CHANGED
|
@@ -137,13 +137,14 @@ turn, whatever the activity mode.
|
|
|
137
137
|
|
|
138
138
|
## Change a cell
|
|
139
139
|
|
|
140
|
-
**In the pane.** Open `/router` and press `2
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
140
|
+
**In the pane.** Open `/router` and press `2` for the **Routes** tab. It starts with the mode, then one grid: a column
|
|
141
|
+
per tier, the **every turn** row with each tier's own model, and a row per activity. A cell shows the model the activity
|
|
142
|
+
runs at that tier, such as `sonnet·high`, or `·` for the tier's model; `°` marks a built-in default. Select a cell to
|
|
143
|
+
edit its model and effort under the grid. **Use tier model** drops the override; **Restore default** puts a built-in
|
|
144
|
+
one back. Edits are a draft: the tab reads **Routes ●** and lists the `router.json` lines they change. **Save** (`s`)
|
|
145
|
+
writes them, **Discard** (`d`) drops them, and **Undo** (`u`) reverts the last write. A yellow note flags a cell
|
|
146
|
+
stronger than the tier above, or the only cell on its cache, which adds one. A selected cell whose override
|
|
147
|
+
changes nothing says `same as the tier’s model: no effect`.
|
|
147
148
|
|
|
148
149
|
**In `router.json`.** `activities.<activity>.<tier>` takes `model`, `effort`, or both. A field you leave out keeps its
|
|
149
150
|
default. This runs `code` at `low` on Sonnet at `xhigh` and adds `max` effort for hard code:
|
|
@@ -156,9 +157,9 @@ default. This runs `code` at `low` on Sonnet at `xhigh` and adds `max` effort fo
|
|
|
156
157
|
}
|
|
157
158
|
```
|
|
158
159
|
|
|
159
|
-
A cell cannot be `null`. To drop a built-in override, set the cell to the tier's base route, or press **
|
|
160
|
-
the pane, which writes that for you. The cell keeps that route if you later change the tier's route;
|
|
161
|
-
then:
|
|
160
|
+
A cell cannot be `null`. To drop a built-in override, set the cell to the tier's base route, or press **Use tier
|
|
161
|
+
model** in the pane, which writes that for you. The cell keeps that route if you later change the tier's route; drop it
|
|
162
|
+
again then:
|
|
162
163
|
|
|
163
164
|
```json
|
|
164
165
|
{ "activities": { "ops": { "medium": { "model": "opus", "effort": "medium" } } } }
|
|
@@ -186,8 +187,8 @@ Two other directions, with what they trade:
|
|
|
186
187
|
|
|
187
188
|
**Activity threshold.** An activity applies only when the classifier gives it at least this probability. Below it, a
|
|
188
189
|
new task goes back to the base route if that move passes the usual checks, and a continuation of the running task
|
|
189
|
-
keeps its activity, or moves to the classifier's activity when that route is stronger. The default is 60% (`policy.activityMass: 0.6`). Change it on the
|
|
190
|
-
|
|
190
|
+
keeps its activity, or moves to the classifier's activity when that route is stronger. The default is 60% (`policy.activityMass: 0.6`). Change it on the Policy tab under **Activities**,
|
|
191
|
+
or in `router.json`. There is no data to tune it on yet: the probe results record whether the
|
|
191
192
|
label was right, not the classifier's probabilities.
|
|
192
193
|
|
|
193
194
|
[Configuration](configuration.md#activity-routing) has the full schema.
|
|
@@ -207,8 +208,8 @@ label was right, not the classifier's probabilities.
|
|
|
207
208
|
1.7's built-in for that cell, or from the base route where 1.7 has none (`explore` and `docs` at `medium`, `docs` at
|
|
208
209
|
`low`). 1.6's overrides in those cells and in `ops` at `medium` were Sonnet · medium, so such a cell can now run
|
|
209
210
|
another model or effort. Write both `model` and `effort` to keep 1.6's route.
|
|
210
|
-
- If you removed a 1.6 built-in override that 1.7 no longer has, such as `docs` at `low`,
|
|
211
|
-
"same as
|
|
211
|
+
- If you removed a 1.6 built-in override that 1.7 no longer has, such as `docs` at `low`, its cell on the Routes tab
|
|
212
|
+
says "same as the tier’s model: no effect". Press **Use tier model** and **Save** to drop it.
|
|
212
213
|
- 1.6 reads the same keys. A file without `activityRouting` runs `shadow` under 1.6.
|
|
213
214
|
|
|
214
215
|
## What the estimates mean
|
|
@@ -236,8 +237,8 @@ Limits:
|
|
|
236
237
|
|
|
237
238
|
- The answer quality of routed sessions.
|
|
238
239
|
- How well the classifier labels real turns. On 70 synthetic prompts, Jev and OpenAI labelled all 70 right; see
|
|
239
|
-
[Evaluation](evaluation.md#activity-probe-set). The
|
|
240
|
-
tools they used.
|
|
240
|
+
[Evaluation](evaluation.md#activity-probe-set). The **Agreement** lines, on the Usage tab for this session and on the
|
|
241
|
+
Classifier tab across sessions, check your own turns against the tools they used.
|
|
241
242
|
- Whether an effort change on the same model keeps the cache. We found only 6 cases. Claude Code's prompt-caching
|
|
242
243
|
docs say it does on the 5.5 models and Fable 5.1 with an API key or a subscription, and the router now prices it so.
|
|
243
244
|
- How many requests a turn needs on each model.
|
package/docs/configuration.md
CHANGED
|
@@ -10,7 +10,7 @@ The router works with its built-in defaults. Configure the key of the active cla
|
|
|
10
10
|
| Cloudflare API token | Sensitive plugin option `cloudflare_api_token` | The same dialog. Used by Clef and Clef Flash. |
|
|
11
11
|
| Cloudflare account ID | Plugin option `cloudflare_account_id` | The same dialog, or the config menu row. Not a secret. |
|
|
12
12
|
| OpenAI API key | Sensitive plugin option `openai_api_key` | The same dialog. Used only by the OpenAI classifier. Ollama needs no key. |
|
|
13
|
-
| Router settings and classifier | `router.json` in the active Claude Code profile | Edit the file directly, or use the pane's
|
|
13
|
+
| Router settings and classifier | `router.json` in the active Claude Code profile | Edit the file directly, or use the pane's Routes, Policy and Classifier tabs. |
|
|
14
14
|
| Anthropic credentials and API cost | Claude Code | The Mod leaves these to Claude Code. |
|
|
15
15
|
|
|
16
16
|
The active profile directory is `CLAUDE_CONFIG_DIR` when set. Otherwise it is `~/.claude`. The Mod does not need an Anthropic proxy URL, model alias, hint header, daemon, or custom status line.
|
|
@@ -109,16 +109,16 @@ An override for a cell with no built-in names both fields, or inherits the missi
|
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
- `effort: null` keeps the session effort, as in `routes`.
|
|
112
|
-
- A cell cannot be `null`. To drop a built-in override, set it to the base route, for example `"ops": { "medium": { "model": "opus", "effort": "medium" } }`. The pane writes this for you when you
|
|
112
|
+
- A cell cannot be `null`. To drop a built-in override, set it to the base route, for example `"ops": { "medium": { "model": "opus", "effort": "medium" } }`. The pane writes this for you when you press **Use tier model** on a built-in cell. The cell keeps that route if you later change the tier's route; drop it again then.
|
|
113
113
|
- An override applies to whatever the tier's route is. If you move `routes.low` to Opus, the built-in `code` override at `low` still runs Sonnet. Set it to match, or remove it.
|
|
114
114
|
- Unknown activities and tiers, unknown model aliases, and invalid efforts make the file invalid, like any other invalid setting. The pane refuses to save one and names it, such as `activities.code.low.model is not in models`.
|
|
115
|
-
- The
|
|
115
|
+
- The Routes tab counts the prompt caches the routes use: one per model on Opus 5.5, Sonnet 5.5, Haiku 5.5 and Fable 5.1, one per (model, effort) pair on a provider that caches each effort apart.
|
|
116
116
|
|
|
117
|
-
`policy.activityMass` (default `0.6`) is the lowest probability at which an activity applies. The
|
|
117
|
+
`policy.activityMass` (default `0.6`) is the lowest probability at which an activity applies. The Policy tab sets it under **Activities**, from 50% to 80%. It has not been tuned on any classifier, and the probe results do not record probabilities, so there is no data to tune it on yet.
|
|
118
118
|
|
|
119
|
-
Switch the mode with `/router activities off|shadow|on`, or with the **Activity routing** selector at the top of the
|
|
119
|
+
Switch the mode with `/router activities off|shadow|on`, or with the **Activity routing** selector at the top of the Routes tab. The command writes `router.json` at once; the selector joins the routing draft and writes on **Save**. Choosing `on`, the default, removes the key from the file.
|
|
120
120
|
|
|
121
|
-
**Upgrade from 1.6.** 1.6 defaulted to `shadow` with Sonnet at `medium` in every override. A file without `activityRouting` now runs `on`; a file that sets it keeps its mode. Choosing `shadow` in 1.6 removed the key, because `shadow` was the default then: if you chose `shadow` in 1.6, run `/router activities shadow` again after upgrading. A session started on Sonnet 5.5 now starts with routing on, because Sonnet runs the `code` cell at `low`; to stay on Sonnet in that session, choose it with `/model` or run `/router off`, and run `/router activities shadow` to make future Sonnet sessions start with routing off. Cells you saved stay as written. A cell that sets one field takes the other from 1.7's built-in for that cell, or from the base route where 1.7 has none (`explore` and `docs` at `medium`, `docs` at `low`). 1.6's overrides in those cells and in `ops` at `medium` were Sonnet · medium, so such a cell can now run another model or effort; write both fields to keep 1.6's route. A 1.6 removal of a built-in that 1.7 no longer has, such as `docs` at `low`, stays in the file as the tier's route; the
|
|
121
|
+
**Upgrade from 1.6.** 1.6 defaulted to `shadow` with Sonnet at `medium` in every override. A file without `activityRouting` now runs `on`; a file that sets it keeps its mode. Choosing `shadow` in 1.6 removed the key, because `shadow` was the default then: if you chose `shadow` in 1.6, run `/router activities shadow` again after upgrading. A session started on Sonnet 5.5 now starts with routing on, because Sonnet runs the `code` cell at `low`; to stay on Sonnet in that session, choose it with `/model` or run `/router off`, and run `/router activities shadow` to make future Sonnet sessions start with routing off. Cells you saved stay as written. A cell that sets one field takes the other from 1.7's built-in for that cell, or from the base route where 1.7 has none (`explore` and `docs` at `medium`, `docs` at `low`). 1.6's overrides in those cells and in `ops` at `medium` were Sonnet · medium, so such a cell can now run another model or effort; write both fields to keep 1.6's route. A 1.6 removal of a built-in that 1.7 no longer has, such as `docs` at `low`, stays in the file as the tier's route; its cell on the Routes tab says "same as the tier’s model: no effect", and **Use tier model** drops it.
|
|
122
122
|
|
|
123
123
|
**Rollback.** To go back to 1.6 behavior without downgrading, set `"activityRouting": "shadow"`, or `off`. Router 1.6 reads the same keys; under 1.6 a file without `activityRouting` runs `shadow` with 1.6's overrides. Router 1.5 rejects unknown keys and makes routing unavailable. Before you install 1.5 again, remove `activities`, `activityRouting`, and `policy.activityMass` from `router.json`. The pane writes them when you set the mode to `off` or `shadow`, change the activity threshold, or edit or remove an override.
|
|
124
124
|
|
|
@@ -274,7 +274,7 @@ Policy defaults:
|
|
|
274
274
|
| `cashCapUsd` | `2` | Maximum estimated cold cache write for a `credits` model. It does not cap output or session spend. |
|
|
275
275
|
| `activityMass` | `0.6` | Minimum probability for the classifier's activity to apply. Not tuned on any classifier. |
|
|
276
276
|
|
|
277
|
-
The pane writes a subset of these settings. The **
|
|
277
|
+
The pane writes a subset of these settings. The **Routes** and **Policy** tabs set `routes`, `activities`, `activityRouting`, `baselineTier`, `policy.downgradeVotes`, `policy.downgradeHorizonTurns`, `policy.cashCapUsd`, and `policy.activityMass` in one save: it writes only values that differ from the defaults and removes the rest. `/router activities <mode>` writes `activityRouting` at once, with **Undo**. The **Classifier** tab sets `classifier` and the active classifier's `timeoutMs` at once. **Undo** reverts the settings the last pane write changed. Each save validates the whole file, keeps other keys, and applies from the next turn. A failed check names the setting and leaves the file unchanged. The pane refuses to write through a symlink. Model aliases and the other settings require a direct edit.
|
|
278
278
|
|
|
279
279
|
Opus 5.5, Sonnet 5.5, Haiku 5.5 and Fable 5.1 keep one prompt cache across effort levels, so the policy prices an effort-only move, such as Opus at `medium` to Opus at `high`, as no cache write. On Amazon Bedrock, Google Cloud, Microsoft Foundry, a custom `ANTHROPIC_BASE_URL`, or with `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS`, each effort has its own cache and the move pays its write. A HIPAA configuration cannot be detected; the router then prices those moves as free.
|
|
280
280
|
|
package/docs/native-router.md
CHANGED
|
@@ -29,24 +29,24 @@ Mode belongs to a Claude Code session. Clear starts a new session with routing o
|
|
|
29
29
|
|
|
30
30
|
## Router pane
|
|
31
31
|
|
|
32
|
-
The status band is one line above the prompt: a tier meter, the activity, the route, a short reason, classifier support, and context and cache use. Segments drop by priority when the band is narrow: classifier support first, then context and cache, then the activity, then the reason. Hovering reveals pins, **Turn off**, and a two-row view; while routing is off, **Turn on** sits on the band itself, so the band carries one routing control at a time. A fresh session that starts with routing off because of its model shows `<model> is not a routing tier` on the band until the mode changes. The band yields to surveys. In a subagent's transcript it reads `subagent model chosen at spawn`, or `subagents keep their own model` with subagent routing off or in shadow. A model change between turns raises a toast. A pin, or a step that changes only the effort, such as `medium` to `high` on the defaults, raises none. While the classifier runs, the turn's spinner says `Choosing model`. In Manual mode or when routing is unavailable, the prompt footer carries `routing off` or `routing unavailable`. The **Router** button opens the pane. The pane has
|
|
32
|
+
The status band is one line above the prompt: a tier meter, the activity, the route, a short reason, classifier support, and context and cache use. Segments drop by priority when the band is narrow: classifier support first, then context and cache, then the activity, then the reason. Hovering reveals pins, **Turn off**, and a two-row view; while routing is off, **Turn on** sits on the band itself, so the band carries one routing control at a time. A fresh session that starts with routing off because of its model shows `<model> is not a routing tier` on the band until the mode changes. The band yields to surveys. In a subagent's transcript it reads `subagent model chosen at spawn`, or `subagents keep their own model` with subagent routing off or in shadow. A model change between turns raises a toast. A pin, or a step that changes only the effort, such as `medium` to `high` on the defaults, raises none. While the classifier runs, the turn's spinner says `Choosing model`. In Manual mode or when routing is unavailable, the prompt footer carries `routing off` or `routing unavailable`. The **Router** button opens the pane. The pane has five tabs, Now, Routes, Policy, Classifier, and Usage, under one line with the routing on/off pair and the classifier state. The [user guide](user-guide.md#open-the-router-pane) describes each tab.
|
|
33
33
|
|
|
34
34
|
| Reading | Meaning and limits |
|
|
35
35
|
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
36
|
-
|
|
|
37
|
-
| Classifier support | Per-tier probabilities from the last classification
|
|
38
|
-
| Activity | The classifier's activity choice with its share
|
|
39
|
-
|
|
|
40
|
-
|
|
|
36
|
+
| Next turn / Served | The requested model and effort, with the tier's own model beside an activity override. **Served** appears only when the engine answered with another model. Actual effort is not reported. |
|
|
37
|
+
| Classifier support | Per-tier probabilities from the last classification; under **Why**, the support for the switch against the bar the policy required, and the switch cost. Pins and skipped calls leave it empty. |
|
|
38
|
+
| Activity | The classifier's activity choice as a verb with its share, the two next-best answers, and the threshold at which an activity applies; `uncertain` shown dim. Empty with routing off, a pin, or no answer. |
|
|
39
|
+
| Shadow (activity) | With `shadow`: what `on` would use, and the route in use (`shadow; same route` when they agree). |
|
|
40
|
+
| Last replies | The tier that served each of the last 30 main-conversation replies, a dot where the router did not choose, the model switches between them, and the replies per tier and per activity. |
|
|
41
41
|
| Routing vs your model (Usage) | Routed replies at configured list prices against the same tokens on your model (the model `/model` selects now, at the session effort; after a `/model` change, the whole session against the new one), this session and since the last reset (each reply against the model selected when it ran); the session against the other configured models; the difference split into cheaper models, stronger than yours, and cache writes from switches. `too early` below 10 replies. Output length is held the same; answer quality is not measured. |
|
|
42
|
-
|
|
|
43
|
-
| Across sessions (
|
|
42
|
+
| By activity (Usage) | Counts for this session: turns, requests and share per activity, its `est. cost` at configured list prices (`—` unless every reply had a price) and the route it was `mostly on`; switches by tier and by activity, and activity moves refused in `on`; tool agreement; in `shadow`, turns `on` would route differently with their summed next-request estimate at configured list prices. |
|
|
43
|
+
| Across sessions (Classifier) | The counts kept since the last reset: labelled turns, tool agreement on the classifier's raw answer, overall and for `code`, `ops` and `explore`, the two largest mismatches, activity moves inside a tier taken and refused, escalations after a cheaper activity move, and the shadow readout. The active classifier's p95 latency shows on its **Deadline** line. `/router` text shows the agreement. |
|
|
44
44
|
| Cost | Claude Code's native usage value. A plan's list-price estimates are not subscription cash charges. |
|
|
45
45
|
| Context bar | Maximum available observed and local estimated context, compared with the routed model's window. The fit rule reserves 20%. |
|
|
46
|
-
| Observed / estimated input | Claude's local context reading and the router's best current context estimate. `unknown` blocks a move to a smaller window.
|
|
46
|
+
| Observed / estimated input | Under **details** on Usage: Claude's local context reading and the router's best current context estimate. `unknown` blocks a move to a smaller window. |
|
|
47
47
|
| Cache reuse | Last response's cache-read tokens divided by its reported input counters. |
|
|
48
48
|
| Cache read / written; Output | Response usage counters. Cache warmth does not prove a particular TTL. |
|
|
49
|
-
| Input per reply |
|
|
49
|
+
| Input per reply | Under **details** on Usage: up to 30 observed main-conversation input sizes, scaled from the lowest to the highest reading. |
|
|
50
50
|
| Classifier header | Active classifier state and elapsed time. Missing-key, missing-account, busy, and paused skips have no network latency reading. |
|
|
51
51
|
| Next-turn difference | Configured-price range for the suggested tier versus the incumbent on the next request. Negative means estimated lower cost. |
|
|
52
52
|
| Conservative payback | Conditional later-turn estimate based on configured cache prices, future reads, and the last output size. It is not measured savings. |
|
|
@@ -56,7 +56,7 @@ The router keeps no bill. Routing vs your model is a configured-price estimate,
|
|
|
56
56
|
|
|
57
57
|
## Routing and classifier settings
|
|
58
58
|
|
|
59
|
-
The
|
|
59
|
+
The Routes tab edits each tier's model alias and effort, the activity overrides and mode; the Policy tab edits the baseline tier and four policy controls. Both share one draft. The draft does not affect the active turn, survives a tab change or closing the pane, and is dropped at a new session. **Save** validates the whole file with the same loader the Mod starts with, writes `router.json` for future turns, and keeps unrelated keys. A route, activity override, or policy value equal to the built-in default is removed from the file, so later default changes still reach it. The Classifier tab writes the classifier choice and its deadline at once, and shows each classifier's last checked-in activity probe on the model it ran, from `lib/probe-results.mjs`, as columns beside its host and status. **Undo** reverts the settings the last pane write changed, from any tab, until the next write or a new session.
|
|
60
60
|
|
|
61
61
|
| Control | Values in the pane | Effect |
|
|
62
62
|
| ------------------ | ---------------------------------- | ---------------------------------------------------------------------------------------- |
|
|
@@ -66,9 +66,9 @@ The Routing tab edits each tier's model alias and effort, the baseline tier, the
|
|
|
66
66
|
| Credits cap | $0.50, $1, $2, $5 | Largest estimated cold write on a `credits` model. |
|
|
67
67
|
| Activity threshold | 50%, 60%, 70%, 80% | `policy.activityMass`: the least probability at which an activity applies. |
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
The Routes tab starts with the **Activity routing** selector, `off · shadow · on`, and a hint for the mode, and a yellow line when the overrides do not run: activity routing is `shadow` or `off`, routing is off, or routing is unavailable. Below it is one grid of the draft: a column per tier, the **every turn** row with each tier's own route, and a row per activity whose cells show the route it runs (`models key·effort`, such as `sonnet·high`), `·` for the tier's route, `°` for a built-in default, and **●** for an unsaved edit. Each cell is a plain Button; selecting one opens its editor under the grid: a model and an effort Select, the cell's state, **Use tier model** to drop an override, and **Restore default** for a changed or dropped built-in one. A dropped built-in override is saved as the tier's own route, because a file that only omitted it would get the built-in back. Yellow notes flag a cell stronger than the tier above, and the only cell on its cache, which adds one; a cell equal to its tier's route but saved in the file says `no effect`. A line counts the prompt caches the routes use, one per model where efforts share a cache and one per (model, effort) pair where they do not, counting only tier routes until the mode is `on`, and another flags two neighbouring tiers with the same route. **Reset routes to defaults** resets the tier routes and the baseline tier; pending override and mode edits stay in the draft. The Policy tab writes each control inside its sentence and names the default beside a changed value, and ends with the `subagentRouting` mode, which is set in `router.json`. The Usage tab's **BY ACTIVITY** table adds each activity's `est. cost`, its replies at list prices, and the route it was `mostly on`; the Classifier tab's **ACROSS SESSIONS** adds the escalations after a cheaper activity move. The Usage tab's **Reset stats** clears the activity counts and routing vs your model, for this session and across sessions.
|
|
70
70
|
|
|
71
|
-
The
|
|
71
|
+
The Classifier tab lists every configured classifier as a row with its service host (`this machine` for a local one), its activity probe and p95 wait, and whether its key and endpoint settings are complete. Selecting a row writes `classifier` to `router.json` at once, or removes it for the default, through the same validation, and resets the new classifier's failure count. A turn already being classified finishes with its own classifier; its readings stay off the pane. **Undo** returns to the previous classifier. The deadline saves at once too, and a built-in classifier's default deadline is written as no override. **Sends** names the host that receives prompt text. The **Deadline** line shows the active classifier's p95 wait across sessions, or its probe's before any turn, in yellow when it is slower than the deadline.
|
|
72
72
|
|
|
73
73
|
The pane refuses to write through a symlink. A failed validation names the setting and leaves the file unchanged. New model aliases and the other supported fields need an edit to the active profile's `router.json`.
|
|
74
74
|
|
|
@@ -1,74 +1,93 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 672 591" role="img" aria-labelledby="title desc">
|
|
2
2
|
<title id="title">Router pane, Classifier tab</title>
|
|
3
|
-
<desc id="desc">
|
|
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="
|
|
9
|
-
<rect x="10" y="10" width="
|
|
8
|
+
<rect width="672" height="591" rx="8" fill="#1c1c1c"/>
|
|
9
|
+
<rect x="10" y="10" width="652" height="571" rx="6" fill="none" stroke="#3f5f8f"/>
|
|
10
10
|
<text x="24.0" y="34" fill="#5fafd7" font-weight="700" xml:space="preserve">ROUTING</text>
|
|
11
11
|
<rect x="94.2" y="20" width="62.4" height="18" rx="4" fill="#87afff"/>
|
|
12
12
|
<text x="94.2" y="34" fill="#0d1016" font-weight="700" xml:space="preserve">[ ◉ on ]</text>
|
|
13
13
|
<rect x="164.4" y="20" width="70.2" height="18" rx="4" fill="#2e3340"/>
|
|
14
14
|
<text x="164.4" y="34" fill="#d0d0d0" xml:space="preserve">[ ○ off ]</text>
|
|
15
|
-
<text x="
|
|
16
|
-
<
|
|
17
|
-
<
|
|
18
|
-
<
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
<
|
|
22
|
-
<
|
|
23
|
-
<
|
|
24
|
-
<
|
|
25
|
-
<
|
|
26
|
-
<
|
|
27
|
-
<text x="
|
|
28
|
-
<text x="
|
|
29
|
-
<text x="
|
|
30
|
-
<
|
|
31
|
-
<
|
|
32
|
-
<text x="
|
|
33
|
-
<text x="
|
|
34
|
-
<
|
|
35
|
-
<text x="
|
|
36
|
-
<text x="
|
|
37
|
-
<rect x="
|
|
38
|
-
<text x="
|
|
39
|
-
<
|
|
40
|
-
<text x="
|
|
41
|
-
<text x="
|
|
42
|
-
<
|
|
43
|
-
<text x="
|
|
44
|
-
<text x="
|
|
45
|
-
<
|
|
46
|
-
<text x="24.0" y="
|
|
47
|
-
<
|
|
48
|
-
<text x="
|
|
49
|
-
<text x="
|
|
50
|
-
<text x="
|
|
51
|
-
<rect x="
|
|
52
|
-
<text x="
|
|
53
|
-
<text x="
|
|
54
|
-
<
|
|
55
|
-
<text x="
|
|
56
|
-
<text x="
|
|
57
|
-
<
|
|
58
|
-
<text x="
|
|
59
|
-
<
|
|
60
|
-
<text x="
|
|
61
|
-
<text x="
|
|
62
|
-
<text x="
|
|
63
|
-
<text x="
|
|
64
|
-
<text x="
|
|
65
|
-
<
|
|
66
|
-
<text x="
|
|
67
|
-
<text x="
|
|
68
|
-
<text x="24.0" y="
|
|
69
|
-
<text x="
|
|
70
|
-
<
|
|
71
|
-
<text x="
|
|
72
|
-
<
|
|
73
|
-
<text x="
|
|
15
|
+
<text x="250.2" y="34" fill="#87d787" xml:space="preserve">Clef Flash ready</text>
|
|
16
|
+
<rect x="24.0" y="39" width="54.6" height="18" rx="4" fill="#2e3340"/>
|
|
17
|
+
<text x="24.0" y="53" fill="#d0d0d0" xml:space="preserve">[ Now ]</text>
|
|
18
|
+
<rect x="86.4" y="39" width="78.0" height="18" rx="4" fill="#2e3340"/>
|
|
19
|
+
<text x="86.4" y="53" fill="#d0d0d0" xml:space="preserve">[ Routes ]</text>
|
|
20
|
+
<rect x="172.2" y="39" width="78.0" height="18" rx="4" fill="#2e3340"/>
|
|
21
|
+
<text x="172.2" y="53" fill="#d0d0d0" xml:space="preserve">[ Policy ]</text>
|
|
22
|
+
<rect x="258.0" y="39" width="109.2" height="18" rx="4" fill="#87afff"/>
|
|
23
|
+
<text x="258.0" y="53" fill="#0d1016" font-weight="700" xml:space="preserve">[ Classifier ]</text>
|
|
24
|
+
<rect x="375.0" y="39" width="70.2" height="18" rx="4" fill="#2e3340"/>
|
|
25
|
+
<text x="375.0" y="53" fill="#d0d0d0" xml:space="preserve">[ Usage ]</text>
|
|
26
|
+
<rect x="453.0" y="39" width="39.0" height="18" rx="4" fill="#2e3340"/>
|
|
27
|
+
<text x="453.0" y="53" fill="#d0d0d0" xml:space="preserve">[ ? ]</text>
|
|
28
|
+
<text x="24.0" y="91" fill="#5fafd7" font-weight="700" xml:space="preserve">CLASSIFIER</text>
|
|
29
|
+
<text x="102.0" y="91" fill="#7c7c7c" xml:space="preserve"> · asked once per new turn · a pick saves at once</text>
|
|
30
|
+
<text x="24.0" y="110" fill="#7c7c7c" xml:space="preserve"> prompt goes to probe p95 status</text>
|
|
31
|
+
<rect x="24.0" y="115" width="124.8" height="18" rx="4" fill="#2e3340"/>
|
|
32
|
+
<text x="24.0" y="129" fill="#d0d0d0" xml:space="preserve">[ ○ Jev ]</text>
|
|
33
|
+
<text x="156.6" y="129" fill="#7c7c7c" xml:space="preserve">api.typesafe.ai</text>
|
|
34
|
+
<text x="320.4" y="129" fill="#d0d0d0" xml:space="preserve">70/70</text>
|
|
35
|
+
<text x="382.8" y="129" fill="#d0d0d0" xml:space="preserve">299 ms</text>
|
|
36
|
+
<text x="460.8" y="129" fill="#d7af5f" xml:space="preserve">○ no API key </text>
|
|
37
|
+
<rect x="570.0" y="115" width="78.0" height="18" rx="4" fill="#2e3340"/>
|
|
38
|
+
<text x="570.0" y="129" fill="#d0d0d0" xml:space="preserve">[ Set up ]</text>
|
|
39
|
+
<rect x="24.0" y="134" width="124.8" height="18" rx="4" fill="#2e3340"/>
|
|
40
|
+
<text x="24.0" y="148" fill="#d0d0d0" xml:space="preserve">[ ○ Clef ]</text>
|
|
41
|
+
<text x="156.6" y="148" fill="#7c7c7c" xml:space="preserve">api.cloudflare.com</text>
|
|
42
|
+
<text x="320.4" y="148" fill="#d0d0d0" xml:space="preserve">69/70</text>
|
|
43
|
+
<text x="382.8" y="148" fill="#d0d0d0" xml:space="preserve">883 ms</text>
|
|
44
|
+
<text x="460.8" y="148" fill="#87d787" xml:space="preserve">● ready</text>
|
|
45
|
+
<rect x="24.0" y="153" width="124.8" height="18" rx="4" fill="#87afff"/>
|
|
46
|
+
<text x="24.0" y="167" fill="#0d1016" font-weight="700" xml:space="preserve">[ ◉ Clef Flash ]</text>
|
|
47
|
+
<text x="156.6" y="167" fill="#7c7c7c" xml:space="preserve">api.cloudflare.com</text>
|
|
48
|
+
<text x="320.4" y="167" fill="#d0d0d0" xml:space="preserve">69/70</text>
|
|
49
|
+
<text x="382.8" y="167" fill="#d0d0d0" xml:space="preserve">874 ms</text>
|
|
50
|
+
<text x="460.8" y="167" fill="#87d787" xml:space="preserve">● ready</text>
|
|
51
|
+
<rect x="24.0" y="172" width="124.8" height="18" rx="4" fill="#2e3340"/>
|
|
52
|
+
<text x="24.0" y="186" fill="#d0d0d0" xml:space="preserve">[ ○ OpenAI ]</text>
|
|
53
|
+
<text x="156.6" y="186" fill="#7c7c7c" xml:space="preserve">api.openai.com</text>
|
|
54
|
+
<text x="320.4" y="186" fill="#d0d0d0" xml:space="preserve">70/70</text>
|
|
55
|
+
<text x="382.8" y="186" fill="#d0d0d0" xml:space="preserve">286 ms</text>
|
|
56
|
+
<text x="460.8" y="186" fill="#d7af5f" xml:space="preserve">○ no API key </text>
|
|
57
|
+
<rect x="570.0" y="172" width="78.0" height="18" rx="4" fill="#2e3340"/>
|
|
58
|
+
<text x="570.0" y="186" fill="#d0d0d0" xml:space="preserve">[ Set up ]</text>
|
|
59
|
+
<rect x="24.0" y="191" width="124.8" height="18" rx="4" fill="#2e3340"/>
|
|
60
|
+
<text x="24.0" y="205" fill="#d0d0d0" xml:space="preserve">[ ○ Ollama ]</text>
|
|
61
|
+
<text x="156.6" y="205" fill="#87d787" xml:space="preserve">this machine</text>
|
|
62
|
+
<text x="320.4" y="205" fill="#d0d0d0" xml:space="preserve">66/70</text>
|
|
63
|
+
<text x="382.8" y="205" fill="#d0d0d0" xml:space="preserve">3483 ms</text>
|
|
64
|
+
<text x="460.8" y="205" fill="#87d787" xml:space="preserve">● ready</text>
|
|
65
|
+
<text x="24.0" y="224" fill="#7c7c7c" xml:space="preserve"> probe: test prompts with a known activity it answered right, and its p95 wait</text>
|
|
66
|
+
<text x="24.0" y="262" fill="#5fafd7" font-weight="700" xml:space="preserve">CLEF FLASH</text>
|
|
67
|
+
<text x="102.0" y="262" fill="#7c7c7c" xml:space="preserve"> · active</text>
|
|
68
|
+
<text x="24.0" y="281" fill="#d0d0d0" xml:space="preserve">Deadline</text>
|
|
69
|
+
<text x="117.6" y="281" fill="#d0d0d0" xml:space="preserve">3000 ms ▾</text>
|
|
70
|
+
<text x="211.2" y="281" fill="#7c7c7c" xml:space="preserve">p95 874 ms in its probe</text>
|
|
71
|
+
<text x="24.0" y="300" fill="#7c7c7c" xml:space="preserve"> past the deadline the turn keeps its model</text>
|
|
72
|
+
<text x="24.0" y="319" fill="#d0d0d0" xml:space="preserve">Sends</text>
|
|
73
|
+
<text x="117.6" y="319" fill="#d0d0d0" xml:space="preserve">prompt + 6 recent turns → api.cloudflare.com</text>
|
|
74
|
+
<text x="24.0" y="338" fill="#d0d0d0" xml:space="preserve">Health</text>
|
|
75
|
+
<text x="117.6" y="338" fill="#d0d0d0" xml:space="preserve">not paused</text>
|
|
76
|
+
<text x="195.6" y="338" fill="#d0d0d0" xml:space="preserve"> · 0 recent failures</text>
|
|
77
|
+
<text x="24.0" y="357" fill="#d0d0d0" xml:space="preserve">Credentials</text>
|
|
78
|
+
<rect x="117.6" y="343" width="62.4" height="18" rx="4" fill="#2e3340"/>
|
|
79
|
+
<text x="117.6" y="357" fill="#d0d0d0" xml:space="preserve">[ Edit ]</text>
|
|
80
|
+
<text x="180.0" y="357" fill="#7c7c7c" xml:space="preserve"> opens /plugin configure</text>
|
|
81
|
+
<text x="24.0" y="395" fill="#5fafd7" font-weight="700" xml:space="preserve">ACROSS SESSIONS · since the last reset</text>
|
|
82
|
+
<text x="24.0" y="414" fill="#d0d0d0" xml:space="preserve">Labelled 83 turns</text>
|
|
83
|
+
<text x="24.0" y="433" fill="#d0d0d0" xml:space="preserve">Agreement classifier vs tools: 78 of 83 turns (94%)</text>
|
|
84
|
+
<text x="24.0" y="452" fill="#d0d0d0" xml:space="preserve">Code/ops/explore classifier vs tools: 78 of 83 turns (94%)</text>
|
|
85
|
+
<text x="24.0" y="471" fill="#d0d0d0" xml:space="preserve">Mismatch code → read 4 · ops → code 1</text>
|
|
86
|
+
<text x="24.0" y="490" fill="#d0d0d0" xml:space="preserve">Activity moves 9 taken · 4 refused</text>
|
|
87
|
+
<text x="24.0" y="509" fill="#d0d0d0" xml:space="preserve">Escalations after a cheaper activity move: 0 in 7 moves</text>
|
|
88
|
+
<text x="24.0" y="547" fill="#87d787" xml:space="preserve">Saved: classifier Clef → Clef Flash. Applies from the next turn. </text>
|
|
89
|
+
<rect x="538.8" y="533" width="62.4" height="18" rx="4" fill="#2e3340"/>
|
|
90
|
+
<text x="538.8" y="547" fill="#d0d0d0" xml:space="preserve">[ Undo ]</text>
|
|
91
|
+
<rect x="24.0" y="552" width="70.2" height="18" rx="4" fill="#2e3340"/>
|
|
92
|
+
<text x="24.0" y="566" fill="#d0d0d0" xml:space="preserve">[ Close ]</text>
|
|
74
93
|
</svg>
|