@blockrun/clawrouter 0.9.30 → 0.9.31
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 +41 -61
- package/dist/cli.js.map +1 -1
- package/dist/index.js +43 -63
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/scripts/reinstall.sh +2 -2
package/dist/cli.js
CHANGED
|
@@ -1238,7 +1238,7 @@ var DEFAULT_ROUTING_CONFIG = {
|
|
|
1238
1238
|
"openai/gpt-5.2",
|
|
1239
1239
|
// Newer and cheaper input than gpt-4o
|
|
1240
1240
|
"openai/gpt-4o",
|
|
1241
|
-
"
|
|
1241
|
+
"claude-sonnet-4"
|
|
1242
1242
|
]
|
|
1243
1243
|
},
|
|
1244
1244
|
REASONING: {
|
|
@@ -1301,7 +1301,7 @@ var DEFAULT_ROUTING_CONFIG = {
|
|
|
1301
1301
|
SIMPLE: {
|
|
1302
1302
|
primary: "moonshot/kimi-k2.5",
|
|
1303
1303
|
// $0.50/$2.40 - good for simple coding
|
|
1304
|
-
fallback: ["
|
|
1304
|
+
fallback: ["claude-haiku-4.5", "google/gemini-2.5-flash", "xai/grok-code-fast-1"]
|
|
1305
1305
|
},
|
|
1306
1306
|
MEDIUM: {
|
|
1307
1307
|
primary: "openai/gpt-5.2-codex",
|
|
@@ -1310,26 +1310,26 @@ var DEFAULT_ROUTING_CONFIG = {
|
|
|
1310
1310
|
"moonshot/kimi-k2.5",
|
|
1311
1311
|
"google/gemini-2.5-pro",
|
|
1312
1312
|
"xai/grok-4-0709",
|
|
1313
|
-
"
|
|
1313
|
+
"claude-sonnet-4"
|
|
1314
1314
|
]
|
|
1315
1315
|
},
|
|
1316
1316
|
COMPLEX: {
|
|
1317
|
-
primary: "
|
|
1317
|
+
primary: "claude-opus-4",
|
|
1318
1318
|
// Best quality for complex tasks
|
|
1319
1319
|
fallback: [
|
|
1320
1320
|
"openai/gpt-5.2-codex",
|
|
1321
|
-
"
|
|
1322
|
-
"
|
|
1321
|
+
"claude-opus-4",
|
|
1322
|
+
"claude-sonnet-4",
|
|
1323
1323
|
"google/gemini-3-pro-preview",
|
|
1324
1324
|
"moonshot/kimi-k2.5"
|
|
1325
1325
|
]
|
|
1326
1326
|
},
|
|
1327
1327
|
REASONING: {
|
|
1328
|
-
primary: "
|
|
1328
|
+
primary: "claude-sonnet-4",
|
|
1329
1329
|
// $3/$15 - best for reasoning/instructions
|
|
1330
1330
|
fallback: [
|
|
1331
|
-
"
|
|
1332
|
-
"
|
|
1331
|
+
"claude-opus-4",
|
|
1332
|
+
"claude-opus-4",
|
|
1333
1333
|
"openai/o4-mini",
|
|
1334
1334
|
// Newer and cheaper than o3 ($1.10 vs $2.00)
|
|
1335
1335
|
"openai/o3",
|
|
@@ -1345,7 +1345,7 @@ var DEFAULT_ROUTING_CONFIG = {
|
|
|
1345
1345
|
fallback: [
|
|
1346
1346
|
"minimax/minimax-m2.5",
|
|
1347
1347
|
// $0.30/$1.20 - agentic capable, cheaper than kimi
|
|
1348
|
-
"
|
|
1348
|
+
"claude-haiku-4.5",
|
|
1349
1349
|
"xai/grok-4-1-fast-non-reasoning",
|
|
1350
1350
|
"openai/gpt-4o-mini"
|
|
1351
1351
|
]
|
|
@@ -1357,14 +1357,14 @@ var DEFAULT_ROUTING_CONFIG = {
|
|
|
1357
1357
|
"minimax/minimax-m2.5",
|
|
1358
1358
|
// $0.30/$1.20 - agentic capable
|
|
1359
1359
|
"moonshot/kimi-k2.5",
|
|
1360
|
-
"
|
|
1361
|
-
"
|
|
1360
|
+
"claude-haiku-4.5",
|
|
1361
|
+
"claude-sonnet-4"
|
|
1362
1362
|
]
|
|
1363
1363
|
},
|
|
1364
1364
|
COMPLEX: {
|
|
1365
|
-
primary: "
|
|
1365
|
+
primary: "claude-sonnet-4",
|
|
1366
1366
|
fallback: [
|
|
1367
|
-
"
|
|
1367
|
+
"claude-opus-4",
|
|
1368
1368
|
// Latest Opus - best agentic
|
|
1369
1369
|
"minimax/minimax-m2.5",
|
|
1370
1370
|
// $0.30/$1.20 - cheap agentic fallback
|
|
@@ -1374,10 +1374,10 @@ var DEFAULT_ROUTING_CONFIG = {
|
|
|
1374
1374
|
]
|
|
1375
1375
|
},
|
|
1376
1376
|
REASONING: {
|
|
1377
|
-
primary: "
|
|
1377
|
+
primary: "claude-sonnet-4",
|
|
1378
1378
|
// Strong tool use + reasoning for agentic tasks
|
|
1379
1379
|
fallback: [
|
|
1380
|
-
"
|
|
1380
|
+
"claude-opus-4",
|
|
1381
1381
|
"minimax/minimax-m2.5",
|
|
1382
1382
|
// $0.30/$1.20 - reasoning + agentic
|
|
1383
1383
|
"xai/grok-4-1-fast-reasoning",
|
|
@@ -1466,27 +1466,27 @@ function route(prompt, systemPrompt, maxOutputTokens, options) {
|
|
|
1466
1466
|
|
|
1467
1467
|
// src/models.ts
|
|
1468
1468
|
var MODEL_ALIASES = {
|
|
1469
|
-
// Claude - short names (
|
|
1470
|
-
claude: "
|
|
1471
|
-
sonnet: "
|
|
1472
|
-
opus: "
|
|
1473
|
-
"opus-
|
|
1474
|
-
|
|
1475
|
-
haiku: "anthropic/claude-haiku-4-5",
|
|
1469
|
+
// Claude - short names (backend uses bare model names without anthropic/ prefix)
|
|
1470
|
+
claude: "claude-sonnet-4",
|
|
1471
|
+
sonnet: "claude-sonnet-4",
|
|
1472
|
+
opus: "claude-opus-4",
|
|
1473
|
+
"opus-4": "claude-opus-4",
|
|
1474
|
+
haiku: "claude-haiku-4.5",
|
|
1476
1475
|
// Claude - provider/shortname patterns (common in agent frameworks)
|
|
1477
|
-
"anthropic/sonnet": "
|
|
1478
|
-
"anthropic/opus": "
|
|
1479
|
-
"anthropic/haiku": "
|
|
1480
|
-
"anthropic/claude": "
|
|
1481
|
-
// Backward compatibility -
|
|
1482
|
-
"anthropic/claude-sonnet-4
|
|
1483
|
-
"anthropic/claude-
|
|
1484
|
-
"anthropic/claude-
|
|
1485
|
-
"anthropic/claude-
|
|
1486
|
-
|
|
1487
|
-
"anthropic/claude-
|
|
1488
|
-
"anthropic/claude-
|
|
1489
|
-
"anthropic/claude-haiku-4": "
|
|
1476
|
+
"anthropic/sonnet": "claude-sonnet-4",
|
|
1477
|
+
"anthropic/opus": "claude-opus-4",
|
|
1478
|
+
"anthropic/haiku": "claude-haiku-4.5",
|
|
1479
|
+
"anthropic/claude": "claude-sonnet-4",
|
|
1480
|
+
// Backward compatibility - various formats all route to backend names
|
|
1481
|
+
"anthropic/claude-sonnet-4": "claude-sonnet-4",
|
|
1482
|
+
"anthropic/claude-sonnet-4-6": "claude-sonnet-4",
|
|
1483
|
+
"anthropic/claude-sonnet-4.6": "claude-sonnet-4",
|
|
1484
|
+
"anthropic/claude-opus-4": "claude-opus-4",
|
|
1485
|
+
"anthropic/claude-opus-4-6": "claude-opus-4",
|
|
1486
|
+
"anthropic/claude-opus-4.6": "claude-opus-4",
|
|
1487
|
+
"anthropic/claude-haiku-4": "claude-haiku-4.5",
|
|
1488
|
+
"anthropic/claude-haiku-4-5": "claude-haiku-4.5",
|
|
1489
|
+
"anthropic/claude-haiku-4.5": "claude-haiku-4.5",
|
|
1490
1490
|
// OpenAI
|
|
1491
1491
|
gpt: "openai/gpt-4o",
|
|
1492
1492
|
gpt4: "openai/gpt-4o",
|
|
@@ -1677,8 +1677,9 @@ var BLOCKRUN_MODELS = [
|
|
|
1677
1677
|
reasoning: true
|
|
1678
1678
|
},
|
|
1679
1679
|
// Anthropic - all Claude models excel at agentic workflows
|
|
1680
|
+
// Backend uses bare model names (claude-sonnet-4, not anthropic/claude-sonnet-4-6)
|
|
1680
1681
|
{
|
|
1681
|
-
id: "
|
|
1682
|
+
id: "claude-haiku-4.5",
|
|
1682
1683
|
name: "Claude Haiku 4.5",
|
|
1683
1684
|
inputPrice: 1,
|
|
1684
1685
|
outputPrice: 5,
|
|
@@ -1687,8 +1688,8 @@ var BLOCKRUN_MODELS = [
|
|
|
1687
1688
|
agentic: true
|
|
1688
1689
|
},
|
|
1689
1690
|
{
|
|
1690
|
-
id: "
|
|
1691
|
-
name: "Claude Sonnet 4
|
|
1691
|
+
id: "claude-sonnet-4",
|
|
1692
|
+
name: "Claude Sonnet 4",
|
|
1692
1693
|
inputPrice: 3,
|
|
1693
1694
|
outputPrice: 15,
|
|
1694
1695
|
contextWindow: 2e5,
|
|
@@ -1697,7 +1698,7 @@ var BLOCKRUN_MODELS = [
|
|
|
1697
1698
|
agentic: true
|
|
1698
1699
|
},
|
|
1699
1700
|
{
|
|
1700
|
-
id: "
|
|
1701
|
+
id: "claude-opus-4",
|
|
1701
1702
|
name: "Claude Opus 4",
|
|
1702
1703
|
inputPrice: 15,
|
|
1703
1704
|
outputPrice: 75,
|
|
@@ -1706,27 +1707,6 @@ var BLOCKRUN_MODELS = [
|
|
|
1706
1707
|
reasoning: true,
|
|
1707
1708
|
agentic: true
|
|
1708
1709
|
},
|
|
1709
|
-
{
|
|
1710
|
-
id: "anthropic/claude-opus-4-5",
|
|
1711
|
-
name: "Claude Opus 4.5",
|
|
1712
|
-
inputPrice: 5,
|
|
1713
|
-
outputPrice: 25,
|
|
1714
|
-
contextWindow: 2e5,
|
|
1715
|
-
maxOutput: 32e3,
|
|
1716
|
-
reasoning: true,
|
|
1717
|
-
agentic: true
|
|
1718
|
-
},
|
|
1719
|
-
{
|
|
1720
|
-
id: "anthropic/claude-opus-4-6",
|
|
1721
|
-
name: "Claude Opus 4.6",
|
|
1722
|
-
inputPrice: 5,
|
|
1723
|
-
outputPrice: 25,
|
|
1724
|
-
contextWindow: 2e5,
|
|
1725
|
-
maxOutput: 64e3,
|
|
1726
|
-
reasoning: true,
|
|
1727
|
-
vision: true,
|
|
1728
|
-
agentic: true
|
|
1729
|
-
},
|
|
1730
1710
|
// Google
|
|
1731
1711
|
{
|
|
1732
1712
|
id: "google/gemini-3-pro-preview",
|