@alexeiled/claude-router 1.4.1 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,45 +1,69 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 626 363" role="img" aria-labelledby="title desc">
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 899 401" role="img" aria-labelledby="title desc">
2
2
  <title id="title">Router pane, Classifier tab</title>
3
3
  <desc id="desc">The classifier rows with the active one marked, a missing Jev API key with Set up, the deadline, health, the receiving host and the credentials each classifier needs, 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="626" height="363" rx="8" fill="#1c1c1c"/>
9
- <rect x="10" y="10" width="606" height="343" rx="6" fill="none" stroke="#3f5f8f"/>
10
- <text x="24.0" y="34" fill="#5fafd7" font-weight="700" xml:space="preserve">ROUTER · Auto</text>
11
- <text x="148.8" y="34" fill="#87d787" xml:space="preserve">Clef Flash ready</text>
12
- <text x="24.0" y="53" fill="#87afff" font-weight="700" xml:space="preserve">[ Auto ]</text>
13
- <text x="94.2" y="53" fill="#d0d0d0" xml:space="preserve">[ Manual ]</text>
14
- <text x="172.2" y="53" fill="#7c7c7c" xml:space="preserve"> Manual keeps the /model choice</text>
8
+ <rect width="899" height="401" rx="8" fill="#1c1c1c"/>
9
+ <rect x="10" y="10" width="879" height="381" rx="6" fill="none" stroke="#3f5f8f"/>
10
+ <text x="24.0" y="34" fill="#5fafd7" font-weight="700" xml:space="preserve">ROUTING · on</text>
11
+ <text x="141.0" y="34" fill="#87d787" xml:space="preserve">Clef Flash ready</text>
12
+ <rect x="24.0" y="39" width="109.2" height="18" rx="4" fill="#87afff"/>
13
+ <text x="24.0" y="53" fill="#0d1016" font-weight="700" xml:space="preserve">[ Routing on ]</text>
14
+ <rect x="141.0" y="39" width="117.0" height="18" rx="4" fill="#2e3340"/>
15
+ <text x="141.0" y="53" fill="#d0d0d0" xml:space="preserve">[ Routing off ]</text>
16
+ <text x="258.0" y="53" fill="#7c7c7c" xml:space="preserve"> Routing off keeps the /model choice</text>
17
+ <rect x="24.0" y="58" width="54.6" height="18" rx="4" fill="#2e3340"/>
15
18
  <text x="24.0" y="72" fill="#d0d0d0" xml:space="preserve">[ Now ]</text>
19
+ <rect x="86.4" y="58" width="85.8" height="18" rx="4" fill="#2e3340"/>
16
20
  <text x="86.4" y="72" fill="#d0d0d0" xml:space="preserve">[ Routing ]</text>
17
- <text x="180.0" y="72" fill="#87afff" font-weight="700" xml:space="preserve">[ Classifier ]</text>
21
+ <rect x="180.0" y="58" width="109.2" height="18" rx="4" fill="#87afff"/>
22
+ <text x="180.0" y="72" fill="#0d1016" font-weight="700" xml:space="preserve">[ Classifier ]</text>
23
+ <rect x="297.0" y="58" width="70.2" height="18" rx="4" fill="#2e3340"/>
18
24
  <text x="297.0" y="72" fill="#d0d0d0" xml:space="preserve">[ Usage ]</text>
25
+ <rect x="375.0" y="58" width="39.0" height="18" rx="4" fill="#2e3340"/>
19
26
  <text x="375.0" y="72" fill="#d0d0d0" xml:space="preserve">[ ? ]</text>
20
27
  <text x="24.0" y="110" fill="#5fafd7" font-weight="700" xml:space="preserve">CLASSIFIER</text>
21
28
  <text x="102.0" y="110" fill="#7c7c7c" xml:space="preserve"> · applies next turn · saves at once</text>
22
29
  <text x="24.0" y="129" fill="#7c7c7c" xml:space="preserve">Asked once per new turn.</text>
30
+ <rect x="24.0" y="134" width="132.6" height="18" rx="4" fill="#2e3340"/>
23
31
  <text x="24.0" y="148" fill="#d0d0d0" xml:space="preserve">[ ○ Jev ]</text>
24
32
  <text x="164.4" y="148" fill="#7c7c7c" xml:space="preserve">api.typesafe.ai</text>
25
33
  <text x="320.4" y="148" fill="#d7af5f" xml:space="preserve">○ no API key </text>
34
+ <rect x="429.6" y="134" width="78.0" height="18" rx="4" fill="#2e3340"/>
26
35
  <text x="429.6" y="148" fill="#d0d0d0" xml:space="preserve">[ Set up ]</text>
36
+ <rect x="24.0" y="153" width="132.6" height="18" rx="4" fill="#2e3340"/>
27
37
  <text x="24.0" y="167" fill="#d0d0d0" xml:space="preserve">[ ○ Clef ]</text>
28
38
  <text x="164.4" y="167" fill="#7c7c7c" xml:space="preserve">api.cloudflare.com</text>
29
39
  <text x="320.4" y="167" fill="#87d787" xml:space="preserve">● ready</text>
30
- <text x="24.0" y="186" fill="#87afff" font-weight="700" xml:space="preserve">[ ◉ Clef Flash ]</text>
40
+ <rect x="24.0" y="172" width="132.6" height="18" rx="4" fill="#87afff"/>
41
+ <text x="24.0" y="186" fill="#0d1016" font-weight="700" xml:space="preserve">[ ◉ Clef Flash ]</text>
31
42
  <text x="164.4" y="186" fill="#7c7c7c" xml:space="preserve">api.cloudflare.com</text>
32
43
  <text x="320.4" y="186" fill="#87d787" xml:space="preserve">● ready</text>
