@alexeiled/claude-router 1.20.1 → 1.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +41 -0
- package/README.md +3 -3
- package/docs/activity-routing.md +1 -1
- package/docs/architecture.md +6 -4
- package/docs/configuration.md +9 -8
- package/docs/evaluation.md +4 -4
- package/docs/native-router.md +11 -11
- package/docs/providers.md +5 -6
- package/docs/router-band.svg +158 -137
- package/docs/router-pane-classifier.svg +21 -23
- package/docs/router-pane-now.svg +138 -173
- package/docs/router-pane-policy.svg +21 -23
- package/docs/router-pane-routes.svg +32 -34
- package/docs/router-pane-usage-whatif.svg +139 -157
- package/docs/router-pane-usage.svg +165 -165
- package/docs/routing-modes.md +22 -20
- package/docs/user-guide.md +130 -71
- package/hooks/native-router.mjs +9 -5
- package/lib/band.mjs +254 -171
- package/lib/config.mjs +33 -18
- package/lib/cost.mjs +26 -10
- package/lib/costs.mjs +156 -0
- package/lib/display.mjs +115 -92
- package/lib/modes.mjs +8 -7
- package/lib/panel.mjs +487 -445
- package/lib/policy.mjs +1 -1
- package/lib/prices.mjs +113 -0
- package/lib/providers.mjs +9 -21
- package/lib/route.mjs +1 -1
- package/lib/savings.mjs +14 -8
- package/lib/subagents.mjs +3 -3
- package/package.json +2 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 758 1123" role="img" aria-labelledby="title desc">
|
|
2
2
|
<title id="title">Router pane, Usage tab</title>
|
|
3
|
-
<desc id="desc">The last 7 days across sessions: the period row,
|
|
3
|
+
<desc id="desc">The last 7 days across sessions: the period row, the difference against unrouted first, then a cost table whose rows add up (the main thread with its cheaper-model saving and cache rebuilds, the subagents, the total) with each row against unrouted, the replies and tokens, the cost by activity with code opened to its routes and cost parts, the cost by day, what is worth a look with a link to Routes, subagents, and Delete history.</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="
|
|
10
|
-
<text x="24.0" y="34" fill="#5fafd7" font-weight="700" xml:space="preserve">
|
|
11
|
-
<rect x="
|
|
12
|
-
<text x="
|
|
13
|
-
<rect x="
|
|
14
|
-
<text x="
|
|
15
|
-
<text x="
|
|
16
|
-
<rect x="24.0" y="39" width="
|
|
17
|
-
<text x="24.0" y="53" fill="#d0d0d0" xml:space="preserve">[ Now ]</text>
|
|
18
|
-
<rect x="
|
|
19
|
-
<text x="
|
|
20
|
-
<rect x="
|
|
21
|
-
<text x="
|
|
22
|
-
<rect x="
|
|
23
|
-
<text x="
|
|
24
|
-
<rect x="
|
|
25
|
-
<text x="
|
|
26
|
-
<rect x="
|
|
27
|
-
<text x="
|
|
8
|
+
<rect width="758" height="1123" rx="8" fill="#1c1c1c"/>
|
|
9
|
+
<rect x="10" y="10" width="738" height="1103" rx="6" fill="none" stroke="#3f5f8f"/>
|
|
10
|
+
<text x="24.0" y="34" fill="#5fafd7" font-weight="700" xml:space="preserve">ROUTER</text>
|
|
11
|
+
<rect x="86.4" y="20" width="62.4" height="18" rx="4" fill="#87afff"/>
|
|
12
|
+
<text x="86.4" y="34" fill="#0d1016" font-weight="700" xml:space="preserve">[ ◉ on ]</text>
|
|
13
|
+
<rect x="156.6" y="20" width="70.2" height="18" rx="4" fill="#2e3340"/>
|
|
14
|
+
<text x="156.6" y="34" fill="#d0d0d0" xml:space="preserve">[ ○ off ]</text>
|
|
15
|
+
<text x="242.4" y="34" fill="#87d787" xml:space="preserve">Jev ready · 347 ms</text>
|
|
16
|
+
<rect x="24.0" y="39" width="70.2" height="18" rx="4" fill="#2e3340"/>
|
|
17
|
+
<text x="24.0" y="53" fill="#d0d0d0" xml:space="preserve">[ 1 Now ]</text>
|
|
18
|
+
<rect x="102.0" y="39" width="93.6" height="18" rx="4" fill="#2e3340"/>
|
|
19
|
+
<text x="102.0" y="53" fill="#d0d0d0" xml:space="preserve">[ 2 Routes ]</text>
|
|
20
|
+
<rect x="203.4" y="39" width="93.6" height="18" rx="4" fill="#2e3340"/>
|
|
21
|
+
<text x="203.4" y="53" fill="#d0d0d0" xml:space="preserve">[ 3 Policy ]</text>
|
|
22
|
+
<rect x="304.8" y="39" width="124.8" height="18" rx="4" fill="#2e3340"/>
|
|
23
|
+
<text x="304.8" y="53" fill="#d0d0d0" xml:space="preserve">[ 4 Classifier ]</text>
|
|
24
|
+
<rect x="437.4" y="39" width="85.8" height="18" rx="4" fill="#87afff"/>
|
|
25
|
+
<text x="437.4" y="53" fill="#0d1016" font-weight="700" xml:space="preserve">[ 5 Usage ]</text>
|
|
26
|
+
<rect x="531.0" y="39" width="39.0" height="18" rx="4" fill="#2e3340"/>
|
|
27
|
+
<text x="531.0" y="53" fill="#d0d0d0" xml:space="preserve">[ ? ]</text>
|
|
28
28
|
<rect x="24.0" y="77" width="85.8" height="18" rx="4" fill="#2e3340"/>
|
|
29
29
|
<text x="24.0" y="91" fill="#d0d0d0" xml:space="preserve">[ Session ]</text>
|
|
30
30
|
<rect x="117.6" y="77" width="70.2" height="18" rx="4" fill="#2e3340"/>
|
|
@@ -39,150 +39,150 @@
|
|
|
39
39
|
<text x="390.6" y="91" fill="#d0d0d0" xml:space="preserve">[ All ]</text>
|
|
40
40
|
<text x="453.0" y="91" fill="#7c7c7c" xml:space="preserve"> p next</text>
|
|
41
41
|
<text x="24.0" y="110" fill="#7c7c7c" xml:space="preserve">all projects · Oct 7 – Oct 13 · each session vs its own model</text>
|
|
42
|
-
<text x="24.0" y="148" fill="#6fcf97" font-weight="700" xml:space="preserve"
|
|
43
|
-
<text x="
|
|
44
|
-
<text x="
|
|
45
|
-
<text x="
|
|
46
|
-
<text x="
|
|
47
|
-
<text x="24.0" y="205" fill="#
|
|
48
|
-
<text x="
|
|
49
|
-
<text x="
|
|
50
|
-
<text x="
|
|
51
|
-
<text x="
|
|
52
|
-
<text x="
|
|
53
|
-
<text x="24.0" y="243" fill="#7c7c7c" xml:space="preserve">
|
|
54
|
-
<text x="
|
|
55
|
-
<text x="
|
|
56
|
-
<text x="
|
|
57
|
-
<text x="
|
|
58
|
-
<text x="
|
|
59
|
-
<text x="
|
|
60
|
-
<text x="
|
|
61
|
-
<text x="
|
|
62
|
-
<text x="
|
|
63
|
-
<text x="
|
|
64
|
-
<text x="
|
|
65
|
-
<
|
|
66
|
-
<text x="
|
|
67
|
-
<rect x="
|
|
68
|
-
<text x="
|
|
69
|
-
<rect x="
|
|
70
|
-
<text x="
|
|
71
|
-
<
|
|
72
|
-
<text x="
|
|
73
|
-
<text x="
|
|
74
|
-
<text x="
|
|
75
|
-
<text x="
|
|
76
|
-
<text x="
|
|
77
|
-
<text x="
|
|
78
|
-
<text x="
|
|
79
|
-
<text x="
|
|
80
|
-
<text x="
|
|
81
|
-
<text x="
|
|
82
|
-
<text x="
|
|
83
|
-
<text x="
|
|
84
|
-
<text x="
|
|
85
|
-
<text x="
|
|
86
|
-
<text x="
|
|
87
|
-
<text x="211.2" y="452" fill="#d0d0d0" xml:space="preserve"> 50 $1.50</text>
|
|
88
|
-
<text x="351.6" y="452" fill="#6fcf97" xml:space="preserve"> −$4.50</text>
|
|
89
|
-
<text x="437.4" y="452" fill="#7c7c7c" xml:space="preserve"> Haiku 5.5 · high</text>
|
|
90
|
-
<text x="39.6" y="471" fill="#d0d0d0" xml:space="preserve">▸</text>
|
|
91
|
-
<text x="55.2" y="471" fill="#d7875f" font-style="italic" xml:space="preserve">exploring</text>
|
|
92
|
-
<text x="211.2" y="471" fill="#d0d0d0" xml:space="preserve"> 36 $1.01</text>
|
|
93
|
-
<text x="351.6" y="471" fill="#6fcf97" xml:space="preserve"> −$2.95</text>
|
|
94
|
-
<text x="437.4" y="471" fill="#7c7c7c" xml:space="preserve"> Haiku 5.5 · high</text>
|
|
42
|
+
<text x="24.0" y="148" fill="#6fcf97" font-weight="700" xml:space="preserve">−$12.29 (−37%)</text>
|
|
43
|
+
<text x="133.2" y="148" fill="#d0d0d0" xml:space="preserve"> vs unrouted</text>
|
|
44
|
+
<text x="226.8" y="186" fill="#7c7c7c" xml:space="preserve"> cost</text>
|
|
45
|
+
<text x="289.2" y="186" fill="#7c7c7c" xml:space="preserve"> vs unrouted</text>
|
|
46
|
+
<text x="406.2" y="186" fill="#7c7c7c" xml:space="preserve"> unrouted</text>
|
|
47
|
+
<text x="24.0" y="205" fill="#d0d0d0" xml:space="preserve">main · 221 replies</text>
|
|
48
|
+
<text x="226.8" y="205" fill="#d0d0d0" xml:space="preserve"> ≈$15.33</text>
|
|
49
|
+
<text x="289.2" y="205" fill="#6fcf97" xml:space="preserve"> −$11.78</text>
|
|
50
|
+
<text x="406.2" y="205" fill="#7c7c7c" xml:space="preserve"> ≈$27.11</text>
|
|
51
|
+
<text x="24.0" y="224" fill="#7c7c7c" xml:space="preserve"> cheaper models</text>
|
|
52
|
+
<text x="289.2" y="224" fill="#6fcf97" xml:space="preserve"> −$12.29</text>
|
|
53
|
+
<text x="24.0" y="243" fill="#7c7c7c" xml:space="preserve"> cache rebuilds</text>
|
|
54
|
+
<text x="289.2" y="243" fill="#f0b429" xml:space="preserve"> +$0.51</text>
|
|
55
|
+
<text x="406.2" y="243" fill="#7c7c7c" xml:space="preserve"> 4% of the saving</text>
|
|
56
|
+
<text x="24.0" y="262" fill="#d0d0d0" xml:space="preserve">agents · 15</text>
|
|
57
|
+
<text x="226.8" y="262" fill="#d0d0d0" xml:space="preserve"> ≈$5.60</text>
|
|
58
|
+
<text x="289.2" y="262" fill="#6fcf97" xml:space="preserve"> −$0.51</text>
|
|
59
|
+
<text x="406.2" y="262" fill="#7c7c7c" xml:space="preserve"> ≈$6.11</text>
|
|
60
|
+
<text x="24.0" y="281" fill="#7c7c7c" xml:space="preserve">─────────────────────────────────────────────────────────────</text>
|
|
61
|
+
<text x="24.0" y="300" fill="#d0d0d0" font-weight="700" xml:space="preserve">7 days · ≈ API value</text>
|
|
62
|
+
<text x="226.8" y="300" fill="#d0d0d0" font-weight="700" xml:space="preserve"> ≈$20.93</text>
|
|
63
|
+
<text x="289.2" y="300" fill="#6fcf97" font-weight="700" xml:space="preserve"> −$12.29</text>
|
|
64
|
+
<text x="406.2" y="300" fill="#7c7c7c" xml:space="preserve"> ≈$33.22</text>
|
|
65
|
+
<text x="24.0" y="338" fill="#7c7c7c" xml:space="preserve"> 221 replies · 131 turns · input 15.25M · cache hit 90% · output 198.9K</text>
|
|
66
|
+
<text x="24.0" y="376" fill="#5fafd7" font-weight="700" xml:space="preserve">BY </text>
|
|
67
|
+
<rect x="55.2" y="362" width="93.6" height="18" rx="4" fill="#87afff"/>
|
|
68
|
+
<text x="55.2" y="376" fill="#0d1016" font-weight="700" xml:space="preserve">[ Activity ]</text>
|
|
69
|
+
<rect x="156.6" y="362" width="70.2" height="18" rx="4" fill="#2e3340"/>
|
|
70
|
+
<text x="156.6" y="376" fill="#d0d0d0" xml:space="preserve">[ Model ]</text>
|
|
71
|
+
<rect x="234.6" y="362" width="62.4" height="18" rx="4" fill="#2e3340"/>
|
|
72
|
+
<text x="234.6" y="376" fill="#d0d0d0" xml:space="preserve">[ Tier ]</text>
|
|
73
|
+
<text x="304.8" y="376" fill="#7c7c7c" xml:space="preserve"> g next</text>
|
|
74
|
+
<text x="24.0" y="395" fill="#7c7c7c" xml:space="preserve"> replies cost vs unrouted mostly on</text>
|
|
75
|
+
<text x="39.6" y="414" fill="#d0d0d0" xml:space="preserve">▾</text>
|
|
76
|
+
<text x="55.2" y="414" fill="#d7875f" font-style="italic" xml:space="preserve">code</text>
|
|
77
|
+
<text x="211.2" y="414" fill="#d0d0d0" xml:space="preserve"> 125 ≈$12.70</text>
|
|
78
|
+
<text x="351.6" y="414" fill="#6fcf97" xml:space="preserve"> −$3.55</text>
|
|
79
|
+
<text x="468.6" y="414" fill="#7c7c7c" xml:space="preserve"> Sonnet 5.5 · high</text>
|
|
80
|
+
<text x="70.8" y="433" fill="#d0d0d0" xml:space="preserve">Opus 5.5 · xhigh</text>
|
|
81
|
+
<text x="211.2" y="433" fill="#d0d0d0" xml:space="preserve"> 54 ≈$7.02</text>
|
|
82
|
+
<text x="351.6" y="433" fill="#d0d0d0" xml:space="preserve"> $0.00</text>
|
|
83
|
+
<text x="70.8" y="452" fill="#d0d0d0" xml:space="preserve">Sonnet 5.5 · high</text>
|
|
84
|
+
<text x="211.2" y="452" fill="#d0d0d0" xml:space="preserve"> 71 ≈$5.68</text>
|
|
85
|
+
<text x="351.6" y="452" fill="#6fcf97" xml:space="preserve"> −$3.55</text>
|
|
86
|
+
<text x="24.0" y="471" fill="#7c7c7c" xml:space="preserve"> cheaper −$3.69 · stronger $0.00 · cache rebuilds +$0.14 · input 8.63M · output 112.5K</text>
|
|
95
87
|
<text x="39.6" y="490" fill="#d0d0d0" xml:space="preserve">▸</text>
|
|
96
|
-
<text x="55.2" y="490" fill="#d7875f" font-style="italic" xml:space="preserve">
|
|
97
|
-
<text x="211.2" y="490" fill="#d0d0d0" xml:space="preserve">
|
|
98
|
-
<text x="351.6" y="490" fill="#6fcf97" xml:space="preserve">
|
|
99
|
-
<text x="
|
|
100
|
-
<text x="
|
|
101
|
-
<text x="
|
|
102
|
-
<text x="
|
|
103
|
-
<
|
|
104
|
-
<text x="
|
|
105
|
-
<text x="
|
|
106
|
-
<text x="
|
|
107
|
-
<text x="
|
|
108
|
-
<text x="
|
|
109
|
-
<text x="
|
|
110
|
-
<text x="
|
|
111
|
-
<text x="
|
|
112
|
-
<
|
|
113
|
-
<
|
|
114
|
-
<text x="
|
|
115
|
-
<text x="
|
|
116
|
-
<text x="
|
|
117
|
-
<text x="
|
|
118
|
-
<text x="
|
|
119
|
-
<text x="
|
|
120
|
-
<text x="
|
|
121
|
-
<text x="
|
|
122
|
-
<
|
|
123
|
-
<text x="
|
|
124
|
-
<text x="
|
|
125
|
-
<text x="
|
|
126
|
-
<text x="
|
|
127
|
-
<text x="
|
|
128
|
-
<text x="
|
|
129
|
-
<text x="
|
|
130
|
-
<text x="
|
|
131
|
-
<text x="
|
|
132
|
-
<text x="
|
|
133
|
-
<text x="
|
|
134
|
-
<text x="
|
|
135
|
-
<text x="
|
|
136
|
-
<text x="
|
|
137
|
-
<text x="
|
|
138
|
-
<text x="
|
|
139
|
-
<text x="
|
|
140
|
-
<text x="
|
|
141
|
-
<text x="
|
|
142
|
-
<text x="203.4" y="
|
|
143
|
-
<text x="
|
|
144
|
-
<text x="
|
|
145
|
-
<text x="
|
|
146
|
-
<text x="
|
|
147
|
-
<text x="
|
|
148
|
-
<text x="
|
|
149
|
-
<text x="
|
|
150
|
-
<text x="297.0" y="794" fill="#d0d0d0" xml:space="preserve"> 3</text>
|
|
151
|
-
<text x="320.4" y="794" fill="#d0d0d0" xml:space="preserve"> $2.50</text>
|
|
152
|
-
<text x="390.6" y="794" fill="#f0b429" xml:space="preserve"> +$0.77 ▲</text>
|
|
88
|
+
<text x="55.2" y="490" fill="#d7875f" font-style="italic" xml:space="preserve">ops</text>
|
|
89
|
+
<text x="211.2" y="490" fill="#d0d0d0" xml:space="preserve"> 50 ≈$1.50</text>
|
|
90
|
+
<text x="351.6" y="490" fill="#6fcf97" xml:space="preserve"> −$4.50</text>
|
|
91
|
+
<text x="468.6" y="490" fill="#7c7c7c" xml:space="preserve"> Haiku 5.5 · high</text>
|
|
92
|
+
<text x="39.6" y="509" fill="#d0d0d0" xml:space="preserve">▸</text>
|
|
93
|
+
<text x="55.2" y="509" fill="#d7875f" font-style="italic" xml:space="preserve">explore</text>
|
|
94
|
+
<text x="211.2" y="509" fill="#d0d0d0" xml:space="preserve"> 36 ≈$1.01</text>
|
|
95
|
+
<text x="351.6" y="509" fill="#6fcf97" xml:space="preserve"> −$2.95</text>
|
|
96
|
+
<text x="468.6" y="509" fill="#7c7c7c" xml:space="preserve"> Haiku 5.5 · high</text>
|
|
97
|
+
<text x="39.6" y="528" fill="#d0d0d0" xml:space="preserve">▸</text>
|
|
98
|
+
<text x="55.2" y="528" fill="#d7875f" font-style="italic" xml:space="preserve">plan</text>
|
|
99
|
+
<text x="211.2" y="528" fill="#d0d0d0" xml:space="preserve"> 10 ≈$0.12</text>
|
|
100
|
+
<text x="351.6" y="528" fill="#6fcf97" xml:space="preserve"> −$0.78</text>
|
|
101
|
+
<text x="468.6" y="528" fill="#7c7c7c" xml:space="preserve"> Haiku 5.5 · low</text>
|
|
102
|
+
<text x="24.0" y="566" fill="#5fafd7" font-weight="700" xml:space="preserve">COST BY DAY </text>
|
|
103
|
+
<text x="117.6" y="566" fill="#5fafd7" xml:space="preserve">▂▃▁·▂▃█</text>
|
|
104
|
+
<text x="172.2" y="566" fill="#7c7c7c" xml:space="preserve"> peak ≈$7.67 </text>
|
|
105
|
+
<rect x="297.0" y="552" width="85.8" height="18" rx="4" fill="#2e3340"/>
|
|
106
|
+
<text x="297.0" y="566" fill="#d0d0d0" xml:space="preserve">[ What if ]</text>
|
|
107
|
+
<text x="24.0" y="604" fill="#5fafd7" font-weight="700" xml:space="preserve">WORTH A LOOK</text>
|
|
108
|
+
<text x="117.6" y="604" fill="#7c7c7c" xml:space="preserve"> · from the numbers; answer quality is not measured</text>
|
|
109
|
+
<text x="39.6" y="623" fill="#d7875f" font-style="italic" xml:space="preserve">code</text>
|
|
110
|
+
<text x="70.8" y="623" fill="#7c7c7c" xml:space="preserve"> · </text>
|
|
111
|
+
<text x="94.2" y="623" fill="#e0708a" xml:space="preserve">▂▄▆█</text>
|
|
112
|
+
<text x="125.4" y="623" fill="#d0d0d0" xml:space="preserve"> carried 46% of the cost</text>
|
|
113
|
+
<text x="312.6" y="623" fill="#7c7c7c" xml:space="preserve"> · mostly Opus 5.5 · xhigh</text>
|
|
114
|
+
<rect x="531.0" y="609" width="78.0" height="18" rx="4" fill="#2e3340"/>
|
|
115
|
+
<text x="531.0" y="623" fill="#d0d0d0" xml:space="preserve">[ Routes ]</text>
|
|
116
|
+
<text x="24.0" y="661" fill="#5fafd7" font-weight="700" xml:space="preserve">SUBAGENTS</text>
|
|
117
|
+
<text x="94.2" y="661" fill="#7c7c7c" xml:space="preserve"> · all projects · Oct 7 – Oct 13 subagent routing on</text>
|
|
118
|
+
<text x="39.6" y="680" fill="#c3e88d" xml:space="preserve">■■■■■</text>
|
|
119
|
+
<text x="78.6" y="680" fill="#f78c6c" xml:space="preserve">■</text>
|
|
120
|
+
<text x="86.4" y="680" fill="#f78c6c" xml:space="preserve">□□</text>
|
|
121
|
+
<text x="102.0" y="680" fill="#c792ea" xml:space="preserve">■■</text>
|
|
122
|
+
<text x="117.6" y="680" fill="#c792ea" xml:space="preserve">□□□□□</text>
|
|
123
|
+
<text x="172.2" y="680" fill="#c3e88d" xml:space="preserve">Haiku 5.5 5</text>
|
|
124
|
+
<text x="258.0" y="680" fill="#7c7c7c" xml:space="preserve"> · </text>
|
|
125
|
+
<text x="281.4" y="680" fill="#f78c6c" xml:space="preserve">Sonnet 5.5 3</text>
|
|
126
|
+
<text x="375.0" y="680" fill="#7c7c7c" xml:space="preserve"> · </text>
|
|
127
|
+
<text x="398.4" y="680" fill="#c792ea" xml:space="preserve">Opus 5.5 7</text>
|
|
128
|
+
<text x="24.0" y="699" fill="#d0d0d0" xml:space="preserve"> 15 agents</text>
|
|
129
|
+
<text x="109.8" y="699" fill="#7c7c7c" xml:space="preserve"> · </text>
|
|
130
|
+
<text x="133.2" y="699" fill="#d0d0d0" xml:space="preserve">■ 8 moved by the router</text>
|
|
131
|
+
<text x="312.6" y="699" fill="#7c7c7c" xml:space="preserve"> · </text>
|
|
132
|
+
<text x="336.0" y="699" fill="#d0d0d0" xml:space="preserve">□ 7 on Claude Code’s pick</text>
|
|
133
|
+
<text x="39.6" y="718" fill="#6fcf97" font-weight="700" xml:space="preserve">routing −$0.51 (−14%)</text>
|
|
134
|
+
<text x="203.4" y="718" fill="#d0d0d0" xml:space="preserve"> vs Claude Code’s picks</text>
|
|
135
|
+
<text x="382.8" y="718" fill="#7c7c7c" xml:space="preserve"> on 9 routed agents</text>
|
|
136
|
+
<text x="24.0" y="737" fill="#d0d0d0" xml:space="preserve"> per day </text>
|
|
137
|
+
<text x="102.0" y="737" fill="#d0d0d0" font-weight="700" xml:space="preserve">▁▂▂▃▃▅█</text>
|
|
138
|
+
<text x="156.6" y="737" fill="#7c7c7c" xml:space="preserve"> peak 6 on Oct 13</text>
|
|
139
|
+
<text x="24.0" y="775" fill="#d0d0d0" font-weight="700" xml:space="preserve"> ROUTED</text>
|
|
140
|
+
<text x="86.4" y="775" fill="#7c7c7c" xml:space="preserve"> · the router picked the model at spawn</text>
|
|
141
|
+
<text x="24.0" y="794" fill="#7c7c7c" xml:space="preserve"> type agents cost vs CC</text>
|
|
153
142
|
<text x="39.6" y="813" fill="#d0d0d0" xml:space="preserve">▸</text>
|
|
154
|
-
<text x="55.2" y="813" fill="#d0d0d0" xml:space="preserve">
|
|
155
|
-
<text x="203.4" y="813" fill="#c3e88d" xml:space="preserve"
|
|
156
|
-
<text x="
|
|
157
|
-
<text x="
|
|
158
|
-
<text x="
|
|
159
|
-
<text x="
|
|
160
|
-
<text x="
|
|
161
|
-
<text x="
|
|
162
|
-
<text x="
|
|
163
|
-
<text x="
|
|
164
|
-
<text x="
|
|
165
|
-
<text x="
|
|
166
|
-
<text x="
|
|
167
|
-
<text x="
|
|
168
|
-
<text x="
|
|
169
|
-
<text x="
|
|
170
|
-
<text x="
|
|
171
|
-
<text x="
|
|
172
|
-
<text x="
|
|
173
|
-
<text x="
|
|
143
|
+
<text x="55.2" y="813" fill="#d0d0d0" xml:space="preserve">Explore</text>
|
|
144
|
+
<text x="203.4" y="813" fill="#c3e88d" xml:space="preserve">■■■■</text>
|
|
145
|
+
<text x="297.0" y="813" fill="#d0d0d0" xml:space="preserve"> 4</text>
|
|
146
|
+
<text x="320.4" y="813" fill="#d0d0d0" xml:space="preserve"> ≈$0.18</text>
|
|
147
|
+
<text x="390.6" y="813" fill="#6fcf97" xml:space="preserve"> −$0.72 ▼</text>
|
|
148
|
+
<text x="39.6" y="832" fill="#d0d0d0" xml:space="preserve">▸</text>
|
|
149
|
+
<text x="55.2" y="832" fill="#d0d0d0" xml:space="preserve">dev-flow:reviewer</text>
|
|
150
|
+
<text x="203.4" y="832" fill="#f78c6c" xml:space="preserve">□</text>
|
|
151
|
+
<text x="211.2" y="832" fill="#c792ea" xml:space="preserve">■■</text>
|
|
152
|
+
<text x="297.0" y="832" fill="#d0d0d0" xml:space="preserve"> 3</text>
|
|
153
|
+
<text x="320.4" y="832" fill="#d0d0d0" xml:space="preserve"> ≈$2.50</text>
|
|
154
|
+
<text x="390.6" y="832" fill="#f0b429" xml:space="preserve"> +$0.77 ▲</text>
|
|
155
|
+
<text x="39.6" y="851" fill="#d0d0d0" xml:space="preserve">▸</text>
|
|
156
|
+
<text x="55.2" y="851" fill="#d0d0d0" xml:space="preserve">general-purpose</text>
|
|
157
|
+
<text x="203.4" y="851" fill="#c3e88d" xml:space="preserve">■</text>
|
|
158
|
+
<text x="211.2" y="851" fill="#f78c6c" xml:space="preserve">■</text>
|
|
159
|
+
<text x="297.0" y="851" fill="#d0d0d0" xml:space="preserve"> 2</text>
|
|
160
|
+
<text x="320.4" y="851" fill="#d0d0d0" xml:space="preserve"> ≈$0.47</text>
|
|
161
|
+
<text x="390.6" y="851" fill="#6fcf97" xml:space="preserve"> −$0.56 ▼</text>
|
|
162
|
+
<text x="24.0" y="889" fill="#d0d0d0" font-weight="700" xml:space="preserve"> NOT ROUTED</text>
|
|
163
|
+
<text x="117.6" y="889" fill="#7c7c7c" xml:space="preserve"> · Claude Code picked the model</text>
|
|
174
164
|
<text x="39.6" y="908" fill="#d0d0d0" xml:space="preserve">▸</text>
|
|
175
|
-
<text x="55.2" y="908" fill="#d0d0d0" xml:space="preserve">
|
|
176
|
-
<text x="203.4" y="908" fill="#
|
|
177
|
-
<text x="297.0" y="908" fill="#d0d0d0" xml:space="preserve">
|
|
178
|
-
<text x="320.4" y="908" fill="#d0d0d0" xml:space="preserve">
|
|
179
|
-
<text x="390.6" y="908" fill="#7c7c7c" xml:space="preserve">
|
|
180
|
-
<text x="
|
|
181
|
-
<text x="
|
|
182
|
-
<text x="
|
|
183
|
-
<text x="
|
|
184
|
-
<
|
|
185
|
-
<text x="
|
|
186
|
-
<
|
|
187
|
-
<text x="
|
|
165
|
+
<text x="55.2" y="908" fill="#d0d0d0" xml:space="preserve">workflow agent</text>
|
|
166
|
+
<text x="203.4" y="908" fill="#c792ea" xml:space="preserve">□□□□</text>
|
|
167
|
+
<text x="297.0" y="908" fill="#d0d0d0" xml:space="preserve"> 4</text>
|
|
168
|
+
<text x="320.4" y="908" fill="#d0d0d0" xml:space="preserve"> ≈$2.00</text>
|
|
169
|
+
<text x="390.6" y="908" fill="#7c7c7c" xml:space="preserve"> the workflow sets it</text>
|
|
170
|
+
<text x="39.6" y="927" fill="#d0d0d0" xml:space="preserve">▸</text>
|
|
171
|
+
<text x="55.2" y="927" fill="#d0d0d0" xml:space="preserve">fork</text>
|
|
172
|
+
<text x="203.4" y="927" fill="#c792ea" xml:space="preserve">□</text>
|
|
173
|
+
<text x="297.0" y="927" fill="#d0d0d0" xml:space="preserve"> 1</text>
|
|
174
|
+
<text x="320.4" y="927" fill="#d0d0d0" xml:space="preserve"> ≈$0.33</text>
|
|
175
|
+
<text x="390.6" y="927" fill="#7c7c7c" xml:space="preserve"> your model</text>
|
|
176
|
+
<text x="39.6" y="946" fill="#d0d0d0" xml:space="preserve">▸</text>
|
|
177
|
+
<text x="55.2" y="946" fill="#d0d0d0" xml:space="preserve">pinned model</text>
|
|
178
|
+
<text x="203.4" y="946" fill="#f78c6c" xml:space="preserve">□</text>
|
|
179
|
+
<text x="297.0" y="946" fill="#d0d0d0" xml:space="preserve"> 1</text>
|
|
180
|
+
<text x="320.4" y="946" fill="#d0d0d0" xml:space="preserve"> ≈$0.12</text>
|
|
181
|
+
<text x="390.6" y="946" fill="#7c7c7c" xml:space="preserve"> its agent file sets it</text>
|
|
182
|
+
<text x="24.0" y="984" fill="#7c7c7c" xml:space="preserve"> ■ moved by the router · □ Claude Code’s pick · color: the model</text>
|
|
183
|
+
<text x="24.0" y="1003" fill="#7c7c7c" xml:space="preserve"> vs CC: the same tokens on Claude Code’s pick, at list prices</text>
|
|
184
|
+
<text x="24.0" y="1041" fill="#7c7c7c" xml:space="preserve"> $ = tokens × list prices · ≈ = API value of plan quota</text>
|
|
185
|
+
<text x="24.0" y="1060" fill="#7c7c7c" xml:space="preserve"> answer quality not measured</text>
|
|
186
|
+
<rect x="24.0" y="1084" width="140.4" height="18" rx="4" fill="#2e3340"/>
|
|
187
|
+
<text x="24.0" y="1098" fill="#7c7c7c" xml:space="preserve">[ Delete history ]</text>
|
|
188
188
|
</svg>
|
package/docs/routing-modes.md
CHANGED
|
@@ -5,7 +5,7 @@ your routes stay as they are. The mode moves the route each tier runs by one fix
|
|
|
5
5
|
|
|
6
6
|
| Mode | What changes |
|
|
7
7
|
| --- | --- |
|
|
8
|
-
| `cost` | A cheaper route where the turn allows it: the tier below when that tier runs a model with a lower input price, else one effort level less on the same model. Never below `low`. |
|
|
8
|
+
| `cost` | A cheaper route where the turn allows it: the tier below when that tier runs a model with a lower input price (at `low`, the `low` route without its activity override), else one effort level less on the same model. `high` keeps its model and drops one effort level. Never below `low`. |
|
|
9
9
|
| `balanced` | Nothing: every tier runs its route as configured. |
|
|
10
10
|
| `quality` | One effort level more on the same model, else the route of the tier above. |
|
|
11
11
|
|
|
@@ -48,13 +48,19 @@ Each mode except `balanced` replaces some `policy` fields while it is active. Th
|
|
|
48
48
|
codex-router's and are **not tuned** on outcomes. Since 1.16, `cost` upgrades on balanced's bar (2 votes from 0.75):
|
|
49
49
|
with 3 votes from 0.85, the cache write of a cold stronger model raised the bar to about 0.92 from 60k tokens and 0.97
|
|
50
50
|
at 250k, so a cost turn on Haiku kept a task the classifier scored hard at 90%. `cost` still moves down sooner than
|
|
51
|
-
`balanced
|
|
51
|
+
`balanced`: one vote, a 4-request dwell, and since 1.21.1 65% support. At 80% support
|
|
52
|
+
the cold cache of a cheaper model raised the bar to about 0.87 at ~430k tokens. In 578 recorded cost decisions the
|
|
53
|
+
classifier chose `high` on 33% of answers, the router ran `high` on 58%, and none of the 136 answers for a lower tier
|
|
54
|
+
cleared the bar. Not 60%: an upgrade counts all the mass above the running tier, so an answer split between medium
|
|
55
|
+
and high can move `low` to `high`, and at 60% the next such answer dropped straight back to the still-warm cheaper
|
|
56
|
+
cache:
|
|
52
57
|
|
|
53
58
|
```json
|
|
54
59
|
{
|
|
55
60
|
"modes": {
|
|
56
61
|
"cost": { "policy": { "upgradeVotes": 2, "upgradeBase": 0.75, "jumpConfidence": 0.98, "downgradeVotes": 1,
|
|
57
|
-
"downgradeMass": 0.
|
|
62
|
+
"downgradeMass": 0.65, "minDwellRequests": 4,
|
|
63
|
+
"escalationHoldTurns": 1 } },
|
|
58
64
|
"quality": { "policy": { "upgradeVotes": 1, "upgradeBase": 0.6, "jumpConfidence": 0.9, "downgradeVotes": 3,
|
|
59
65
|
"downgradeMass": 0.95, "minDwellRequests": 16, "escalationHoldTurns": 4 } }
|
|
60
66
|
}
|
|
@@ -75,14 +81,13 @@ path. Generated from the test data by `npm run docs:modes`; `test/mode-matrix.te
|
|
|
75
81
|
| Classifier | Activities | cost | balanced | quality |
|
|
76
82
|
| --- | --- | --- | --- | --- |
|
|
77
83
|
| micro | code, debug, explore, plan, review, ops, docs, uncertain | Haiku · medium | Haiku · medium | Haiku · medium |
|
|
78
|
-
| low | code, debug, plan, review |
|
|
84
|
+
| low | code, debug, plan, review | Haiku · high | Sonnet · high | Sonnet · xhigh |
|
|
79
85
|
| low | explore, ops, docs, uncertain | Haiku · medium | Haiku · high | Haiku · xhigh |
|
|
80
86
|
| medium | code, debug, plan, review | Sonnet · high | Opus · medium | Opus · high |
|
|
81
87
|
| medium | explore, docs, uncertain | Haiku · high | Opus · medium | Opus · high |
|
|
82
88
|
| medium | ops | Haiku · medium | Haiku · high | Haiku · xhigh |
|
|
83
|
-
| high | code, debug, explore, plan, review, docs, uncertain | Opus · high | Opus · xhigh | Opus · max |
|
|
84
|
-
|
|
|
85
|
-
| uncertain | code, debug, plan, review | Sonnet · medium | Sonnet · high | Sonnet · xhigh |
|
|
89
|
+
| high | code, debug, explore, plan, review, ops, docs, uncertain | Opus · high | Opus · xhigh | Opus · max |
|
|
90
|
+
| uncertain | code, debug, plan, review | Haiku · high | Sonnet · high | Sonnet · xhigh |
|
|
86
91
|
| uncertain | explore, ops, docs, uncertain | Haiku · medium | Haiku · high | Haiku · xhigh |
|
|
87
92
|
|
|
88
93
|
**`routes.high` = Opus · high**
|
|
@@ -90,33 +95,30 @@ path. Generated from the test data by `npm run docs:modes`; `test/mode-matrix.te
|
|
|
90
95
|
| Classifier | Activities | cost | balanced | quality |
|
|
91
96
|
| --- | --- | --- | --- | --- |
|
|
92
97
|
| micro | code, debug, explore, plan, review, ops, docs, uncertain | Haiku · medium | Haiku · medium | Haiku · medium |
|
|
93
|
-
| low | code, debug, plan, review |
|
|
98
|
+
| low | code, debug, plan, review | Haiku · high | Sonnet · high | Sonnet · xhigh |
|
|
94
99
|
| low | explore, ops, docs, uncertain | Haiku · medium | Haiku · high | Haiku · xhigh |
|
|
95
100
|
| medium | code, debug, plan, review | Sonnet · high | Opus · medium | Opus · high |
|
|
96
101
|
| medium | explore, docs, uncertain | Haiku · high | Opus · medium | Opus · high |
|
|
97
102
|
| medium | ops | Haiku · medium | Haiku · high | Haiku · xhigh |
|
|
98
|
-
| high | code, debug, explore, plan, review, docs, uncertain | Opus · medium | Opus · high | Opus · xhigh |
|
|
99
|
-
|
|
|
100
|
-
| uncertain | code, debug, plan, review | Sonnet · medium | Sonnet · high | Sonnet · xhigh |
|
|
103
|
+
| high | code, debug, explore, plan, review, ops, docs, uncertain | Opus · medium | Opus · high | Opus · xhigh |
|
|
104
|
+
| uncertain | code, debug, plan, review | Haiku · high | Sonnet · high | Sonnet · xhigh |
|
|
101
105
|
| uncertain | explore, ops, docs, uncertain | Haiku · medium | Haiku · high | Haiku · xhigh |
|
|
102
106
|
<!-- mode-matrix:end -->
|
|
103
107
|
|
|
104
108
|
## Known trade-offs
|
|
105
109
|
|
|
106
|
-
The steps are fixed rules, with no per-activity exceptions.
|
|
107
|
-
|
|
110
|
+
The steps are fixed rules, with no per-activity exceptions. Before 1.21.1, `cost` ran `high` ops on Haiku 5.5 and `low`
|
|
111
|
+
code on Sonnet 5.5 at medium, which scored below Haiku 5.5 at high on FrontierCode and costs more per token. One cell
|
|
112
|
+
still goes against this router's own model notes (`lib/config.mjs`):
|
|
108
113
|
|
|
109
|
-
- `cost` at `
|
|
110
|
-
|
|
111
|
-
or switch to `balanced`.
|
|
112
|
-
- `cost` at `low` for **code, debug, plan and review** runs Sonnet 5.5 at medium, which scored below Haiku 5.5 at high
|
|
113
|
-
on FrontierCode and costs more per token.
|
|
114
|
+
- `cost` at `medium` for **ops** runs Haiku 5.5 at medium, although Haiku trails on shell work (Artificial Analysis
|
|
115
|
+
v5.0.1 Terminal-Bench 4.0: Haiku 5.5 15.2% at medium, Sonnet 5.5 29.8%). Repeated tool errors still escalate it.
|
|
114
116
|
|
|
115
|
-
With the built-in routes, `cost` at `low` runs Haiku 5.5 at medium
|
|
117
|
+
With the built-in routes, `cost` at `low` runs Haiku 5.5 at medium for read-only work and Haiku 5.5 at high for code.
|
|
116
118
|
|
|
117
119
|
## Measured impact
|
|
118
120
|
|
|
119
|
-
One 5-turn coding task (read two files, add a function with tests, run the tests, review, add edge-case tests), the
|
|
121
|
+
Measured on 1.16, before the 1.21.1 rule and policy changes, which are not measured yet. One 5-turn coding task (read two files, add a function with tests, run the tests, review, add edge-case tests), the
|
|
120
122
|
same prompts in a new session per mode, Jev classifier, built-in routes. Cost is a list-price estimate of the measured
|
|
121
123
|
tokens ([raw results](../experiments/mod-router/results/mode-live-acceptance.json)).
|
|
122
124
|
|