@blockrun/franklin 3.7.3 → 3.7.4
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/dist/router/index.js +16 -7
- package/package.json +1 -1
package/dist/router/index.js
CHANGED
|
@@ -33,22 +33,24 @@ function loadLearnedWeights() {
|
|
|
33
33
|
return null;
|
|
34
34
|
}
|
|
35
35
|
// ─── Tier Model Configs ───
|
|
36
|
+
// Agent-first defaults. Claude Sonnet 4.6 is the industry standard for multi-step
|
|
37
|
+
// tool-use agent work; cheap models keep derailing on simple agent loops.
|
|
36
38
|
const AUTO_TIERS = {
|
|
37
39
|
SIMPLE: {
|
|
38
40
|
primary: 'google/gemini-2.5-flash',
|
|
39
|
-
fallback: ['
|
|
41
|
+
fallback: ['moonshot/kimi-k2.5', 'deepseek/deepseek-chat'],
|
|
40
42
|
},
|
|
41
43
|
MEDIUM: {
|
|
42
|
-
primary: '
|
|
43
|
-
fallback: ['
|
|
44
|
+
primary: 'anthropic/claude-sonnet-4.6',
|
|
45
|
+
fallback: ['openai/gpt-5.4', 'google/gemini-3.1-pro'],
|
|
44
46
|
},
|
|
45
47
|
COMPLEX: {
|
|
46
|
-
primary: '
|
|
47
|
-
fallback: ['
|
|
48
|
+
primary: 'anthropic/claude-sonnet-4.6',
|
|
49
|
+
fallback: ['openai/gpt-5.4', 'anthropic/claude-opus-4.6'],
|
|
48
50
|
},
|
|
49
51
|
REASONING: {
|
|
50
|
-
primary: '
|
|
51
|
-
fallback: ['
|
|
52
|
+
primary: 'anthropic/claude-opus-4.6',
|
|
53
|
+
fallback: ['openai/o3', 'xai/grok-4-1-fast-reasoning'],
|
|
52
54
|
},
|
|
53
55
|
};
|
|
54
56
|
const ECO_TIERS = {
|
|
@@ -266,6 +268,13 @@ export function routeRequest(prompt, profile = 'auto') {
|
|
|
266
268
|
savings: 1.0,
|
|
267
269
|
};
|
|
268
270
|
}
|
|
271
|
+
// Auto profile bypasses learned routing. The learned Elo scores grow with
|
|
272
|
+
// usage volume rather than pure quality, which biased the router toward
|
|
273
|
+
// cheap/weak models on agentic work. Classic AUTO_TIERS defaults are
|
|
274
|
+
// agent-tuned (Claude Sonnet as backbone) and more predictable for users.
|
|
275
|
+
if (profile === 'auto') {
|
|
276
|
+
return classicRouteRequest(prompt, profile);
|
|
277
|
+
}
|
|
269
278
|
// ── Learned routing (if weights available) ──
|
|
270
279
|
const weights = loadLearnedWeights();
|
|
271
280
|
if (weights) {
|
package/package.json
CHANGED