@blockrun/clawrouter 0.9.29 → 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 +45 -62
- package/dist/cli.js.map +1 -1
- package/dist/index.js +47 -64
- 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",
|
|
@@ -1510,7 +1510,10 @@ var MODEL_ALIASES = {
|
|
|
1510
1510
|
nvidia: "nvidia/gpt-oss-120b",
|
|
1511
1511
|
"gpt-120b": "nvidia/gpt-oss-120b",
|
|
1512
1512
|
// MiniMax
|
|
1513
|
-
minimax: "minimax/minimax-m2.5"
|
|
1513
|
+
minimax: "minimax/minimax-m2.5",
|
|
1514
|
+
// Routing profile aliases (common variations)
|
|
1515
|
+
"auto-router": "auto",
|
|
1516
|
+
router: "auto"
|
|
1514
1517
|
// Note: auto, free, eco, premium are virtual routing profiles registered in BLOCKRUN_MODELS
|
|
1515
1518
|
// They don't need aliases since they're already top-level model IDs
|
|
1516
1519
|
};
|
|
@@ -1674,8 +1677,9 @@ var BLOCKRUN_MODELS = [
|
|
|
1674
1677
|
reasoning: true
|
|
1675
1678
|
},
|
|
1676
1679
|
// Anthropic - all Claude models excel at agentic workflows
|
|
1680
|
+
// Backend uses bare model names (claude-sonnet-4, not anthropic/claude-sonnet-4-6)
|
|
1677
1681
|
{
|
|
1678
|
-
id: "
|
|
1682
|
+
id: "claude-haiku-4.5",
|
|
1679
1683
|
name: "Claude Haiku 4.5",
|
|
1680
1684
|
inputPrice: 1,
|
|
1681
1685
|
outputPrice: 5,
|
|
@@ -1684,8 +1688,8 @@ var BLOCKRUN_MODELS = [
|
|
|
1684
1688
|
agentic: true
|
|
1685
1689
|
},
|
|
1686
1690
|
{
|
|
1687
|
-
id: "
|
|
1688
|
-
name: "Claude Sonnet 4
|
|
1691
|
+
id: "claude-sonnet-4",
|
|
1692
|
+
name: "Claude Sonnet 4",
|
|
1689
1693
|
inputPrice: 3,
|
|
1690
1694
|
outputPrice: 15,
|
|
1691
1695
|
contextWindow: 2e5,
|
|
@@ -1694,7 +1698,7 @@ var BLOCKRUN_MODELS = [
|
|
|
1694
1698
|
agentic: true
|
|
1695
1699
|
},
|
|
1696
1700
|
{
|
|
1697
|
-
id: "
|
|
1701
|
+
id: "claude-opus-4",
|
|
1698
1702
|
name: "Claude Opus 4",
|
|
1699
1703
|
inputPrice: 15,
|
|
1700
1704
|
outputPrice: 75,
|
|
@@ -1703,27 +1707,6 @@ var BLOCKRUN_MODELS = [
|
|
|
1703
1707
|
reasoning: true,
|
|
1704
1708
|
agentic: true
|
|
1705
1709
|
},
|
|
1706
|
-
{
|
|
1707
|
-
id: "anthropic/claude-opus-4-5",
|
|
1708
|
-
name: "Claude Opus 4.5",
|
|
1709
|
-
inputPrice: 5,
|
|
1710
|
-
outputPrice: 25,
|
|
1711
|
-
contextWindow: 2e5,
|
|
1712
|
-
maxOutput: 32e3,
|
|
1713
|
-
reasoning: true,
|
|
1714
|
-
agentic: true
|
|
1715
|
-
},
|
|
1716
|
-
{
|
|
1717
|
-
id: "anthropic/claude-opus-4-6",
|
|
1718
|
-
name: "Claude Opus 4.6",
|
|
1719
|
-
inputPrice: 5,
|
|
1720
|
-
outputPrice: 25,
|
|
1721
|
-
contextWindow: 2e5,
|
|
1722
|
-
maxOutput: 64e3,
|
|
1723
|
-
reasoning: true,
|
|
1724
|
-
vision: true,
|
|
1725
|
-
agentic: true
|
|
1726
|
-
},
|
|
1727
1710
|
// Google
|
|
1728
1711
|
{
|
|
1729
1712
|
id: "google/gemini-3-pro-preview",
|