33
- <text x="24.0" y="205" fill="#d0d0d0" xml:space="preserve">Deadline</text>
34
- <text x="94.2" y="205" fill="#d0d0d0" xml:space="preserve">3000 ms ▾</text>
35
- <text x="187.8" y="205" fill="#7c7c7c" xml:space="preserve">then keep the model</text>
36
- <text x="24.0" y="224" fill="#d0d0d0" xml:space="preserve">Health active · 0 recent failures</text>
37
- <text x="24.0" y="243" fill="#7c7c7c" xml:space="preserve">Sends prompt + 6 recent turns → api.cloudflare.com</text>
38
- <text x="24.0" y="262" fill="#d0d0d0" xml:space="preserve">Credentials </text>
39
- <text x="125.4" y="262" fill="#d0d0d0" xml:space="preserve">[ Edit ]</text>
40
- <text x="187.8" y="262" fill="#7c7c7c" xml:space="preserve"> opens /plugin configure</text>
41
- <text x="24.0" y="281" fill="#7c7c7c" xml:space="preserve"> Jev: API key · Clef, Clef Flash: API token, account ID</text>
42
- <text x="24.0" y="319" fill="#87d787" xml:space="preserve">Saved: classifier Clef → Clef Flash. Applies from the next turn. </text>
43
- <text x="538.8" y="319" fill="#d0d0d0" xml:space="preserve">[ Undo ]</text>
44
- <text x="24.0" y="338" fill="#d0d0d0" xml:space="preserve">[ Close ]</text>
44
+ <rect x="24.0" y="191" width="132.6" height="18" rx="4" fill="#2e3340"/>
45
+ <text x="24.0" y="205" fill="#d0d0d0" xml:space="preserve">[ ○ OpenAI ]</text>
46
+ <text x="164.4" y="205" fill="#7c7c7c" xml:space="preserve">api.openai.com</text>
47
+ <text x="320.4" y="205" fill="#d7af5f" xml:space="preserve">○ no API key </text>
48
+ <rect x="429.6" y="191" width="78.0" height="18" rx="4" fill="#2e3340"/>
49
+ <text x="429.6" y="205" fill="#d0d0d0" xml:space="preserve">[ Set up ]</text>
50
+ <rect x="24.0" y="210" width="132.6" height="18" rx="4" fill="#2e3340"/>
51
+ <text x="24.0" y="224" fill="#d0d0d0" xml:space="preserve">[ ○ Ollama ]</text>
52
+ <text x="164.4" y="224" fill="#7c7c7c" xml:space="preserve">127.0.0.1:11434</text>
53
+ <text x="320.4" y="224" fill="#87d787" xml:space="preserve">● ready</text>
54
+ <text x="24.0" y="243" fill="#d0d0d0" xml:space="preserve">Deadline</text>
55
+ <text x="94.2" y="243" fill="#d0d0d0" xml:space="preserve">3000 ms ▾</text>
56
+ <text x="187.8" y="243" fill="#7c7c7c" xml:space="preserve">then keep the model</text>
57
+ <text x="24.0" y="262" fill="#d0d0d0" xml:space="preserve">Health active · 0 recent failures</text>
58
+ <text x="24.0" y="281" fill="#7c7c7c" xml:space="preserve">Sends prompt + 6 recent turns → api.cloudflare.com</text>
59
+ <text x="24.0" y="300" fill="#d0d0d0" xml:space="preserve">Credentials </text>
60
+ <rect x="125.4" y="286" width="62.4" height="18" rx="4" fill="#2e3340"/>
61
+ <text x="125.4" y="300" fill="#d0d0d0" xml:space="preserve">[ Edit ]</text>
62
+ <text x="187.8" y="300" fill="#7c7c7c" xml:space="preserve"> opens /plugin configure</text>
63
+ <text x="24.0" y="319" fill="#7c7c7c" xml:space="preserve"> Jev: API key · Clef, Clef Flash: API token, account ID · OpenAI: API key · Ollama: no key needed</text>
64
+ <text x="24.0" y="357" fill="#87d787" xml:space="preserve">Saved: classifier Clef → Clef Flash. Applies from the next turn. </text>
65
+ <rect x="538.8" y="343" width="62.4" height="18" rx="4" fill="#2e3340"/>
66
+ <text x="538.8" y="357" fill="#d0d0d0" xml:space="preserve">[ Undo ]</text>
67
+ <rect x="24.0" y="362" width="70.2" height="18" rx="4" fill="#2e3340"/>
68
+ <text x="24.0" y="376" fill="#d0d0d0" xml:space="preserve">[ Close ]</text>
45
69
  </svg>
@@ -7,15 +7,22 @@
7
7
  </style>
8
8
  <rect width="594" height="496" rx="8" fill="#1c1c1c"/>
9
9
  <rect x="10" y="10" width="574" height="476" rx="6" fill="none" stroke="#3f5f8f"/>
10
- <text x="24.0" y="34" fill="#5fafd7" font-weight="700" xml:space="preserve">ROUTER · Auto</text>
11
- <text x="148.8" y="34" fill="#87d787" xml:space="preserve">Jev ready · 347 ms</text>
12
- <text x="24.0" y="53" fill="#87afff" font-weight="700" xml:space="preserve">[ Auto ]</text>
13
- <text x="94.2" y="53" fill="#d0d0d0" xml:space="preserve">[ Manual ]</text>
14
- <text x="172.2" y="53" fill="#7c7c7c" xml:space="preserve"> Manual keeps the /model choice</text>
15
- <text x="24.0" y="72" fill="#87afff" font-weight="700" xml:space="preserve">[ Now ]</text>
10
+ <text x="24.0" y="34" fill="#5fafd7" font-weight="700" xml:space="preserve">ROUTING · on</text>
11
+ <text x="141.0" y="34" fill="#87d787" xml:space="preserve">Jev ready · 347 ms</text>
12
+ <rect x="24.0" y="39" width="109.2" height="18" rx="4" fill="#87afff"/>
13
+ <text x="24.0" y="53" fill="#0d1016" font-weight="700" xml:space="preserve">[ Routing on ]</text>
14
+ <rect x="141.0" y="39" width="117.0" height="18" rx="4" fill="#2e3340"/>
15
+ <text x="141.0" y="53" fill="#d0d0d0" xml:space="preserve">[ Routing off ]</text>
16
+ <text x="258.0" y="53" fill="#7c7c7c" xml:space="preserve"> Routing off keeps the /model choice</text>
17
+ <rect x="24.0" y="58" width="54.6" height="18" rx="4" fill="#87afff"/>
18
+ <text x="24.0" y="72" fill="#0d1016" font-weight="700" xml:space="preserve">[ Now ]</text>
19
+ <rect x="86.4" y="58" width="85.8" height="18" rx="4" fill="#2e3340"/>
16
20
  <text x="86.4" y="72" fill="#d0d0d0" xml:space="preserve">[ Routing ]</text>
