@alexeiled/claude-router 1.14.0 → 1.16.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 +61 -0
- package/README.md +4 -1
- package/docs/architecture.md +17 -3
- package/docs/configuration.md +6 -2
- package/docs/evaluation.md +15 -11
- package/docs/native-router.md +2 -0
- package/docs/router-band.svg +30 -8
- package/docs/router-pane-now.svg +133 -131
- package/docs/router-pane-policy.svg +47 -43
- package/docs/routing-modes.md +143 -0
- package/docs/user-guide.md +17 -2
- package/hooks/native-router.mjs +428 -36
- package/lib/activity-stats.mjs +33 -11
- package/lib/activity.mjs +12 -6
- package/lib/band.mjs +8 -1
- package/lib/config.mjs +72 -17
- package/lib/cost.mjs +3 -0
- package/lib/decisions.mjs +252 -0
- package/lib/display.mjs +46 -5
- package/lib/facts.mjs +125 -4
- package/lib/modes.mjs +98 -0
- package/lib/panel.mjs +41 -3
- package/lib/policy.mjs +7 -4
- package/lib/route.mjs +84 -26
- package/lib/savings.mjs +17 -0
- package/lib/usage.mjs +31 -19
- package/package.json +2 -1
- package/types/index.d.ts +15 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "router",
|
|
3
3
|
"displayName": "Router",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.16.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,66 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.16.0 (2026-10-28)
|
|
4
|
+
|
|
5
|
+
Routing is now explainable after the fact, task notifications route as progress on the task they report on, and `cost` mode moves a hard task off Haiku. See [Routing decisions](docs/user-guide.md#routing-decisions) and [Changes during a task](docs/user-guide.md#changes-during-a-task).
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Every routed turn records its routing decisions in `$.store` (`decisions:v1:<session id>`): the prompt's origin, the classifier's tier and activity with their shares, whether the turn counted as the running task, the tier, activity, route and reason chosen, and at the end the turn's tool bucket and how many of its replies were priced. No prompt, tool or path text. `/router decisions [n]` prints them. Each session keeps 60 rows; other sessions' records stay for 30 days, 20 at most. **Delete history** deletes them.
|
|
10
|
+
- Routed replies the usage record leaves out are counted by cause (no usage, no configured price, unknown cache lifetime, failed comparison) in the activity metrics. The Classifier tab's **ACROSS SESSIONS** block and `/router` show **Unpriced**. Before, such replies left no trace, and a session whose replies were all unpriced had no usage record.
|
|
11
|
+
- The band shows `effort only` beside the mode when `cost` or `quality` kept the cell's model and changed only its effort. The cost estimates price the same tokens on both routes, so such a change shows no difference there.
|
|
12
|
+
- The tool check behind activity agreement has two more buckets: `shell` for a Bash command that writes a file (a redirect, `tee`, `sed -i`, `perl -i`, `patch`, `git apply`), a candidate for code, docs or routine work, and `check` for a turn that only ran checks and reads. A review that ran the tests and an edit made through the shell no longer count as misses. Routing reads both as `ops`, as before.
|
|
13
|
+
- The `router decision` debug line names the prompt's origin.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- The router reads where each prompt came from (`prompt.submit`'s origin). A task notification, an observer's report or a programmatic follow-up is now always progress on the running task. The classifier is asked about your last request, with the notification as the newest dialogue line, instead of about the notification's text. A cheaper route still waits for the checkpoint. After a resume, until you send a prompt, a notification is asked about as it reads.
|
|
18
|
+
- A cheaper route on the same task waits for a checkpoint that fits the work the route runs for, not only a passed test, build or lint run. Without a passed check, `ops` needs the last command to have succeeded with no edit or delegation since; `docs` needs a successful doc-only edit with no command beside it; `explore`, `plan` and `review` need a finished turn that changed, ran and delegated nothing and ended without a tool error. `code`, `debug` and a route with no activity still need the passed check. A check that failed, or ran in a form whose status is not its own (`npm test && git push`, `npm test > log`, `npm test | tail`, the background), blocks every one of these. The band's held reason now reads `… down after a checkpoint`.
|
|
19
|
+
- `cost` upgrades on balanced's bar: `modes.cost.policy.upgradeVotes` 3 → 2 and `upgradeBase` 0.85 → 0.75. With the old values the cache write of a cold stronger model raised the bar to about 0.92 from 60k tokens and 0.97 at 250k, so a cost turn on Haiku kept a task the classifier scored hard at 90% through any number of answers. Cost still moves down sooner than balanced. This spends more on hard tasks in cost mode; it is not tuned on outcomes.
|
|
20
|
+
|
|
21
|
+
### Known limitations
|
|
22
|
+
|
|
23
|
+
- The active goal a notification is judged against is held in memory, for the session: it is not kept across a resume or a plugin reload.
|
|
24
|
+
- A prompt is matched to its turn by the engine's order of events and by its text. A turn the router cannot match records origin `unknown` and routes as before.
|
|
25
|
+
- The classifier still reads text only. The tool calls, errors and edits of a turn reach the policy (the observed move, repeated-failure escalation, the checkpoint), not the classifier.
|
|
26
|
+
- A `shell` turn agrees with every activity that may produce it, so the agreement check cannot catch a cheap route on code written through the shell.
|
|
27
|
+
|
|
28
|
+
### Migration
|
|
29
|
+
|
|
30
|
+
- No `router.json` change is needed. To keep the old cost upgrade bar, set `"modes": { "cost": { "policy": { "upgradeVotes": 3, "upgradeBase": 0.85 } } }`.
|
|
31
|
+
- An activity stats record holding the new `shell` or `check` buckets reads as empty in an older version. Agreement from before 1.16 is not comparable with agreement after it.
|
|
32
|
+
|
|
33
|
+
## 1.15.0 (2026-10-22)
|
|
34
|
+
|
|
35
|
+
A routing mode trades cost against answer quality without new routes: `cost`, `balanced` (the default, unchanged) or `quality`. See [Routing modes](docs/routing-modes.md).
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- `cost` takes the route of the tier below when its model has a lower input price, else one effort level less; `quality` one effort level more, else the route of the tier above. `micro` turns and pins keep the configured route. `docs/routing-modes.md` lists the route of every classifier tier and activity in each mode.
|
|
40
|
+
- Choose the mode for this session with `/router mode cost|balanced|quality` (`/router mode default` clears it; a resume keeps it), for a project with `{ "mode": "cost" }` in `.claude/router.json`, or for the profile with `"mode"` in `router.json` or **Mode** on the Policy tab. A project file with any other key is ignored with a notice.
|
|
41
|
+
- `modes.cost.policy` and `modes.quality.policy` replace those `policy` fields while that mode is active. The built-in values are not tuned on this router.
|
|
42
|
+
- The band, the Now tab and `/router` show the mode and its source, such as `cost (session)`; the prompt footer names a mode other than balanced.
|
|
43
|
+
- The routing decision at the start of each turn writes one `router decision` line to Claude Code's debug log: mode, source, the classifier's tier, the tier and reason chosen, and the route. Moves later in the turn write none.
|
|
44
|
+
|
|
45
|
+
### Changed
|
|
46
|
+
|
|
47
|
+
- The router keeps the route a turn ran instead of rebuilding it from `router.json`. A mode change, or a route edited mid-session, now reaches the request through the usual checks, not on the next request.
|
|
48
|
+
- A cheaper route inside the same tier on the same task now waits for `minDwellRequests` and a passed check, as a move to a cheaper tier does.
|
|
49
|
+
|
|
50
|
+
### Fixed
|
|
51
|
+
|
|
52
|
+
- The switching cost of two routes that share a prompt cache (one model at two efforts, on an API key or a subscription) is now zero, as the configuration docs said. The estimate charged the new tokens of the next request as a switch cost, though either route writes them. A cheaper effort on the same model was therefore refused on any measured history. In `balanced` a tier switch between such routes, such as Opus at `medium` and at `xhigh`, now needs only the base support (`upgradeBase`, `downgradeMass`); before, the bar rose with that estimate, up to about 0.82 on a cold cache.
|
|
53
|
+
|
|
54
|
+
### Known limitations
|
|
55
|
+
|
|
56
|
+
- The Policy tab shows the base policy bars; in `cost` or `quality` the band shows the bar actually in use, such as `Jev 46% < 85%`.
|
|
57
|
+
|
|
58
|
+
### Migration
|
|
59
|
+
|
|
60
|
+
- `router.json` needs no change: without `mode` it runs `balanced`.
|
|
61
|
+
- Usage records are version 2 under the same `usage:v1:<session id>` keys, with the mode in each cell. Records from before read as `balanced`. A session of an older version reads a version 2 record as empty and never deletes it. Going back to 1.14 and resuming a session that 1.15 recorded replaces that session's record with a new one: its 1.15 days are lost.
|
|
62
|
+
- A project's `.claude/router.json` can choose the mode for anyone who runs Claude Code there, with no trust prompt. It cannot change routes, models or the classifier; keep it out of a repo you share if the choice is yours alone.
|
|
63
|
+
|
|
3
64
|
## 1.14.0 (2026-10-14)
|
|
4
65
|
|
|
5
66
|
Subagents now show which model each agent ran on, who picked it, and for which period. See [Understand usage and estimates](docs/user-guide.md#understand-usage-and-estimates).
|
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@ sequenceDiagram
|
|
|
55
55
|
Mod-->>Dev: Status band and router pane
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
The active classifier labels each new logical turn, and the router checks the route again while the task runs: a turn labelled `ops` that edits code moves up to the `code` route at once, and a background classifier review every 4 requests can move the tier or the activity either way. A cheaper route on the same task waits for a dwell and a passed test, build or lint run. See [Changes during a task](docs/user-guide.md#changes-during-a-task). A local policy applies vote, context, failure, and cache-cost rules before the Mod changes the next step. Claude Code owns request construction, model credentials, tools, streaming, and the API cost ledger.
|
|
58
|
+
The active classifier labels each new logical turn, and the router checks the route again while the task runs: a turn labelled `ops` that edits code moves up to the `code` route at once, and a background classifier review every 4 requests can move the tier or the activity either way. A cheaper route on the same task waits for a dwell and a checkpoint its work can show: a passed test, build or lint run, or for commands, docs and read-only work the success the router can see. A task notification is routed as progress on your last request. `/router decisions` lists why each turn ran where it did. See [Changes during a task](docs/user-guide.md#changes-during-a-task). A local policy applies vote, context, failure, and cache-cost rules before the Mod changes the next step. Claude Code owns request construction, model credentials, tools, streaming, and the API cost ledger.
|
|
59
59
|
|
|
60
60
|
| Tier | Default model | Effort |
|
|
61
61
|
| -------- | ------------- | -------- |
|
|
@@ -77,6 +77,8 @@ Activity routing adds a second label: what the turn produces (`code`, `debug`, `
|
|
|
77
77
|
|
|
78
78
|
`/router activities off` stops asking and keeps the base routes. [Activity routing](docs/activity-routing.md) explains each cell and how to change it. The label is optional: on `uncertain` or a weak label the base route is used if the move passes the cache check, when the activity answer fails the running activity stays and the tier answer still applies, and when the classifier fails the running route stays. See [Route by activity](docs/user-guide.md#route-by-activity), and [Evaluation](docs/evaluation.md#activity-routing) for how it is checked. Its default overrides rest on published vendor results and a list-price replay of one developer's sessions, not measured savings.
|
|
79
79
|
|
|
80
|
+
A [routing mode](docs/routing-modes.md) trades cost against answer quality without new routes: `cost` takes a cheaper model or one effort level less where a turn allows it, `quality` one effort level more or the tier above, and `balanced`, the default, runs the routes as configured. Set it per session with `/router mode cost`, per project in `.claude/router.json`, or for the profile with `"mode"` in `router.json`.
|
|
81
|
+
|
|
80
82
|
## Install
|
|
81
83
|
|
|
82
84
|
You need Claude Code 2.1.289 or newer and credentials for one [supported classifier](#supported-classifiers).
|
|
@@ -117,6 +119,7 @@ npm run check && npm run typecheck && npm test && npm run validate && npm run te
|
|
|
117
119
|
- [Configuration](docs/configuration.md): classifiers and keys, the optional profile `router.json`, defaults, and migrations.
|
|
118
120
|
- [Architecture](docs/architecture.md): Mod event flow, state, safeguards, and runtime boundaries.
|
|
119
121
|
- [Activity routing](docs/activity-routing.md): the default matrix by activity, why each cell, and how to change or turn it off.
|
|
122
|
+
- [Routing modes](docs/routing-modes.md): `cost`, `balanced` and `quality`, where the mode comes from, and every decision per mode.
|
|
120
123
|
- [Native router details](docs/native-router.md): panel semantics, tuning, and accepted limits.
|
|
121
124
|
- [Evaluation](docs/evaluation.md): historical gateway results and the native shadow replay.
|
|
122
125
|
- [Changelog](CHANGELOG.md): user-visible changes by version.
|
package/docs/architecture.md
CHANGED
|
@@ -76,7 +76,7 @@ A logical turn is classified at its first step, and again every `reviewEveryRequ
|
|
|
76
76
|
|
|
77
77
|
Repeated tool-error escalation needs matching non-empty error output and an intervening edit attempt within a 40-message lookback. A bounded fingerprint covers the full output, not only the runner header. It removes ANSI colors, normalizes line endings, and normalizes source positions in stack frames and TAP `location` fields. TAP durations and Jest `✕ ... (N ms)` timings are also normalized. Other test names, case, whitespace, and numeric error values are kept. Unrecognized runner noise remains part of the signature: changed output can miss a repeat rather than trigger a false escalation.
|
|
78
78
|
|
|
79
|
-
An upgrade or downgrade needs a streak of supporting votes (`upgradeVotes`, `downgradeVotes`), because staying keeps a warm cache. A downgrade lands on the cheapest tier from the choice up to just below the incumbent whose mass at or below it, with its streak, clears that tier's bar: a split answer (micro 0.63, low 0.3) on `high` moves to `low` rather than waiting for `micro` alone, and a cold candidate can give way to a warm one in between, such as the same model at a lower effort. Before the first measured reply of a history (session start, clear, rewind, committed compaction), no cache from it exists yet, so one vote is enough. The mass bars, the cash gate, escalation and holds apply as usual. On the same task (`sameTaskOf`: a review inside a turn, or a prompt with advice `continuation` at or above `continuationMass`) an upgrade proceeds as usual, but a downgrade that has its votes stays as `downgrade-held` until `facts.downAllowed`: at least `minDwellRequests` requests since the last model change (`loop.switchedAt`), and
|
|
79
|
+
An upgrade or downgrade needs a streak of supporting votes (`upgradeVotes`, `downgradeVotes`), because staying keeps a warm cache. A downgrade lands on the cheapest tier from the choice up to just below the incumbent whose mass at or below it, with its streak, clears that tier's bar: a split answer (micro 0.63, low 0.3) on `high` moves to `low` rather than waiting for `micro` alone, and a cold candidate can give way to a warm one in between, such as the same model at a lower effort. Before the first measured reply of a history (session start, clear, rewind, committed compaction), no cache from it exists yet, so one vote is enough. The mass bars, the cash gate, escalation and holds apply as usual. On the same task (`sameTaskOf`: a review inside a turn, a turn whose prompt has a progress origin, or a prompt with advice `continuation` at or above `continuationMass`) an upgrade proceeds as usual, but a downgrade that has its votes stays as `downgrade-held` until `facts.downAllowed`: at least `minDwellRequests` requests since the last model change (`loop.switchedAt`), and a checkpoint since then (`completedSince`). The last verification command (`verifiedSince`: a Bash test, build, lint or type-check run) passing always counts. Without one, the running route's activity decides: for `ops` the last command that ran something succeeded with no edit or delegation since, for `docs` the last edit succeeded and touched only doc paths with no command run beside it, and for `explore`, `plan` and `review` a turn finished with nothing edited, written, run or delegated and no error as the last tool result. `code`, `debug` and a route with no activity need the passed check, and a check that ran in any form (chained, redirected, piped, after `;` or `||`, in the background) without passing last blocks every shortcut (`runsAnyCheck`). Each rule asks for a success it can see; the absence of an edit alone is never evidence.
|
|
80
80
|
|
|
81
81
|
A move to a smaller context window needs a main-response measurement from the current history and Claude's local context estimate. The router uses the larger available reading and reserves 20% of the model window. If it cannot establish fit, it keeps the current model with `context-unknown`. It does not infer token count from character count.
|
|
82
82
|
|
|
@@ -96,10 +96,24 @@ The router decides on a _cell_: a tier and an activity. The route is `{ ...route
|
|
|
96
96
|
|
|
97
97
|
**Observed move.** On each later step of the turn, `observedMove` reads the turn's tool calls since its prompt, or since the transcript snapshot of the last review applied inside the turn (`loop.observedFrom`), since the review already judged the earlier ones, (`observedActivity`: `code` after an edit to a non-doc file, `docs` after edits to doc files only, else `ops`, `read` or `talk`). When that activity's route at the decision's tier is stronger than the running one, the remaining steps take it, with reason `activity-up` and `lastActivity` set, so the next turn starts there. The tier is fitted to the context first, so the gates price the route that will run. It goes through `lateralMove` with probability 1: the tools are the evidence, so the switching tax never holds it back (the upgrade bar tops out near 0.9), and only the cash gate can. The turn's reply label (`turnActivities.label`) follows the move; the classifier's answer stays as recorded. It never moves down, and skips pinned turns and `off`. `canMoveUp` skips the transcript read when no activity's route at the tier is stronger, so a step on the strongest route costs nothing. A move to a smaller window waits for a measured context, as in `routeTurn`. Context fit and model availability then apply as for any continuation.
|
|
98
98
|
|
|
99
|
-
**Review inside a turn.** Every `reviewEveryRequests` requests after the last classifier answer (`loop.reviewedAt`, counted in `loop.requests`), `reviewMidTurn` reads the transcript and asks the active classifier in the background, with the turn's prompt and recent dialogue and `facts.midTurn` set. The step does not wait. The first step after the answer arrives runs `chooseRoute` on it, before the observed move, with only the advice taken from the review: the checkpoint, context and cache facts are read at that step. Tier and activity move by the same rules as a continuation prompt: up on votes, down only past `downAllowed`. A pinned turn, a failed read or ask, an answer without advice, and an answer about a replaced history (another `generation`) change nothing; turn completion and session end abort a review in flight. `observeResponse` counts each request and records the request and message count at which the served (model, effort) last changed (`switchedAt`), which the dwell and the verification window start from. A failed transcript read keeps the running route. A verification is a Bash command whose status is the check's: a checker (`pytest`, `tsc`, `eslint`, …) or a launcher whose subcommand names a check (`npm test`, `npm run lint`, `go test`, `make lint`, `uv run pytest`), alone or in an `&&` list. A pipeline, `;`, `||` or background job does not count, since its status can hide a failed check; neither do a `--version` or `--help` run, an option before the subcommand (`npm --prefix test install`), package names, paths and file names, nor a command Claude Code sent to the background, by request or after a timeout. The first response a loop serves also sets `switchedAt`, so checks from before the router chose a route do not count. When compaction or a rewind shortens the history, `prepareLoop` moves `switchedAt.messageCount` and `observedFrom` back to its end and keeps the request-based dwell.
|
|
99
|
+
**Review inside a turn.** Every `reviewEveryRequests` requests after the last classifier answer (`loop.reviewedAt`, counted in `loop.requests`), `reviewMidTurn` reads the transcript and asks the active classifier in the background, with the turn's prompt and recent dialogue and `facts.midTurn` set. The classifier reads text only: the dialogue holds user and assistant text, not tool calls, results or edits. The policy reads those itself (`observedMove`, repeated failures, `completedSince`). The step does not wait. The first step after the answer arrives runs `chooseRoute` on it, before the observed move, with only the advice taken from the review: the checkpoint, context and cache facts are read at that step. Tier and activity move by the same rules as a continuation prompt: up on votes, down only past `downAllowed`. A pinned turn, a failed read or ask, an answer without advice, and an answer about a replaced history (another `generation`) change nothing; turn completion and session end abort a review in flight. `observeResponse` counts each request and records the request and message count at which the served (model, effort) last changed (`switchedAt`), which the dwell and the verification window start from. A failed transcript read keeps the running route. A verification is a Bash command whose status is the check's: a checker (`pytest`, `tsc`, `eslint`, …) or a launcher whose subcommand names a check (`npm test`, `npm run lint`, `go test`, `make lint`, `uv run pytest`), alone or in an `&&` list. A pipeline, `;`, `||` or background job does not count, since its status can hide a failed check; neither do a `--version` or `--help` run, an option before the subcommand (`npm --prefix test install`), package names, paths and file names, nor a command Claude Code sent to the background, by request or after a timeout. The first response a loop serves also sets `switchedAt`, so checks from before the router chose a route do not count. When compaction or a rewind shortens the history, `prepareLoop` moves `switchedAt.messageCount` and `observedFrom` back to its end and keeps the request-based dwell.
|
|
100
100
|
|
|
101
101
|
At session start the incumbent is the session's model. `cellForModel` looks for it in the base routes, baseline first, and only with `activityRouting: on` in the activity overrides too, so a session that starts on an override route keeps its cell until the classifier says otherwise. The start mode uses the same lookup: with `on`, a start model that only an override uses (Sonnet 5.5 on the defaults) starts with routing on.
|
|
102
102
|
|
|
103
|
+
## Routing modes
|
|
104
|
+
|
|
105
|
+
The routing mode (`lib/modes.mjs`) is a fixed transform of the configured routes, applied before policy. At `turn.start` the hook resolves the mode (session override in `$.store` `routing-mode:<session id>`, then the project's `.claude/router.json`, then `mode` in the profile `router.json`, then `balanced`) and stores `applyMode(router.config, mode)` as the turn's config: every tier's and activity's route as `modeRoute` gives it, and `modes[mode].policy` over `policy`. Every later read of the turn (policy, escalation, cache keys, activity order, the request) uses that one table. `modeRoute` always starts from the configured routes, so a turn never steps from a route a mode already moved. `cost` takes the route of the tier below (never below `low`) when its model has a lower input price, else one listed effort level less; `quality` one listed effort level more, else the tier above's route. `micro` and pins keep the configured route.
|
|
106
|
+
|
|
107
|
+
**Route in use.** The loop keeps the route the last decision ran (`loop.route`, models key and effort) instead of rebuilding it from config. The incumbent's price, cache key and order come from it, and a decision that stays on the incumbent's cell keeps running it. So a mode change, or a route edit, reaches the request only through a gate: a tier switch, a taken lateral move, or a pin. A loop saved before 1.15 has no `loop.route` and rebuilds it once.
|
|
108
|
+
|
|
109
|
+
**Same-tier gate.** A mode can change the route without changing the tier or the activity. `lateralMove` therefore holds a cheaper route on the same task with `downgrade-held` until `facts.downAllowed` (dwell and a checkpoint), as a tier downgrade does, and the downgrade tax must still be paid back.
|
|
110
|
+
|
|
111
|
+
The turn-start decision (`decideTurn`) writes `router decision {mode, modeSource, origin, classified, tier, reason, route, pinned}` to the debug log (`$.ui.log`, `to: 'debug'`), with no prompt text, and the turn record, view and usage cells carry the mode.
|
|
112
|
+
|
|
113
|
+
**Prompt origin.** `turn.start` carries the prompt text but not its origin; `prompt.submit` carries `origin` (`PromptOrigin`), stamped by the engine. The hook keeps the kind (`originKind` in `lib/decisions.mjs`). An idle submission starts its turn inside `next(e)`, so that turn takes it; a submission queued behind a running turn waits (`queueOrigin`, at most 16 for at most 10 minutes) and names the later turn that starts with its text (`takeOrigin`), or expires when it was delivered into the running turn. Unmatched turns are `unknown` and route as before. A progress origin (`task-notification`, `observer`, `observer-activity`, `auto-continuation`) sets `facts.progress`, so the turn is the same task (`sameTaskOf`), and `progressInput` asks the classifier about the session's active goal, with the notification as the newest dialogue line. The goal is the last prompt from a goal origin (`composer`, `peer`, `plugin`, …), held in memory for the session only: after a resume or a reload a notification is asked about as it reads. `unclassified` and kinds a later engine adds route as before and leave the goal.
|
|
114
|
+
|
|
115
|
+
**Decision record.** Each routed turn collects rows (`decisionRow`): its start, each applied review, each observed move, at most 10 per turn (`addTurnRow`), and at `turn.complete` an end row (`endRow`) with the turn's tool bucket, routed requests, priced requests and unpriced ones by cause. `flushDecisions` adds them to the session's own `decisions:v1:<session id>` record (newest 60 rows) under the reset marker, like the usage records. Session start deletes other sessions' records past 30 days or beyond the 20 newest (`prunedDecisions`), each read again before its delete. Rows hold labels, shares and counts, never prompt, tool or path text. `/router decisions [n]` prints them; **Delete history** deletes them. `experiments/mod-router/scripts/trace-eval.mjs` replays the gateway trace once per mode at tier level; it cannot replay moves inside a tier.
|
|
116
|
+
|
|
103
117
|
## State and controls
|
|
104
118
|
|
|
105
119
|
`$.state` stores route decisions, response observations, and UI state for the active session. Version-checked writes reject stale turn results. A private in-memory view merges state writes during one dispatch because state reads are frozen for that dispatch.
|
|
@@ -113,7 +127,7 @@ When a turn completes, the Mod labels it from the tool calls the assistant made
|
|
|
113
127
|
Two stores hold counts:
|
|
114
128
|
|
|
115
129
|
- **Session**: `activityStats` in the view, reset when the session ends. It has turns, requests, tokens, the list price of priced replies with their count, and routed replies by `model@effort` per activity, switches by tier and by activity, lateral moves taken and refused, and tool agreement. The label counted per activity is the applied activity in `on`. Tool agreement compares the answer that cleared `activityMass`, so it measures the classifier in both modes. The view also keeps `strip`, every reply since Claude Code started the session by tier in at most 48 cells that merge in pairs, with when its first reply arrived, and `lastSwitch`, the last route change with its tiers, routes and activity.
|
|
116
|
-
- **Across sessions**: two `$.store` records per session. Each session's `activity:stats:v1:<session id>` holds a confusion matrix of the classifier's raw answer (including `uncertain` and `none`) against the observed bucket, run lengths per activity in five buckets, lateral switches taken and refused (from the decision's `lateral` field, so a hold or the cash gate counts), and `since`, its first count. A value with an unknown key or shape reads as empty; the `shadow` key that versions before 1.10.1 wrote is dropped on read and the rest is kept. Before 1.10.3 every session shared one `activity:stats:v1` key, read-modified-written each turn, so two sessions finishing turns together could lose a count and a stale write could undo a reset; that key now counts as one more record in the sum until **Delete history** deletes it, and 1.10.2 and earlier read only it. Each session's `activity:metrics:v1:<session id>` holds a classifier latency histogram per classifier id (22 buckets, at most 8 ids), the cheaper activity moves taken in `on` with the escalations that followed one, and `since`, its first reading; each part reads as empty on its own when its shape is wrong, as after a change of buckets. Both follow the usage records below: one writer per key, so sessions that finish turns at the same moment do not overwrite each other; this session's record held in memory and written after each turn that adds a count; the readout the sum of all records, latency kept to the first 8 classifier ids; and the same reset marker. Each record is bounded, and the records grow by one per session that recorded a count until **Delete history**. The view keeps the last sums read or written as `activityStore` and `activityMetrics`: read at session start and when the pane opens, replaced after each turn's write and after a reset. The open run is written when the session ends. **Delete history** clears the session counts, every stats and metrics record, and the usage records below.
|
|
130
|
+
- **Across sessions**: two `$.store` records per session. Each session's `activity:stats:v1:<session id>` holds a confusion matrix of the classifier's raw answer (including `uncertain` and `none`) against the observed bucket, run lengths per activity in five buckets, lateral switches taken and refused (from the decision's `lateral` field, so a hold or the cash gate counts), and `since`, its first count. A value with an unknown key or shape reads as empty; the `shadow` key that versions before 1.10.1 wrote is dropped on read and the rest is kept. Before 1.10.3 every session shared one `activity:stats:v1` key, read-modified-written each turn, so two sessions finishing turns together could lose a count and a stale write could undo a reset; that key now counts as one more record in the sum until **Delete history** deletes it, and 1.10.2 and earlier read only it. Each session's `activity:metrics:v1:<session id>` holds a classifier latency histogram per classifier id (22 buckets, at most 8 ids), the cheaper activity moves taken in `on` with the escalations that followed one, the routed replies left unpriced by cause (`unpriced`: `usage`, `model`, `ttl`, `error`, from `unpricedCause` in `lib/savings.mjs`; 1.16), and `since`, its first reading; each part reads as empty on its own when its shape is wrong, as after a change of buckets. Both follow the usage records below: one writer per key, so sessions that finish turns at the same moment do not overwrite each other; this session's record held in memory and written after each turn that adds a count; the readout the sum of all records, latency kept to the first 8 classifier ids; and the same reset marker. Each record is bounded, and the records grow by one per session that recorded a count until **Delete history**. The view keeps the last sums read or written as `activityStore` and `activityMetrics`: read at session start and when the pane opens, replaced after each turn's write and after a reset. The open run is written when the session ends. **Delete history** clears the session counts, every stats and metrics record, and the usage records below.
|
|
117
131
|
|
|
118
132
|
Nothing is recorded with `activityRouting: off`. Stats run inside a guard: a failed transcript read or store access loses that turn's counts and never fails the turn. Readings already in the session's metrics record stay in memory after a failed write and go out with the next turn that adds a reading. A turn from a session that has since changed is dropped.
|
|
119
133
|
|
package/docs/configuration.md
CHANGED
|
@@ -41,7 +41,7 @@ The default baseline is tier `low`. Each route refers to an alias in `models`.
|
|
|
41
41
|
|
|
42
42
|
Every default route names its effort, so no default tier keeps the effort Claude Code sends. The ladder follows Anthropic's published charts. On the OSWorld 2.1 effort chart, Haiku 5.5 at `high` scored above Sonnet 5.5 at `low`, and Haiku at `xhigh` near Sonnet at `medium`, for a fraction of the cost per attempt; OSWorld measures computer use, not coding. On Terminal-Bench 4.0, FrontierCode v1.1, and CursorBench 4.0, Opus 5.5 at `medium` matched or beat Sonnet 5.5 at `xhigh` at 25 to 50% lower cost per task (chart data on anthropic.com/claude-sonnet-5-5). These are routing defaults, not a claim of equal model quality.
|
|
43
43
|
|
|
44
|
-
`micro` and `low` share a model, so a step between them changes only the effort
|
|
44
|
+
`micro` and `low` share a model, so a step between them changes only the effort, as does `medium` to `high`. The policy prices such a step as no cache write, unless effort splits the cache (see [Optional `router.json`](#optional-routerjson)).
|
|
45
45
|
|
|
46
46
|
To restore the 1.3 ladder, with Sonnet 5.5 at `low` on the session effort and Haiku 5.5 at `low` effort for `micro`:
|
|
47
47
|
|
|
@@ -248,6 +248,8 @@ The Mod validates the whole file. Unknown keys and invalid values make routing u
|
|
|
248
248
|
| `baselineTier` | `micro`, `low`, `medium`, `high` | `low` |
|
|
249
249
|
| `routes.<tier>` | `model`, optional `effort` (a level, or `null` for the session effort) | As in the route table above |
|
|
250
250
|
| `activityRouting` | `off`, `on` | `on` |
|
|
251
|
+
| `mode` | `cost`, `balanced`, `quality` ([Routing modes](routing-modes.md)) | `balanced` |
|
|
252
|
+
| `modes.<cost\|quality>.policy` | any `policy` field, used while that mode is active | [Routing modes](routing-modes.md#policy-per-mode); not tuned |
|
|
251
253
|
| `activities.<activity>.<tier>` | optional `model` and `effort`, as in `routes` | The overrides in [Activity routing](#activity-routing) |
|
|
252
254
|
| `models.<alias>` | `id`, `input`, optional `output`, `cacheRead`, optional `longContext` (`above`, `multiplier`, or `null`), `contextWindow`, `billing`, `efforts` | Three defaults above |
|
|
253
255
|
| `cache` | `writeMultiplier`, `ttlMs`, `warmMarginMs` | `5m: 1.25`, `1h: 2`; `300000` / `3600000` ms; `30000` ms |
|
|
@@ -279,7 +281,9 @@ Policy defaults:
|
|
|
279
281
|
| `reviewEveryRequests` | `4` | Requests between classifier reviews inside a turn; `0` turns them off. Not tuned. |
|
|
280
282
|
| `minDwellRequests` | `8` | Requests after a model change before a cheaper route on the same task. Not tuned. |
|
|
281
283
|
|
|
282
|
-
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.
|
|
284
|
+
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**. **Mode** on the Policy tab writes `mode` at once, with **Undo**; `/router mode` changes only the session and writes no file. 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.
|
|
285
|
+
|
|
286
|
+
A project can set the routing mode, and only that, in `.claude/router.json` in the directory Claude Code runs in: `{ "mode": "cost" }`. Any other content is ignored with a notice; it never makes routing unavailable. A session's `/router mode` beats it, and it beats the profile's `mode`. See [Routing modes](routing-modes.md).
|
|
283
287
|
|
|
284
288
|
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.
|
|
285
289
|
|
package/docs/evaluation.md
CHANGED
|
@@ -56,7 +56,7 @@ The script writes aggregate counts, reason histograms, route transitions, and sh
|
|
|
56
56
|
|
|
57
57
|
Activity routing has no measured result. The replay above predates it and covers tiers only. It is `on` by default since 1.7, with defaults chosen from Anthropic's published benchmarks and a list-price replay of one developer's sessions; [Activity routing](activity-routing.md#what-the-estimates-mean) gives that replay and its limits. The pane counts turns, requests, switches, and the turns `on` would route differently, with a configured list-price estimate of those turns' next requests, not a measured saving. Two checks look at the classifier's activity label.
|
|
58
58
|
|
|
59
|
-
The figures plan §11 tracks (tool agreement of at least 80% on `code` against `ops` and `explore`, Jev p95 latency of at most 450 ms, at most 1 tool-error escalation in 10 cheaper activity moves, the number of activity switches) are read from the Classifier tab's **ACROSS SESSIONS** block, which shows the counts kept since the last reset: **Code/ops/explore** for the tool agreement on turns the classifier answered `code`, `ops` or `explore`, **Agreement** and **Mismatch** for all of them, **Activity moves** for moves inside a tier taken and refused (a refusal by a hold or the credits cap included), **Escalations** for the tool-error escalations that followed a cheaper activity move in `on` while the turns stayed on its route in `on` (turning routing off, a turn with routing off, or a turn in `off` ends the watch, a pin in between does not, and an escalation the credits cap held counts). The active classifier's p95 wait is on its **Deadline** line on the same tab, above that block. Latency is kept in fixed buckets, so the p95 reads as a bound (`≤ 350 ms`); it is the wait for the classifier's answer, transient retries included, without the routing after it, so it compares with the probe's p95 below, and is not recorded with activity routing `off`. `/router` without a UI surface prints both agreements. The underlying counts are the per-session `activity:stats:v1:<session id>` and `activity:metrics:v1:<session id>` records described in [Architecture](architecture.md).
|
|
59
|
+
The figures plan §11 tracks (tool agreement of at least 80% on `code` against `ops` and `explore`, Jev p95 latency of at most 450 ms, at most 1 tool-error escalation in 10 cheaper activity moves, the number of activity switches) are read from the Classifier tab's **ACROSS SESSIONS** block, which shows the counts kept since the last reset: **Code/ops/explore** for the tool agreement on turns the classifier answered `code`, `ops` or `explore`, **Agreement** and **Mismatch** for all of them, **Activity moves** for moves inside a tier taken and refused (a refusal by a hold or the credits cap included), **Escalations** for the tool-error escalations that followed a cheaper activity move in `on` while the turns stayed on its route in `on` (turning routing off, a turn with routing off, or a turn in `off` ends the watch, a pin in between does not, and an escalation the credits cap held counts), **Unpriced** for the routed replies the usage record left out, by cause: no usage in the reply, a model without a configured price, an unknown cache lifetime, or a failed comparison. Before 1.16 those replies were dropped without a count, so usage covered only the priced part of the routed traffic, and a session whose replies were all unpriced left no usage record at all. The active classifier's p95 wait is on its **Deadline** line on the same tab, above that block. Latency is kept in fixed buckets, so the p95 reads as a bound (`≤ 350 ms`); it is the wait for the classifier's answer, transient retries included, without the routing after it, so it compares with the probe's p95 below, and is not recorded with activity routing `off`. `/router` without a UI surface prints both agreements. The underlying counts are the per-session `activity:stats:v1:<session id>` and `activity:metrics:v1:<session id>` records described in [Architecture](architecture.md).
|
|
60
60
|
|
|
61
61
|
### Tool agreement
|
|
62
62
|
|
|
@@ -66,7 +66,9 @@ Each finished turn is labelled from the tools the assistant used, locally and at
|
|
|
66
66
|
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
67
67
|
| `code` | An edit tool (`Edit`, `Write`, `MultiEdit`, `NotebookEdit`) on a path that is not a doc path |
|
|
68
68
|
| `docs` | Edits only to paths ending `.md`, `.mdx`, `.rst`, or `.txt`, or under a `docs/` directory |
|
|
69
|
-
| `
|
|
69
|
+
| `shell` | A Bash command that writes a file's content: an output redirect to a file, `tee`, `sed -i`, `perl -i`, `patch` or `git apply`. A candidate for code, docs or routine work, not proof of code |
|
|
70
|
+
| `ops` | A Bash command that runs something else: `git commit`, `rm`, `mv`, `mkdir`, a deploy, a check followed by another command |
|
|
71
|
+
| `check` | Bash commands that are only checks (`npm test`, `tsc`, `npm run lint && npm test`) or reads |
|
|
70
72
|
| `read` | Other tool use: reads, searches, web fetches, Task, TodoWrite, MCP tools, and Bash commands that only read, such as `ls`, `grep`, `cat`, or `git status` and `git diff` |
|
|
71
73
|
| `talk` | No tool calls |
|
|
72
74
|
|
|
@@ -74,15 +76,17 @@ A subagent's edits and commands never reach the main transcript, so a turn that
|
|
|
74
76
|
|
|
75
77
|
The classifier's activity agrees with the turn when the bucket is one it allows:
|
|
76
78
|
|
|
77
|
-
| Activity | Allowed buckets
|
|
78
|
-
| --------- |
|
|
79
|
-
| `code` | `code`
|
|
80
|
-
| `debug` | `code`, `ops`, `read`
|
|
81
|
-
| `explore` | `read`, `talk`
|
|
82
|
-
| `plan` | `talk`, `read`, `docs`
|
|
83
|
-
| `review` | `read`, `talk`
|
|
84
|
-
| `ops` | `ops`, `read`
|
|
85
|
-
| `docs` | `docs`
|
|
79
|
+
| Activity | Allowed buckets |
|
|
80
|
+
| --------- | ------------------------------------------ |
|
|
81
|
+
| `code` | `code`, `shell` |
|
|
82
|
+
| `debug` | `code`, `shell`, `ops`, `check`, `read` |
|
|
83
|
+
| `explore` | `read`, `talk` |
|
|
84
|
+
| `plan` | `talk`, `read`, `docs` |
|
|
85
|
+
| `review` | `read`, `talk`, `check` |
|
|
86
|
+
| `ops` | `ops`, `shell`, `check`, `read` |
|
|
87
|
+
| `docs` | `docs`, `shell` |
|
|
88
|
+
|
|
89
|
+
Before 1.16 a shell write, a check run and any other command were all `ops`. A `code` turn that edited through the shell therefore read as a miss, and so did a review that ran the tests. The finer buckets keep that apart. Because a shell write cannot be told from routine work, it agrees with every activity that may produce it, so it cannot catch a cheap route on shell-written code. Agreement from before 1.16 and after it is not comparable, and a store holding the new buckets reads as empty in an older version. Routing reads `shell` and `check` as `ops`, as before.
|
|
86
90
|
|
|
87
91
|
Agreement is a weak check. It tells `code` from `ops` and `explore` well, but not `ops` from `explore` when the commands only read. It cannot tell `plan` from `review`, and it says nothing about whether the route was good enough. It does catch the costly mistake, a cheap route on a coding turn. The Classifier tab shows the session's count as `Agreement` under **THIS SESSION**, over the turns where the classifier gave an activity at or above `activityMass`, in `on` too when the route kept another activity. The counts kept across sessions hold the classifier's raw answer, `uncertain` and no answer included, against the bucket. The pane's **ACROSS SESSIONS** block counts agreement over the answers that name an activity; `uncertain` and no answer appear only in **Labelled**.
|
|
88
92
|
|
package/docs/native-router.md
CHANGED
|
@@ -21,6 +21,8 @@ The activity is what the turn produces: `code`, `debug`, `explore`, `plan`, `rev
|
|
|
21
21
|
| `/router off` | Turn routing off and keep Claude's selected model. |
|
|
22
22
|
| `/router pin <tier>` | Pin the next turn and tool continuations. Routing on must already be enabled. |
|
|
23
23
|
| `/router activities <off\|on>` | Set the activity routing mode. Written to `router.json` at once; **Undo** in the pane reverts it. |
|
|
24
|
+
| `/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. |
|
|
25
|
+
| `/router decisions [n]` | Print this session's last `n` routing decisions (default 20, at most 60): origin, classifier answer, task, tier, route, reason, and each turn's end. No text. |
|
|
24
26
|
| `/model <name>` | Select a model and turn routing off. `/router auto` turns it back on. |
|
|
25
27
|
|
|
26
28
|
The pane's **Set up** and **Credentials → Edit** buttons open Claude Code's secure plugin configuration. Claude Code refuses `$.command.run` from inside a `command.run` hook, so the Mod starts that dialog from a timer after the press returns.
|
package/docs/router-band.svg
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 922
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 922 509" role="img" aria-labelledby="title desc">
|
|
2
2
|
<title id="title">The Router band above the Claude Code prompt</title>
|
|
3
|
-
<desc id="desc">
|
|
3
|
+
<desc id="desc">Seven band states drawn by the router code: routed to high, two rows with the hover row, a pending pin, a missing classifier key, routing off, an activity move with activity routing on, and cost mode set for the session.</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="922" height="
|
|
8
|
+
<rect width="922" height="509" rx="8" fill="#1c1c1c"/>
|
|
9
9
|
<text class="cap" x="20" y="30">Routing on: routed to the high tier on a clear jump</text>
|
|
10
10
|
<rect x="12" y="38" width="897.6" height="29" rx="5" fill="#232323"/>
|
|
11
11
|
<text x="24.0" y="56" fill="#e0708a" xml:space="preserve">▂</text>
|
|
@@ -39,11 +39,13 @@
|
|
|
39
39
|
<text x="304.8" y="121" fill="#7c7c7c" xml:space="preserve"> · </text>
|
|
40
40
|
<text x="343.8" y="121" fill="#7c7c7c" xml:space="preserve">↑ jump</text>
|
|
41
41
|
<text x="390.6" y="121" fill="#7c7c7c" xml:space="preserve"> · </text>
|
|
42
|
-
<text x="429.6" y="121" fill="#
|
|
43
|
-
<text x="
|
|
44
|
-
<text x="
|
|
45
|
-
<text x="
|
|
46
|
-
<text x="
|
|
42
|
+
<text x="429.6" y="121" fill="#7c7c7c" xml:space="preserve">balanced (default)</text>
|
|
43
|
+
<text x="570.0" y="121" fill="#7c7c7c" xml:space="preserve"> · </text>
|
|
44
|
+
<text x="609.0" y="121" fill="#d0d0d0" xml:space="preserve">ctx </text>
|
|
45
|
+
<text x="640.2" y="121" fill="#87d787" xml:space="preserve">40%</text>
|
|
46
|
+
<text x="663.6" y="121" fill="#d0d0d0" xml:space="preserve"> · cache hit </text>
|
|
47
|
+
<text x="765.0" y="121" fill="#87d787" xml:space="preserve">100%</text>
|
|
48
|
+
<text x="811.8" y="121" fill="#d0d0d0" xml:space="preserve">Router</text>
|
|
47
49
|
<text x="24.0" y="140" fill="#7c7c7c" xml:space="preserve">session </text>
|
|
48
50
|
<text x="94.2" y="140" fill="#6fcf97" font-weight="700" xml:space="preserve">saved $1.84 (22%)</text>
|
|
49
51
|
<text x="226.8" y="140" fill="#d0d0d0" xml:space="preserve"> vs Opus 5.5 · xhigh</text>
|
|
@@ -135,4 +137,24 @@
|
|
|
135
137
|
<text x="531.0" y="419" fill="#d0d0d0" xml:space="preserve"> · cache hit </text>
|
|
136
138
|
<text x="632.4" y="419" fill="#87d787" xml:space="preserve">100%</text>
|
|
137
139
|
<text x="679.2" y="419" fill="#d0d0d0" xml:space="preserve">Router</text>
|
|
140
|
+
<text class="cap" x="20" y="458">Cost mode for this session: high runs Opus at high instead of xhigh</text>
|
|
141
|
+
<rect x="12" y="466" width="897.6" height="29" rx="5" fill="#232323"/>
|
|
142
|
+
<text x="24.0" y="484" fill="#e0708a" xml:space="preserve">▂</text>
|
|
143
|
+
<text x="31.8" y="484" fill="#e0708a" xml:space="preserve">▄</text>
|
|
144
|
+
<text x="39.6" y="484" fill="#e0708a" xml:space="preserve">▆</text>
|
|
145
|
+
<text x="47.4" y="484" fill="#e0708a" xml:space="preserve">█</text>
|
|
146
|
+
<rect x="55.2" y="470" width="46.8" height="18" rx="4" fill="#e0708a"/>
|
|
147
|
+
<text x="55.2" y="484" fill="#0d1016" font-weight="700" xml:space="preserve"> high </text>
|
|
148
|
+
<text x="109.8" y="484" fill="#d77757" font-style="italic" xml:space="preserve">coding → </text>
|
|
149
|
+
<text x="180.0" y="484" fill="#d0d0d0" xml:space="preserve">Opus 5.5 · high</text>
|
|
150
|
+
<text x="297.0" y="484" fill="#7c7c7c" xml:space="preserve"> · </text>
|
|
151
|
+
<text x="336.0" y="484" fill="#7c7c7c" xml:space="preserve">= fits</text>
|
|
152
|
+
<text x="382.8" y="484" fill="#7c7c7c" xml:space="preserve"> · </text>
|
|
153
|
+
<text x="421.8" y="484" fill="#7c7c7c" xml:space="preserve">cost (session)</text>
|
|
154
|
+
<text x="531.0" y="484" fill="#7c7c7c" xml:space="preserve"> · </text>
|
|
155
|
+
<text x="570.0" y="484" fill="#d0d0d0" xml:space="preserve">ctx </text>
|
|
156
|
+
<text x="601.2" y="484" fill="#87d787" xml:space="preserve">40%</text>
|
|
157
|
+
<text x="624.6" y="484" fill="#d0d0d0" xml:space="preserve"> · cache hit </text>
|
|
158
|
+
<text x="726.0" y="484" fill="#87d787" xml:space="preserve">100%</text>
|
|
159
|
+
<text x="772.8" y="484" fill="#d0d0d0" xml:space="preserve">Router</text>
|
|
138
160
|
</svg>
|