@blockrun/clawrouter 0.8.15 → 0.8.17
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 +28 -9
- package/dist/cli.js.map +1 -1
- package/dist/index.js +28 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1123,26 +1123,39 @@ var DEFAULT_ROUTING_CONFIG = {
|
|
|
1123
1123
|
},
|
|
1124
1124
|
tiers: {
|
|
1125
1125
|
SIMPLE: {
|
|
1126
|
-
primary: "
|
|
1127
|
-
|
|
1126
|
+
primary: "nvidia/kimi-k2.5",
|
|
1127
|
+
// Ultra-cheap $0.001/$0.001
|
|
1128
|
+
fallback: [
|
|
1129
|
+
"google/gemini-2.5-flash",
|
|
1130
|
+
"nvidia/gpt-oss-120b",
|
|
1131
|
+
"nvidia/gpt-oss-20b",
|
|
1132
|
+
"deepseek/deepseek-chat"
|
|
1133
|
+
]
|
|
1128
1134
|
},
|
|
1129
1135
|
MEDIUM: {
|
|
1130
1136
|
primary: "xai/grok-code-fast-1",
|
|
1131
1137
|
// Code specialist, $0.20/$1.50
|
|
1132
1138
|
fallback: [
|
|
1139
|
+
"xai/grok-4-1-fast-non-reasoning",
|
|
1140
|
+
// Upgraded Grok 4.1
|
|
1133
1141
|
"deepseek/deepseek-chat",
|
|
1134
|
-
"xai/grok-4-fast-non-reasoning",
|
|
1135
1142
|
"google/gemini-2.5-flash"
|
|
1136
1143
|
]
|
|
1137
1144
|
},
|
|
1138
1145
|
COMPLEX: {
|
|
1139
1146
|
primary: "google/gemini-2.5-pro",
|
|
1140
|
-
fallback: ["anthropic/claude-sonnet-4", "xai/grok-4-0709", "openai/gpt-4o"]
|
|
1147
|
+
fallback: ["openai/gpt-5.2", "anthropic/claude-sonnet-4", "xai/grok-4-0709", "openai/gpt-4o"]
|
|
1141
1148
|
},
|
|
1142
1149
|
REASONING: {
|
|
1143
|
-
primary: "xai/grok-4-fast-reasoning",
|
|
1144
|
-
//
|
|
1145
|
-
fallback: [
|
|
1150
|
+
primary: "xai/grok-4-1-fast-reasoning",
|
|
1151
|
+
// Upgraded Grok 4.1 reasoning $0.20/$0.50
|
|
1152
|
+
fallback: [
|
|
1153
|
+
"xai/grok-4-fast-reasoning",
|
|
1154
|
+
"openai/o3",
|
|
1155
|
+
// Strong reasoning model
|
|
1156
|
+
"deepseek/deepseek-reasoner",
|
|
1157
|
+
"moonshot/kimi-k2.5"
|
|
1158
|
+
]
|
|
1146
1159
|
}
|
|
1147
1160
|
},
|
|
1148
1161
|
// Agentic tier configs - models that excel at multi-step autonomous tasks
|
|
@@ -1163,7 +1176,8 @@ var DEFAULT_ROUTING_CONFIG = {
|
|
|
1163
1176
|
},
|
|
1164
1177
|
COMPLEX: {
|
|
1165
1178
|
primary: "anthropic/claude-sonnet-4",
|
|
1166
|
-
fallback: ["anthropic/claude-opus-4", "
|
|
1179
|
+
fallback: ["anthropic/claude-opus-4.5", "openai/gpt-5.2", "xai/grok-4-0709"]
|
|
1180
|
+
// Opus 4.5 is 3x cheaper than Opus 4
|
|
1167
1181
|
},
|
|
1168
1182
|
REASONING: {
|
|
1169
1183
|
primary: "anthropic/claude-sonnet-4",
|
|
@@ -2502,7 +2516,12 @@ function normalizeMessagesForThinking(messages) {
|
|
|
2502
2516
|
if (!messages || messages.length === 0) return messages;
|
|
2503
2517
|
let hasChanges = false;
|
|
2504
2518
|
const normalized = messages.map((msg) => {
|
|
2505
|
-
if (msg.role
|
|
2519
|
+
if (msg.role !== "assistant" || msg.reasoning_content !== void 0) {
|
|
2520
|
+
return msg;
|
|
2521
|
+
}
|
|
2522
|
+
const hasOpenAIToolCalls = msg.tool_calls && Array.isArray(msg.tool_calls) && msg.tool_calls.length > 0;
|
|
2523
|
+
const hasAnthropicToolUse = Array.isArray(msg.content) && msg.content.some((block) => block?.type === "tool_use");
|
|
2524
|
+
if (hasOpenAIToolCalls || hasAnthropicToolUse) {
|
|
2506
2525
|
hasChanges = true;
|
|
2507
2526
|
return { ...msg, reasoning_content: "" };
|
|
2508
2527
|
}
|