21
+ <rect x="180.0" y="58" width="109.2" height="18" rx="4" fill="#2e3340"/>
17
22
  <text x="180.0" y="72" fill="#d0d0d0" xml:space="preserve">[ Classifier ]</text>
23
+ <rect x="297.0" y="58" width="70.2" height="18" rx="4" fill="#2e3340"/>
18
24
  <text x="297.0" y="72" fill="#d0d0d0" xml:space="preserve">[ Usage ]</text>
25
+ <rect x="375.0" y="58" width="39.0" height="18" rx="4" fill="#2e3340"/>
19
26
  <text x="375.0" y="72" fill="#d0d0d0" xml:space="preserve">[ ? ]</text>
20
27
  <text x="24.0" y="110" fill="#d0d0d0" xml:space="preserve">Now </text>
21
28
  <text x="78.6" y="110" fill="#e0708a" font-weight="700" xml:space="preserve">▌high </text>
@@ -29,21 +36,25 @@
29
36
  <text x="102.0" y="205" fill="#d0d0d0" xml:space="preserve">Opus 5.5 · xhigh </text>
30
37
  <text x="273.6" y="205" fill="#e0708a" xml:space="preserve">█████████░</text>
31
38
  <text x="351.6" y="205" fill="#d0d0d0" xml:space="preserve"> 88% </text>
39
+ <rect x="406.2" y="191" width="54.6" height="18" rx="4" fill="#2e3340"/>
32
40
  <text x="406.2" y="205" fill="#d0d0d0" xml:space="preserve">[ pin ]</text>
33
41
  <text x="39.6" y="224" fill="#d7af5f" font-weight="700" xml:space="preserve">medium </text>
34
42
  <text x="102.0" y="224" fill="#d0d0d0" xml:space="preserve">Opus 5.5 · medium </text>
35
43
  <text x="273.6" y="224" fill="#d7af5f" xml:space="preserve">█░░░░░░░░░</text>
36
44
  <text x="351.6" y="224" fill="#d0d0d0" xml:space="preserve"> 7% </text>
45
+ <rect x="406.2" y="210" width="54.6" height="18" rx="4" fill="#2e3340"/>
37
46
  <text x="406.2" y="224" fill="#d0d0d0" xml:space="preserve">[ pin ]</text>
38
47
  <text x="39.6" y="243" fill="#5f9fe0" font-weight="700" xml:space="preserve">low </text>
39
48
  <text x="102.0" y="243" fill="#d0d0d0" xml:space="preserve">Haiku 5.5 · high </text>
40
49
  <text x="273.6" y="243" fill="#5f9fe0" xml:space="preserve">░░░░░░░░░░</text>
41
50
  <text x="351.6" y="243" fill="#d0d0d0" xml:space="preserve"> 3% </text>
51
+ <rect x="406.2" y="229" width="54.6" height="18" rx="4" fill="#2e3340"/>
42
52
  <text x="406.2" y="243" fill="#d0d0d0" xml:space="preserve">[ pin ]</text>
43
53
  <text x="39.6" y="262" fill="#5fd7af" font-weight="700" xml:space="preserve">micro </text>
44
54
  <text x="102.0" y="262" fill="#d0d0d0" xml:space="preserve">Haiku 5.5 · medium </text>
45
55
  <text x="273.6" y="262" fill="#5fd7af" xml:space="preserve">░░░░░░░░░░</text>
46
56
  <text x="351.6" y="262" fill="#d0d0d0" xml:space="preserve"> 2% </text>
57
+ <rect x="406.2" y="248" width="54.6" height="18" rx="4" fill="#2e3340"/>
47
58
  <text x="406.2" y="262" fill="#d0d0d0" xml:space="preserve">[ pin ]</text>
48
59
  <text x="24.0" y="281" fill="#7c7c7c" xml:space="preserve"> switch needs 82% · Jev gave 88% up · tax ≈ $0.48</text>
49
60
  <text x="24.0" y="300" fill="#7c7c7c" xml:space="preserve"> Pins serve the next turn only.</text>
@@ -82,5 +93,6 @@
82
93
  <text x="24.0" y="452" fill="#d0d0d0" xml:space="preserve">Cost $18.003 </text>
83
94
  <text x="156.6" y="452" fill="#7c7c7c" xml:space="preserve">by Claude</text>
84
95
  <text x="226.8" y="452" fill="#d0d0d0" xml:space="preserve"> · cache saved ≈ $1.52</text>
96
+ <rect x="24.0" y="457" width="70.2" height="18" rx="4" fill="#2e3340"/>
85
97
  <text x="24.0" y="471" fill="#d0d0d0" xml:space="preserve">[ Close ]</text>
86
98
  </svg>
@@ -7,15 +7,22 @@
7
7
  </style>
8
8
  <rect width="594" height="686" rx="8" fill="#1c1c1c"/>
9
9
  <rect x="10" y="10" width="574" height="666" rx="6" fill="none" stroke="#3f5f8f"/>
10
- <text x="24.0" y="34" fill="#5fafd7" font-weight="700" xml:space="preserve">ROUTER · Auto</text>
11
- <text x="148.8" y="34" fill="#87d787" xml:space="preserve">Jev ready · 347 ms</text>
12
- <text x="24.0" y="53" fill="#87afff" font-weight="700" xml:space="preserve">[ Auto ]</text>
13
- <text x="94.2" y="53" fill="#d0d0d0" xml:space="preserve">[ Manual ]</text>
14
- <text x="172.2" y="53" fill="#7c7c7c" xml:space="preserve"> Manual keeps the /model choice</text>
10
+ <text x="24.0" y="34" fill="#5fafd7" font-weight="700" xml:space="preserve">ROUTING · on</text>
11
+ <text x="141.0" y="34" fill="#87d787" xml:space="preserve">Jev ready · 347 ms</text>
12
+ <rect x="24.0" y="39" width="109.2" height="18" rx="4" fill="#87afff"/>
13
+ <text x="24.0" y="53" fill="#0d1016" font-weight="700" xml:space="preserve">[ Routing on ]</text>
14
+ <rect x="141.0" y="39" width="117.0" height="18" rx="4" fill="#2e3340"/>
15
+ <text x="141.0" y="53" fill="#d0d0d0" xml:space="preserve">[ Routing off ]</text>
16
+ <text x="258.0" y="53" fill="#7c7c7c" xml:space="preserve"> Routing off keeps the /model choice</text>
17
+ <rect x="24.0" y="58" width="54.6" height="18" rx="4" fill="#2e3340"/>
15
18
  <text x="24.0" y="72" fill="#d0d0d0" xml:space="preserve">[ Now ]</text>
