@blockrun/clawrouter 0.12.36 → 0.12.38
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 +23 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7364,6 +7364,19 @@ async function proxyRequest(req, res, apiBase, payFetch, options, routerOpts, de
|
|
|
7364
7364
|
routingProfile: routingProfile ?? void 0,
|
|
7365
7365
|
hasTools
|
|
7366
7366
|
});
|
|
7367
|
+
if (hasTools && routingDecision.tier === "SIMPLE") {
|
|
7368
|
+
const simpleRoutingDecision = route(prompt, systemPrompt, maxTokens, {
|
|
7369
|
+
...routerOpts,
|
|
7370
|
+
routingProfile: routingProfile ?? void 0,
|
|
7371
|
+
hasTools: false
|
|
7372
|
+
});
|
|
7373
|
+
if (simpleRoutingDecision.tier === "SIMPLE") {
|
|
7374
|
+
console.log(
|
|
7375
|
+
`[ClawRouter] SIMPLE+tools: using non-agentic model ${simpleRoutingDecision.model} (tools present but query is trivial)`
|
|
7376
|
+
);
|
|
7377
|
+
routingDecision = simpleRoutingDecision;
|
|
7378
|
+
}
|
|
7379
|
+
}
|
|
7367
7380
|
if (existingSession) {
|
|
7368
7381
|
const tierRank = {
|
|
7369
7382
|
SIMPLE: 0,
|
|
@@ -7387,6 +7400,14 @@ async function proxyRequest(req, res, apiBase, payFetch, options, routerOpts, de
|
|
|
7387
7400
|
routingDecision.tier
|
|
7388
7401
|
);
|
|
7389
7402
|
}
|
|
7403
|
+
} else if (routingDecision.tier === "SIMPLE") {
|
|
7404
|
+
console.log(
|
|
7405
|
+
`[ClawRouter] Session ${effectiveSessionId?.slice(0, 8)}... SIMPLE follow-up, using cheap model: ${routingDecision.model} (bypassing pinned ${existingSession.tier})`
|
|
7406
|
+
);
|
|
7407
|
+
parsed.model = routingDecision.model;
|
|
7408
|
+
modelId = routingDecision.model;
|
|
7409
|
+
bodyModified = true;
|
|
7410
|
+
sessionStore.touchSession(effectiveSessionId);
|
|
7390
7411
|
} else {
|
|
7391
7412
|
console.log(
|
|
7392
7413
|
`[ClawRouter] Session ${effectiveSessionId?.slice(0, 8)}... keeping pinned model: ${existingSession.model} (${existingSession.tier} >= ${routingDecision.tier})`
|
|
@@ -9109,7 +9130,7 @@ Run \`openclaw plugins install @blockrun/clawrouter\` to generate a wallet.`,
|
|
|
9109
9130
|
"**Solana:**",
|
|
9110
9131
|
` Address: \`${solAddr}\``,
|
|
9111
9132
|
` ${solBalanceText}`,
|
|
9112
|
-
` Fund: https://solscan.io/account/${solAddr}`
|
|
9133
|
+
` Fund (USDC only): https://solscan.io/account/${solAddr}`
|
|
9113
9134
|
].join("\n");
|
|
9114
9135
|
}
|
|
9115
9136
|
}
|
|
@@ -9125,7 +9146,7 @@ Run \`openclaw plugins install @blockrun/clawrouter\` to generate a wallet.`,
|
|
|
9125
9146
|
"**Base (EVM):**",
|
|
9126
9147
|
` Address: \`${address}\``,
|
|
9127
9148
|
` ${evmBalanceText}`,
|
|
9128
|
-
` Fund: https://basescan.org/address/${address}`,
|
|
9149
|
+
` Fund (USDC only): https://basescan.org/address/${address}`,
|
|
9129
9150
|
solanaSection,
|
|
9130
9151
|
"",
|
|
9131
9152
|
`**Key File:** \`${WALLET_FILE}\``,
|