@blockrun/clawrouter 0.12.3 → 0.12.5
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 +6 -4
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1607,9 +1607,10 @@ function route(prompt, systemPrompt, maxOutputTokens, options) {
|
|
|
1607
1607
|
const agenticScore = ruleResult.agenticScore ?? 0;
|
|
1608
1608
|
const isAutoAgentic = agenticScore >= 0.5;
|
|
1609
1609
|
const isExplicitAgentic = config.overrides.agenticMode ?? false;
|
|
1610
|
-
const
|
|
1610
|
+
const hasToolsInRequest = options.hasTools ?? false;
|
|
1611
|
+
const useAgenticTiers = (hasToolsInRequest || isAutoAgentic || isExplicitAgentic) && config.agenticTiers != null;
|
|
1611
1612
|
tierConfigs = useAgenticTiers ? config.agenticTiers : config.tiers;
|
|
1612
|
-
profileSuffix = useAgenticTiers ?
|
|
1613
|
+
profileSuffix = useAgenticTiers ? ` | agentic${hasToolsInRequest ? " (tools)" : ""}` : "";
|
|
1613
1614
|
}
|
|
1614
1615
|
const agenticScoreValue = ruleResult.agenticScore;
|
|
1615
1616
|
if (estimatedTokens > config.overrides.maxTokensForceComplex) {
|
|
@@ -6293,7 +6294,7 @@ async function proxyRequest(req, res, apiBase, payFetch, options, routerOpts, de
|
|
|
6293
6294
|
const tools = parsed.tools;
|
|
6294
6295
|
hasTools = Array.isArray(tools) && tools.length > 0;
|
|
6295
6296
|
if (hasTools && tools) {
|
|
6296
|
-
console.log(`[ClawRouter] Tools detected (${tools.length}), agentic
|
|
6297
|
+
console.log(`[ClawRouter] Tools detected (${tools.length}), forcing agentic tiers`);
|
|
6297
6298
|
}
|
|
6298
6299
|
hasVision = parsedMessages.some((m) => {
|
|
6299
6300
|
if (Array.isArray(m.content)) {
|
|
@@ -6306,7 +6307,8 @@ async function proxyRequest(req, res, apiBase, payFetch, options, routerOpts, de
|
|
|
6306
6307
|
}
|
|
6307
6308
|
routingDecision = route(prompt, systemPrompt, maxTokens, {
|
|
6308
6309
|
...routerOpts,
|
|
6309
|
-
routingProfile: routingProfile ?? void 0
|
|
6310
|
+
routingProfile: routingProfile ?? void 0,
|
|
6311
|
+
hasTools
|
|
6310
6312
|
});
|
|
6311
6313
|
if (existingSession) {
|
|
6312
6314
|
const tierRank = {
|