16
- <text x="86.4" y="72" fill="#87afff" font-weight="700" xml:space="preserve">[ Routing ● ]</text>
19
+ <rect x="86.4" y="58" width="101.4" height="18" rx="4" fill="#87afff"/>
20
+ <text x="86.4" y="72" fill="#0d1016" font-weight="700" xml:space="preserve">[ Routing ● ]</text>
21
+ <rect x="195.6" y="58" width="109.2" height="18" rx="4" fill="#2e3340"/>
17
22
  <text x="195.6" y="72" fill="#d0d0d0" xml:space="preserve">[ Classifier ]</text>
23
+ <rect x="312.6" y="58" width="70.2" height="18" rx="4" fill="#2e3340"/>
18
24
  <text x="312.6" y="72" fill="#d0d0d0" xml:space="preserve">[ Usage ]</text>
25
+ <rect x="390.6" y="58" width="39.0" height="18" rx="4" fill="#2e3340"/>
19
26
  <text x="390.6" y="72" fill="#d0d0d0" xml:space="preserve">[ ? ]</text>
20
27
  <text x="24.0" y="110" fill="#5fafd7" font-weight="700" xml:space="preserve">ROUTES</text>
21
28
  <text x="70.8" y="110" fill="#7c7c7c" xml:space="preserve"> · applies next turn · edit, then Save</text>
@@ -53,6 +60,7 @@
53
60
  <text x="24.0" y="319" fill="#7c7c7c" xml:space="preserve">· </text>
54
61
  <text x="39.6" y="319" fill="#d0d0d0" xml:space="preserve">micro → low </text>
55
62
  <text x="164.4" y="319" fill="#d0d0d0" xml:space="preserve">same model, new effort: priced as a new cache</text>
63
+ <rect x="24.0" y="324" width="218.4" height="18" rx="4" fill="#2e3340"/>
56
64
  <text x="24.0" y="338" fill="#d0d0d0" xml:space="preserve">[ Reset routes to defaults ]</text>
57
65
  <text x="24.0" y="357" fill="#7c7c7c" xml:space="preserve">A new model ID needs router.json → models: price, window, efforts.</text>
58
66
  <text x="24.0" y="395" fill="#5fafd7" font-weight="700" xml:space="preserve">POLICY</text>
@@ -66,16 +74,21 @@
66
74
  <text x="24.0" y="452" fill="#d0d0d0" xml:space="preserve">Credits cap</text>
67
75
  <text x="180.0" y="452" fill="#d0d0d0" xml:space="preserve">$2.00 ▾</text>
68
76
  <text x="289.2" y="452" fill="#7c7c7c" xml:space="preserve">max cold write on credits</text>
77
+ <rect x="24.0" y="457" width="218.4" height="18" rx="4" fill="#2e3340"/>
69
78
  <text x="24.0" y="471" fill="#d0d0d0" xml:space="preserve">[ Reset policy to defaults ]</text>
70
79
  <text x="24.0" y="509" fill="#5fafd7" font-weight="700" xml:space="preserve">CONFIG</text>
71
80
  <text x="24.0" y="528" fill="#d0d0d0" xml:space="preserve">File ~/.claude/router.json </text>
81
+ <rect x="273.6" y="514" width="62.4" height="18" rx="4" fill="#2e3340"/>
72
82
  <text x="273.6" y="528" fill="#d0d0d0" xml:space="preserve">[ copy ]</text>
73
83
  <text x="24.0" y="547" fill="#7c7c7c" xml:space="preserve">Main conversation only. Subagents keep their own model.</text>
74
84
  <text x="24.0" y="585" fill="#7c7c7c" xml:space="preserve">router.json changes:</text>
75
85
  <text x="24.0" y="604" fill="#e06c6c" xml:space="preserve">- routes.medium Opus 5.5 · medium</text>
76
86
  <text x="24.0" y="623" fill="#87d787" xml:space="preserve">+ routes.medium Sonnet 5.5 · xhigh</text>
77
87
  <text x="24.0" y="642" fill="#d7af5f" xml:space="preserve">● 1 unsaved routing change </text>
78
- <text x="242.4" y="642" fill="#87afff" font-weight="700" xml:space="preserve">[ Save ]</text>
88
+ <rect x="242.4" y="628" width="62.4" height="18" rx="4" fill="#87afff"/>
89
+ <text x="242.4" y="642" fill="#0d1016" font-weight="700" xml:space="preserve">[ Save ]</text>
90
+ <rect x="312.6" y="628" width="85.8" height="18" rx="4" fill="#2e3340"/>
79
91
  <text x="312.6" y="642" fill="#d0d0d0" xml:space="preserve">[ Discard ]</text>
92
+ <rect x="24.0" y="647" width="70.2" height="18" rx="4" fill="#2e3340"/>
80
93
  <text x="24.0" y="661" fill="#d0d0d0" xml:space="preserve">[ Close ]</text>
81
94
  </svg>
@@ -9,7 +9,7 @@ claude plugin marketplace add alexei-led/claude-router
9
9
  claude plugin install router@alexei-led-claude-router
10
10
  ```
11
11
 
12
- Start with the full baseline model so Auto mode has a known starting point:
12
+ Start with the full baseline model so routing has a known starting point:
13
13
 
14
14
  ```sh
15
15
  claude --model claude-haiku-5-5
@@ -21,8 +21,10 @@ In Claude Code:
21
21
  2. Enter the credentials of the classifier you use, and save them:
22
22
  - **Jev** (the default): the Jev API key from typesafe.ai.
23
23
  - **Clef** or **Clef Flash** on Cloudflare Workers AI: the Cloudflare API token and the Cloudflare account ID. One token covers both models.
