@blockrun/clawrouter 0.12.44 → 0.12.45
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/README.md +1 -1
- package/dist/cli.js +10 -16
- package/dist/cli.js.map +1 -1
- package/dist/index.js +10 -16
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/scripts/benchmark.py +300 -0
package/dist/index.js
CHANGED
|
@@ -3301,18 +3301,20 @@ var DEFAULT_ROUTING_CONFIG = {
|
|
|
3301
3301
|
// Agentic tier configs - models that excel at multi-step autonomous tasks
|
|
3302
3302
|
agenticTiers: {
|
|
3303
3303
|
SIMPLE: {
|
|
3304
|
-
primary: "
|
|
3305
|
-
//
|
|
3304
|
+
primary: "openai/gpt-4o-mini",
|
|
3305
|
+
// $0.15/$0.60 - best tool compliance at lowest cost
|
|
3306
3306
|
fallback: [
|
|
3307
|
+
"moonshot/kimi-k2.5",
|
|
3307
3308
|
"anthropic/claude-haiku-4.5",
|
|
3308
|
-
"xai/grok-4-1-fast-non-reasoning"
|
|
3309
|
-
"openai/gpt-4o-mini"
|
|
3309
|
+
"xai/grok-4-1-fast-non-reasoning"
|
|
3310
3310
|
]
|
|
3311
3311
|
},
|
|
3312
3312
|
MEDIUM: {
|
|
3313
3313
|
primary: "moonshot/kimi-k2.5",
|
|
3314
3314
|
// $0.50/$2.40 - strong tool use, handles function calls correctly
|
|
3315
3315
|
fallback: [
|
|
3316
|
+
"openai/gpt-4o-mini",
|
|
3317
|
+
// $0.15/$0.60 - reliable tool calling fallback
|
|
3316
3318
|
"anthropic/claude-haiku-4.5",
|
|
3317
3319
|
"deepseek/deepseek-chat",
|
|
3318
3320
|
"xai/grok-4-1-fast-non-reasoning"
|
|
@@ -7415,17 +7417,9 @@ async function proxyRequest(req, res, apiBase, payFetch, options, routerOpts, de
|
|
|
7415
7417
|
hasTools
|
|
7416
7418
|
});
|
|
7417
7419
|
if (hasTools && routingDecision.tier === "SIMPLE") {
|
|
7418
|
-
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
|
-
hasTools: false
|
|
7422
|
-
});
|
|
7423
|
-
if (simpleRoutingDecision.tier === "SIMPLE") {
|
|
7424
|
-
console.log(
|
|
7425
|
-
`[ClawRouter] SIMPLE+tools: using non-agentic model ${simpleRoutingDecision.model} (tools present but query is trivial)`
|
|
7426
|
-
);
|
|
7427
|
-
routingDecision = simpleRoutingDecision;
|
|
7428
|
-
}
|
|
7420
|
+
console.log(
|
|
7421
|
+
`[ClawRouter] SIMPLE+tools: keeping agentic model ${routingDecision.model} (tools need reliable function-call support)`
|
|
7422
|
+
);
|
|
7429
7423
|
}
|
|
7430
7424
|
if (existingSession) {
|
|
7431
7425
|
const tierRank = {
|
|
@@ -7742,7 +7736,7 @@ async function proxyRequest(req, res, apiBase, payFetch, options, routerOpts, de
|
|
|
7742
7736
|
} else {
|
|
7743
7737
|
modelsToTry = modelId ? [modelId] : [];
|
|
7744
7738
|
}
|
|
7745
|
-
if (!modelsToTry.includes(FREE_MODEL)) {
|
|
7739
|
+
if (!hasTools && !modelsToTry.includes(FREE_MODEL)) {
|
|
7746
7740
|
modelsToTry.push(FREE_MODEL);
|
|
7747
7741
|
}
|
|
7748
7742
|
let upstream;
|