@alexeiled/claude-router 1.17.0 → 1.17.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 +6 -0
- package/lib/display.mjs +2 -0
- package/lib/route.mjs +8 -4
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "router",
|
|
3
3
|
"displayName": "Router",
|
|
4
|
-
"version": "1.17.
|
|
4
|
+
"version": "1.17.1",
|
|
5
5
|
"description": "Native model and effort routing within your provider. Anthropic, DeepSeek and z.ai defaults, custom provider profiles, classifier advice and one model per subagent.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Alexei Ledenev",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.17.1 (2026-10-28)
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- When the conversation fills more than 80% of every route's context window, the band and panel say `! context full` and the router keeps Claude's model. Before, they said `! model unavailable`, which read as an outage or an `availableModels` block. `model unavailable` now means only that: a model the allowlist blocks, one that overflowed its window, or one that cannot take images.
|
|
8
|
+
|
|
3
9
|
## 1.17.0 (2026-10-28)
|
|
4
10
|
|
|
5
11
|
Route models and effort within your configured provider. Anthropic remains the default. DeepSeek and z.ai gain built-in profiles, and other Anthropic-compatible providers can use custom profiles without another proxy.
|
package/lib/display.mjs
CHANGED
|
@@ -115,6 +115,7 @@ export const REASONS = {
|
|
|
115
115
|
'cash-gate': 'estimated cold cache write exceeds the cap',
|
|
116
116
|
'context-fit': 'a larger context window is needed',
|
|
117
117
|
'context-unknown': 'context is not measured reliably',
|
|
118
|
+
'context-full': 'the context is too full for any route, so Claude’s model is kept',
|
|
118
119
|
'model-unavailable': 'the requested model is not available',
|
|
119
120
|
pinned: 'one-turn model pin',
|
|
120
121
|
manual: 'routing did not choose this turn, so Claude’s model is kept',
|
|
@@ -185,6 +186,7 @@ export const SHORT_REASONS = {
|
|
|
185
186
|
'cash-gate': '= cash cap',
|
|
186
187
|
'context-fit': '↑ context',
|
|
187
188
|
'context-unknown': '= context unknown',
|
|
189
|
+
'context-full': '! context full',
|
|
188
190
|
'model-unavailable': '! model unavailable',
|
|
189
191
|
'native-fallback': '! fallback',
|
|
190
192
|
pinned: '⏵ pinned',
|
package/lib/route.mjs
CHANGED
|
@@ -218,16 +218,18 @@ function routeTurn(config, loop, { facts, advice, pin, nativeModel, contextKnown
|
|
|
218
218
|
(!loop.decision && Object.values(config.models).find((m) => isSameModel(m.id, nativeModel))) || specOf(last);
|
|
219
219
|
const shrinksUnmeasured = (cell) =>
|
|
220
220
|
(!contextKnown || !loop.historyMeasured) && specOf(cell).contextWindow < lastSpec.contextWindow;
|
|
221
|
-
const
|
|
221
|
+
const runs = (cell) => {
|
|
222
222
|
const model = specOf(cell);
|
|
223
223
|
return (
|
|
224
224
|
!shrinksUnmeasured(cell) &&
|
|
225
225
|
(!facts.hasImages || model.imageInput !== false) &&
|
|
226
226
|
isModelAllowed(model.id, availableModels, nativeModel) &&
|
|
227
|
-
!loop.ineligible.includes(model.id)
|
|
228
|
-
(!contextKnown || costs.nextContextTokens(facts) <= model.contextWindow * CONTEXT_FILL)
|
|
227
|
+
!loop.ineligible.includes(model.id)
|
|
229
228
|
);
|
|
230
229
|
};
|
|
230
|
+
const roomFor = (cell) =>
|
|
231
|
+
!contextKnown || costs.nextContextTokens(facts) <= specOf(cell).contextWindow * CONTEXT_FILL;
|
|
232
|
+
const fits = (cell) => runs(cell) && roomFor(cell);
|
|
231
233
|
if (contextKnown) {
|
|
232
234
|
const cell = result;
|
|
233
235
|
const routeFor = (tier) => (tier === cell.tier ? routeOf(cell) : resolveRoute(config, tier, cell.activity));
|
|
@@ -243,7 +245,9 @@ function routeTurn(config, loop, { facts, advice, pin, nativeModel, contextKnown
|
|
|
243
245
|
const fallback = cells.find(
|
|
244
246
|
(cell) => cell && (cell.activity === null || cell.activity === activity) && fits(cell),
|
|
245
247
|
) ?? { tier: null, activity: null };
|
|
246
|
-
|
|
248
|
+
// Only the window failed: no route is withheld, the conversation is just too full for every one of them.
|
|
249
|
+
const reason = runs(result) ? 'context-full' : 'model-unavailable';
|
|
250
|
+
result = { ...result, ...fallback, reason, lateral: null };
|
|
247
251
|
}
|
|
248
252
|
const route = result.tier ? routeOf(result) : null;
|
|
249
253
|
const model = route ? routeSpec(config, route).id : nativeModel;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexeiled/claude-router",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.1",
|
|
4
4
|
"description": "Native Claude Code model and effort routing with Anthropic, DeepSeek and z.ai defaults, custom provider profiles, and classifier advice.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Alexei Ledenev",
|