24
- 3. To use Clef or Clef Flash, open the pane's **Classifier** tab and select its row. See [Choose the classifier](#choose-the-classifier).
25
- 4. Check the band above the prompt: `▂▄▆█ Auto · ready`. On a model that no tier routes to, the session starts in Manual; run `/router auto` to route.
24
+ - **OpenAI**: an OpenAI API key. The prompt text goes to OpenAI.
25
+ - **Ollama**: no credential. Run `ollama serve` and pull the model; the prompt text stays on this machine.
26
+ 3. To use another classifier, open the pane's **Classifier** tab and select its row. See [Choose the classifier](#choose-the-classifier).
27
+ 4. Check the band above the prompt: `Routing on · ready`. On a model that no tier routes to, the session starts with routing off and the band says why; run `/router auto` to route.
26
28
 
27
29
  Keys are stored as sensitive plugin options. Do not paste them into a model conversation. The [configuration guide](configuration.md) covers optional settings and migrations.
28
30
 
@@ -30,7 +32,7 @@ Keys are stored as sensitive plugin options. Do not paste them into a model conv
30
32
 
31
33
  Router draws one line above the prompt. The line ends with a **Router** button that opens the pane. When the band is narrow, the less important parts drop first: classifier figures, then context and cache, then the reason. The tier and model always stay, except behind a classifier warning: the warning and its **Set up** button come first, and the route gives way to them.
32
34
 
33
- ![Five band states: routed to high, two rows with the hover row, a pending pin, a missing classifier key, and Manual mode](router-band.svg)
35
+ ![Five band states: routed to high, two rows with the hover row, a pending pin, a missing classifier key, and routing off](router-band.svg)
34
36
 
35
37
  Read the first line of the picture from left to right:
36
38
 
@@ -40,19 +42,19 @@ Read the first line of the picture from left to right:
40
42
  - **Classifier support**: what the active classifier, such as Jev or Clef Flash, gave the switch against the bar the policy required.
41
43
  - **ctx** and **cache**: context use and cache reuse on the last reply. They turn yellow at 60% context and red at 80%.
42
44
 
43
- | Band shows | Meaning |
44
- | ------------------------------------------- | ------------------------------------------------------------------------------------- |
45
- | `Auto · ready` | Auto mode is ready for a new turn. |
46
- | `choosing for this turn…` | The classifier and local policy are running. The spinner says `Choosing model`. |
47
- | `⏵ next turn: high ✕` | A pin is set. **✕** cancels it. |
48
- | `⚠ Jev: no API key · keeping model` | The active classifier lacks a setting. **Set up** opens the secure plugin dialog. |
49
- | `⚠ Clef: no account ID · keeping model` | Clef has its API token but no Cloudflare account ID. **Set up** opens the dialog. |
50
- | `⚠ Jev timed out · keeping model` | The classifier failed: timed out, unreachable, rejected the key, or paused. |
51
- | `○ Router off · keeping …` | Manual mode. **Auto** resumes routing. The footer also shows `router off`. |
52
- | `✕ Router unavailable` | Nothing routes: an old Claude Code or leftover v0.8 settings. **Fix** opens the pane. |
53
- | `○ Router · subagents keep their own model` | You are viewing a subagent's transcript, which Router does not route. |
45
+ | Band shows | Meaning |
46
+ | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
47
+ | `Routing on · ready` | Routing is on and ready for a new turn. |
48
+ | `choosing for this turn…` | The classifier and local policy are running. The spinner says `Choosing model`. |
49
+ | `⏵ next turn: high ✕` | A pin is set. **✕** cancels it. |
50
+ | `⚠ Jev: no API key · keeping model` | The active classifier lacks a setting. **Set up** opens the secure plugin dialog. |
51
+ | `⚠ Clef: no account ID · keeping model` | Clef has its API token but no Cloudflare account ID. **Set up** opens the dialog. |
52
+ | `⚠ Jev timed out · keeping model` | The classifier failed: timed out, unreachable, rejected the key, or paused. |
53
+ | `○ Routing off · every turn uses …` | Routing is off: Claude's model answers every turn. **Routing on** turns it back on. The footer also shows `routing off`. |
54
+ | `✕ Routing unavailable` | Nothing routes: an old Claude Code or leftover v0.8 settings. **Fix** opens the pane. |
55
+ | `○ Router · subagents keep their own model` | You are viewing a subagent's transcript, which Router does not route. |
54
56
 
55
- Hover over the band for a second row: pin a tier for the next turn, switch to Manual, or show two rows. The two-row band adds a strip of recent replies colored by tier, the switch count, the switch tax, and the cache saving. Router remembers that choice across sessions. When Router changes the model between turns, a toast shows the old and new model and the reason. A pin does not raise one, and neither does a change of effort alone.
57
+ The band's **Routing off** button turns routing off, and **Routing on** turns it back on. Hover over the band for a second row: pin a tier for the next turn, or show two rows. The two-row band adds a strip of recent replies colored by tier, the switch count, the switch tax, and the cache saving. Router remembers that choice across sessions. When Router changes the model between turns, a toast reads `Model changed: old → new · reason`. A pin does not raise one, and neither does a change of effort alone.
56
58
 
57
59
  The band steps aside while a survey needs the space.
58
60
 
@@ -77,7 +79,7 @@ The **Routing** tab edits the routes and the policy. In the picture, `medium` wa
77
79
  | 3 Classifier | The classifier rows with their credentials state, the active classifier's deadline and health, and the credentials each classifier needs. |
78
80
  | 4 Usage | Claude-reported cost, context and cache detail, input per reply, quota, and configured-price estimates. |
79
81
 
80
- **Auto** and **Manual** stay at the top of every tab. **?** shows what the estimates leave out.
82
+ **Routing on** and **Routing off** stay at the top of every tab. **?** shows what the estimates leave out.
81
83
 
82
84
  ### Save and undo changes
83
85
 
@@ -94,7 +96,7 @@ Every write applies from the next turn and can be undone. **Undo** (`u`) puts ba
94
96
  - **Context** compares the larger available context reading with the routed model's configured window. The router reserves 20% of that window. Values can be unknown when Claude does not provide the needed estimate.
95
97
  - **Cache** reuse is cache-read tokens divided by the last response's input counters.
