@blockrun/clawrouter 0.12.36 → 0.12.37
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/cli.js +21 -0
- package/dist/cli.js.map +1 -1
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -6936,6 +6936,19 @@ async function proxyRequest(req, res, apiBase, payFetch, options, routerOpts, de
|
|
|
6936
6936
|
routingProfile: routingProfile ?? void 0,
|
|
6937
6937
|
hasTools
|
|
6938
6938
|
});
|
|
6939
|
+
if (hasTools && routingDecision.tier === "SIMPLE") {
|
|
6940
|
+
const simpleRoutingDecision = route(prompt, systemPrompt, maxTokens, {
|
|
6941
|
+
...routerOpts,
|
|
6942
|
+
routingProfile: routingProfile ?? void 0,
|
|
6943
|
+
hasTools: false
|
|
6944
|
+
});
|
|
6945
|
+
if (simpleRoutingDecision.tier === "SIMPLE") {
|
|
6946
|
+
console.log(
|
|
6947
|
+
`[ClawRouter] SIMPLE+tools: using non-agentic model ${simpleRoutingDecision.model} (tools present but query is trivial)`
|
|
6948
|
+
);
|
|
6949
|
+
routingDecision = simpleRoutingDecision;
|
|
6950
|
+
}
|
|
6951
|
+
}
|
|
6939
6952
|
if (existingSession) {
|
|
6940
6953
|
const tierRank = {
|
|
6941
6954
|
SIMPLE: 0,
|
|
@@ -6959,6 +6972,14 @@ async function proxyRequest(req, res, apiBase, payFetch, options, routerOpts, de
|
|
|
6959
6972
|
routingDecision.tier
|
|
6960
6973
|
);
|
|
6961
6974
|
}
|
|
6975
|
+
} else if (routingDecision.tier === "SIMPLE") {
|
|
6976
|
+
console.log(
|
|
6977
|
+
`[ClawRouter] Session ${effectiveSessionId?.slice(0, 8)}... SIMPLE follow-up, using cheap model: ${routingDecision.model} (bypassing pinned ${existingSession.tier})`
|
|
6978
|
+
);
|
|
6979
|
+
parsed.model = routingDecision.model;
|
|
6980
|
+
modelId = routingDecision.model;
|
|
6981
|
+
bodyModified = true;
|
|
6982
|
+
sessionStore.touchSession(effectiveSessionId);
|
|
6962
6983
|
} else {
|
|
6963
6984
|
console.log(
|
|
6964
6985
|
`[ClawRouter] Session ${effectiveSessionId?.slice(0, 8)}... keeping pinned model: ${existingSession.model} (${existingSession.tier} >= ${routingDecision.tier})`
|