96
98
  - **Classifier support**, such as **Jev support**, is the probability the classifier gave each tier on the last classified turn. The line under it compares the support for a switch with the bar the policy required, and shows the estimated switch tax.
97
- - **Replies** colors each of the last 30 main-conversation replies by the tier that served it. A dot marks a reply the router did not choose, such as one in Manual mode.
99
+ - **Replies** colors each of the last 30 main-conversation replies by the tier that served it. A dot marks a reply the router did not choose, such as one with routing off.
98
100
  - **Input per reply** scales the last 30 input sizes from the lowest to the highest reading. It is a scale comparison, not a forecast.
99
101
  - **Cache read benefit** is a configured-price estimate for cached reads before write costs. It is not a measured saving.
100
102
  - **Next-turn difference** compares the candidate with the current model under five-minute and one-hour cache-write scenarios. A negative number means the candidate is estimated to cost less for that request.
@@ -104,17 +106,17 @@ There is no router-side spend or savings ledger. The pane does not include class
104
106
 
105
107
  ## Change routing
106
108
 
107
- | Command or action | Result |
108
- | ---------------------------------------- | --------------------------------------------------------------------------- |
109
- | `/router` | Open the pane. |
110
- | `/router auto` | Resume automatic routing. |
111
- | `/router off` | Enter Manual mode and preserve Claude's selected model. |
112
- | `/router pin <micro\|low\|medium\|high>` | Pin the next turn and its tool continuations. Auto must already be enabled. |
113
- | `/model <name>` | Select a model and enter Manual mode. Use `/router auto` to resume. |
114
- | **Auto** / **Manual** | The same as `/router auto` and `/router off`. |
115
- | **pin** on the Now tab | Pin that tier for the next turn. Auto must already be enabled. |
109
+ | Command or action | Result |
110
+ | ---------------------------------------- | --------------------------------------------------------------------------------- |
111
+ | `/router` | Open the pane. |
112
+ | `/router auto` | Resume automatic routing. |
113
+ | `/router off` | Turn routing off and keep Claude's selected model. |
114
+ | `/router pin <micro\|low\|medium\|high>` | Pin the next turn and its tool continuations. Routing on must already be enabled. |
115
+ | `/model <name>` | Select a model and turn routing off. Use `/router auto` to turn it back on. |
116
+ | **Routing on** / **Routing off** | The same as `/router auto` and `/router off`. |
117
+ | **pin** on the Now tab | Pin that tier for the next turn. Routing on must already be enabled. |
116
118
 
117
- A pin does not change the next turn after the pinned turn finishes. A fresh session on a model that one of the tiers routes to starts in Auto. A fresh session on any other model starts in Manual. `/clear` starts the new session in Auto. Resuming a saved session restores its saved Auto or Manual mode.
119
+ A pin does not change the next turn after the pinned turn finishes. A fresh session on a model that one of the tiers routes to starts with routing on. A fresh session on any other model starts with routing off. `/clear` starts the new session with routing on. Resuming a saved session restores its saved routing on or off.
118
120
 
119
121
  ## Edit routes and policy
120
122
 
@@ -138,13 +140,15 @@ Under **Policy** on the same tab, pick the values. One **Save** writes them with
138
140
 
139
141
  ## Choose the classifier
140
142
 
141
- Router asks one classifier per turn. Three are built in:
143
+ Router asks one classifier per turn. Five are built in:
142
144
 
143
145
  | Classifier | Service | Credentials | Deadline |
144
146
  | ---------- | -------------------------- | ---------------------------------------------- | -------: |
145
147
  | Jev | typesafe.ai | Jev API key | 1,500 ms |
146
148
  | Clef | Cloudflare Workers AI, 27B | Cloudflare API token and Cloudflare account ID | 3,000 ms |
147
149
  | Clef Flash | Cloudflare Workers AI, 9B | Cloudflare API token and Cloudflare account ID | 3,000 ms |
150
+ | OpenAI | OpenAI, `gpt-6-luna` | OpenAI API key | 3,000 ms |
151
+ | Ollama | Local Ollama, `qwen3.5:9b` | None | 5,000 ms |
148
152
 
149
153
  ![The Classifier tab: classifier rows with the active one marked, a missing Jev API key with Set up, the deadline, health, the receiving host, the credentials each classifier needs, and Undo after a switch](router-pane-classifier.svg)
150
154
 
@@ -152,13 +156,23 @@ You can save credentials for all of them; only the active one is asked. The **Cl
152
156
 
153
157
  Select a row to switch. The choice is written to `router.json` at once and applies from the next turn. **Undo** in the status bar returns to the previous classifier. A turn that is already being classified finishes with the classifier it started with. The new classifier starts with a clean failure count.
154
158
 
155
- - **Deadline:** 500, 1,000, 1,500, or 3,000 ms for the active classifier's total advice attempt, including any retry. Each classifier keeps its own deadline, saved at once, with **Undo**.
159
+ - **Deadline:** 500, 1,000, 1,500, 3,000, or 5,000 ms for the active classifier's total advice attempt, including any retry. Each classifier keeps its own deadline, saved at once, with **Undo**.
156
160
  - **Health** shows recent failures or a pause. **Sends** names the service that receives prompt text.
157
- - **Credentials** lists what each classifier needs, such as `Jev: API key · Clef, Clef Flash: API token, account ID`. **Edit** opens Claude Code's secure plugin configuration, where you enter them.
161
+ - **Credentials** lists what each classifier needs, such as `Jev: API key · Clef, Clef Flash: API token, account ID · OpenAI: API key · Ollama: no key needed`. **Edit** opens Claude Code's secure plugin configuration, where you enter them.
158
162
 
159
- **Sends** names the service that receives the prompt and recent dialogue. With Clef or Clef Flash that is Cloudflare, not typesafe.ai. Give the Cloudflare token Workers AI permissions only.
163
+ **Sends** names the service that receives the prompt and recent dialogue. With Clef or Clef Flash that is Cloudflare, not typesafe.ai; with OpenAI it is OpenAI; with Ollama it stays on this machine. Give the Cloudflare token Workers AI permissions only.
160
164
 
161
- The routing policy thresholds were tuned against Jev's probabilities. Clef's probabilities have not been compared with Jev's, so the same prompt can switch tiers at a different point. Watch **Classifier support** for a few sessions before you rely on a new classifier.
165
+ The routing policy thresholds were tuned against Jev's probabilities. Clef's, OpenAI's, and Ollama's probabilities have not been compared with Jev's, so the same prompt can switch tiers at a different point. Watch **Classifier support** for a few sessions before you rely on a new classifier.
166
+
167
+ ### Use Ollama
168
+
169
+ Ollama runs the classifier on this machine, so the prompt text does not leave it. It needs no key.
170
+
171
+ 1. Install Ollama and pull a model: `ollama pull qwen3.5:9b`.
172
+ 2. Start the server: `ollama serve`. The router calls `http://127.0.0.1:11434`.
173
+ 3. On the pane's **Classifier** tab, select the **Ollama** row, or set `"classifier": "ollama"` in `router.json`.
174
+
175
+ The model is the `model` field of `classifiers.ollama` in [Configuration](configuration.md#ollama). To use another tag, pull it and set `"classifiers": { "ollama": { "model": "<tag>" } }`.
162
176
 
163
177
  ## Move from v0.8 gateway setup
164
178
 
@@ -179,16 +193,20 @@ To stop routing for a session, run `/router off`. To stop loading the Mod, run `
179
193
 
180
194
  ## Troubleshooting
181
195
 
182
- | Symptom | Cause | Fix |
183
- | ------------------------------------------ | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
184
- | Status says `no API key` or `no API token` | The active classifier's plugin option is unset or unavailable to this process. | Select **Set up** in the pane, or run `/plugin configure router`. Save the option and start a new turn. |
185
- | Status says `no account ID` | Clef or Clef Flash is active without the Cloudflare account ID. | Run `/plugin configure router` and save the Cloudflare account ID. |
186
- | Route stays on the current model | The classifier timed out, failed, is paused, or network policy refused it. | Read the status band and the pane header. Network policy refusal is not bypassed. |
187
- | `/model` changed but routing stopped | Choosing a model enters Manual mode. | Run `/router auto` to resume automatic routing. |
188
- | Router reports invalid configuration | `router.json` is invalid, or project/local settings redirect the router profile. | Inspect `router.json`, remove project/local `HOME` or `CLAUDE_CONFIG_DIR` overrides, or run the [migration command](configuration.md#convert-an-older-routerjson). |
189
- | Router says old settings need migration | `router.json` still contains v0.8 gateway keys or the 1.1 `jev` section. | Run the [migration command](configuration.md#convert-an-older-routerjson). |
190
- | Band reads `v0.8 gateway settings remain` | The `jev-router[1m]` model or the `127.0.0.1:43170` base URL is still set. | Run `/router`: it lists the keys. Remove them as in the [migration checklist](configuration.md#convert-a-v08-configuration) and restart. |
191
- | Router controls are unavailable | Claude Code is older than 2.1.289. | Update Claude Code. |
192
- | Context reads as unknown | The router lacks a reliable local estimate or current-history measurement. | Keep using the current model, or start a new history with a supported context estimate. |
196
+ | Symptom | Cause | Fix |
197
+ | ------------------------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
198
+ | Status says `no API key` or `no API token` | The active classifier's plugin option is unset or unavailable to this process. | Select **Set up** in the pane, or run `/plugin configure router`. Save the option and start a new turn. |
199
+ | Status says `no account ID` | Clef or Clef Flash is active without the Cloudflare account ID. | Run `/plugin configure router` and save the Cloudflare account ID. |
200
+ | Route stays on the current model | The classifier timed out, failed, is paused, or network policy refused it. | Read the status band and the pane header. Network policy refusal is not bypassed. |
201
+ | `/model` changed but routing stopped | Choosing a model turns routing off. | Run `/router auto` to turn routing back on. |
202
+ | Router reports invalid configuration | `router.json` is invalid, or project/local settings redirect the router profile. | Inspect `router.json`, remove project/local `HOME` or `CLAUDE_CONFIG_DIR` overrides, or run the [migration command](configuration.md#convert-an-older-routerjson). |
203
+ | Router says old settings need migration | `router.json` still contains v0.8 gateway keys or the 1.1 `jev` section. | Run the [migration command](configuration.md#convert-an-older-routerjson). |
204
+ | `⚠ OpenAI rejected the key · keeping model` | The OpenAI key is wrong, revoked, or lacks access to `gpt-6-luna`. | Run `/plugin configure router` and save a valid OpenAI API key. |
205
+ | `⚠ Ollama unreachable · keeping model` | No Ollama server listens on `127.0.0.1:11434`. | Run `ollama serve`, then start a new turn. |
206
+ | `⚠ Ollama timed out · keeping model` | The model is loading after an idle period, or the machine is slow. | Wait for one more turn. If it recurs, raise `classifiers.ollama.timeoutMs` in `router.json`. |
207
+ | `⚠ Ollama request failed · keeping model` | The tag in `model` is not pulled, or Ollama rejected a request setting. | Run `ollama pull <model>` for the tag in `model`, or choose another model. |
208
+ | Band reads `v0.8 gateway settings remain` | The `jev-router[1m]` model or the `127.0.0.1:43170` base URL is still set. | Run `/router`: it lists the keys. Remove them as in the [migration checklist](configuration.md#convert-a-v08-configuration) and restart. |
209
+ | Router controls are unavailable | Claude Code is older than 2.1.289. | Update Claude Code. |
210
+ | Context reads as unknown | The router lacks a reliable local estimate or current-history measurement. | Keep using the current model, or start a new history with a supported context estimate. |
193
211
 
194
212
  For the internal event flow and network deadline behavior, see [Architecture](architecture.md). For what the test traces do and do not show, see [Evaluation](evaluation.md).
@@ -22,6 +22,7 @@ import {
22
22
  GATEWAY_CLEANUP,
23
23
  GATEWAY_SETTINGS,
24
24
  missingCredentials,
25
+ NOT_A_TIER_REASON,
25
26
  } from '../lib/display.mjs';
26
27
  import { clip } from '../lib/facts.mjs';
27
28
  import { renderPanel, routeDraftOf, routingChanges } from '../lib/panel.mjs';
@@ -95,13 +96,20 @@ async function modeOf($, router, fallback = 'auto') {
95
96
  }
96
97
  }
97
98
 
98
- // A saved preference wins; a fresh session starts Auto on a model some tier routes to and Manual on any other.
99
+ // A saved preference wins; a fresh session starts with routing on for a model some tier routes to, and off for any other.
99
100
  async function startMode($, router, model) {
100
101
  const mode = await modeOf($, router, tierForModel(router.config, model) === null ? 'manual' : 'auto');
101
102
  router.modes.set(await $.session.id(), mode);
102
103
  return mode;
103
104
  }
104
105
 
106
+ // A fresh Manual start on a non-tier model gets a reason the band can show; a saved mode carries none.
107
+ async function startView($, router, model) {
108
+ const fresh = (await modeOf($, router, null)) === null;
109
+ const mode = await startMode($, router, model);
110
+ return fresh && mode === 'manual' ? { mode, reason: NOT_A_TIER_REASON } : { mode };
111
+ }
112
+
105
113
  async function rememberMode($, mode) {
106
114
  try {
107
115
  await $.store.set(`${MODE_PREFIX}${await $.session.id()}`, mode);
@@ -133,7 +141,7 @@ async function changeMode($, router, mode) {
133
141
  mode,
134
142
  pendingPin: null,
135
143
  phase: view.phase === 'unavailable' ? 'unavailable' : mode === 'manual' ? 'manual' : 'ready',
136
- reason: mode === 'manual' ? 'routing paused' : 'ready',
144
+ reason: mode === 'manual' ? 'routing off' : 'ready',
137
145
  ...(!saved ? { notice: 'Mode changed for this session. Resume preference could not be saved.' } : {}),
138
146
  });
139
147
  }
@@ -142,7 +150,7 @@ async function setPin($, router, tier) {
142
150
  const view = router.view ?? (await readView($, router));
143
151
  if (view.phase === 'unavailable') return `Routing unavailable: ${view.error}.`;
144
152
  const mode = await modeOf($, router, view.mode);
145
- if (mode === 'manual') return 'Routing is paused. Select Auto before pinning a turn.';
153
+ if (mode === 'manual') return 'Routing is off. Turn routing on before pinning a turn.';
146
154
  await updateView($, router, { pendingPin: tier });
147
155
  return `${tier} pinned for the next turn and its tool continuations.`;
148
156
  }
@@ -161,6 +169,8 @@ async function envSettingOf($, name) {
161
169
  return (
162
170
  (await $.env.get('CLOUDFLARE_ACCOUNT_ID')) || (await $.env.get('CLAUDE_PLUGIN_OPTION_CLOUDFLARE_ACCOUNT_ID'))
163
171
  );
172
+ case 'openai_api_key':
173
+ return (await $.env.get('OPENAI_API_KEY')) || (await $.env.get('CLAUDE_PLUGIN_OPTION_OPENAI_API_KEY'));
164
174
  default:
165
175
  return null;
166
176
  }
@@ -219,9 +229,9 @@ async function saveConfig($, path, change) {
219
229
  }
220
230
 
221
231
  function detailText(config, view) {
222
- const missing = missingCredentials(view, config.classifier);
232
+ const missing = missingCredentials(config, view, config.classifier);
223
233
  return [
224
- `Router — ${view.mode === 'auto' ? 'Auto' : 'Manual'}`,
234
+ `Router — routing ${view.mode === 'auto' ? 'on' : 'off'}`,
225
235
  `Native model: ${view.nativeModel}`,
226
236
  `Selected: ${view.selectedModel ?? 'not selected'}`,
227
237
  `Observed: ${view.actualModel ?? 'no response yet'}`,
@@ -230,7 +240,7 @@ function detailText(config, view) {
230
240
  `Context: ${view.contextKnown ? `${view.contextTokens} tokens (estimate)` : 'unknown'}`,
231
241
  `Observed cache: ${view.cacheRead ?? 'unknown'} read, ${view.cacheWrite ?? 'unknown'} written tokens`,
232
242
  view.pendingPin ? `Next turn pin: ${view.pendingPin}` : 'No next-turn pin.',
233
- 'Auto enables routing. Manual preserves Claude’s model. Pins serve one turn only.',
243
+ 'Routing on picks a model for each turn. Routing off keeps Claude’s model. Pins serve one turn only.',
234
244
  'Cache lifetime is an estimate. Claude’s cost ledger owns session totals.',
235
245
  ...(view.error === GATEWAY_SETTINGS ? GATEWAY_CLEANUP : []),
236
246
  ].join('\n');
@@ -560,7 +570,7 @@ export function register(on, options) {
560
570
  Boolean(base?.includes('127.0.0.1:43170') || base?.includes('localhost:43170'));
561
571
  await updateView($, router, {
562
572
  nativeModel: model,
563
- mode: await startMode($, router, model),
573
+ ...(await startView($, router, model)),
564
574
  phase: gateway || !supported ? 'unavailable' : 'ready',
565
575
  error: !supported ? 'requires Claude Code 2.1.289 or newer' : gateway ? GATEWAY_SETTINGS : null,
566
576
  ...(sameClassifier ? {} : CLEARED_READINGS),
@@ -606,7 +616,7 @@ export function register(on, options) {
606
616
  const [action, tier] = e.args.trim().split(/\s+/);
607
617
  if (action === 'auto' || action === 'off') {
608
618
  await changeMode($, router, action === 'auto' ? 'auto' : 'manual');
609
- return { text: action === 'auto' ? 'Auto routing enabled.' : 'Manual mode: Claude’s model is preserved.' };
619
+ return { text: action === 'auto' ? 'Routing on.' : 'Routing off: Claude’s model is kept.' };
610
620
  }
611
621
  if (action === 'pin')
612
622
  return { text: TIERS.includes(tier) ? await setPin($, router, tier) : `Choose ${TIERS.join(', ')}.` };
@@ -769,9 +779,9 @@ export function register(on, options) {
769
779
  const view = await readView($, router);
770
780
  const label =
771
781
  view.phase === 'unavailable'
772
- ? 'router unavailable'
782
+ ? 'routing unavailable'
773
783
  : (await modeOf($, router, view.mode)) === 'manual'
774
- ? 'router off'
784
+ ? 'routing off'
775
785
  : null;
776
786
  return label ? next({ ...e, props: { ...e.props, modes: [...e.props.modes, label] } }) : next(e);
777
787
  });