@blockrun/clawrouter 0.9.20 → 0.9.22
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/README.md +1 -1
- package/dist/cli.js +61 -11
- package/dist/cli.js.map +1 -1
- package/dist/index.js +68 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -34,7 +34,9 @@ var MODEL_ALIASES = {
|
|
|
34
34
|
"grok-code": "xai/grok-code-fast-1",
|
|
35
35
|
// NVIDIA
|
|
36
36
|
nvidia: "nvidia/gpt-oss-120b",
|
|
37
|
-
"gpt-120b": "nvidia/gpt-oss-120b"
|
|
37
|
+
"gpt-120b": "nvidia/gpt-oss-120b",
|
|
38
|
+
// MiniMax
|
|
39
|
+
minimax: "minimax/minimax-m2.5"
|
|
38
40
|
// Note: auto, free, eco, premium are virtual routing profiles registered in BLOCKRUN_MODELS
|
|
39
41
|
// They don't need aliases since they're already top-level model IDs
|
|
40
42
|
};
|
|
@@ -381,6 +383,17 @@ var BLOCKRUN_MODELS = [
|
|
|
381
383
|
reasoning: true
|
|
382
384
|
},
|
|
383
385
|
// grok-2-vision removed - old, 0 transactions
|
|
386
|
+
// MiniMax
|
|
387
|
+
{
|
|
388
|
+
id: "minimax/minimax-m2.5",
|
|
389
|
+
name: "MiniMax M2.5",
|
|
390
|
+
inputPrice: 0.3,
|
|
391
|
+
outputPrice: 1.2,
|
|
392
|
+
contextWindow: 204800,
|
|
393
|
+
maxOutput: 16384,
|
|
394
|
+
reasoning: true,
|
|
395
|
+
agentic: true
|
|
396
|
+
},
|
|
384
397
|
// NVIDIA - Free/cheap models
|
|
385
398
|
{
|
|
386
399
|
id: "nvidia/gpt-oss-120b",
|
|
@@ -1676,6 +1689,8 @@ var DEFAULT_ROUTING_CONFIG = {
|
|
|
1676
1689
|
primary: "moonshot/kimi-k2.5",
|
|
1677
1690
|
// $0.50/$2.40 - best quality/price for simple tasks
|
|
1678
1691
|
fallback: [
|
|
1692
|
+
"minimax/minimax-m2.5",
|
|
1693
|
+
// $0.30/$1.20 - cheap with reasoning
|
|
1679
1694
|
"google/gemini-2.5-flash",
|
|
1680
1695
|
// 1M context, cost-effective
|
|
1681
1696
|
"nvidia/gpt-oss-120b",
|
|
@@ -1687,6 +1702,8 @@ var DEFAULT_ROUTING_CONFIG = {
|
|
|
1687
1702
|
primary: "xai/grok-code-fast-1",
|
|
1688
1703
|
// Code specialist, $0.20/$1.50
|
|
1689
1704
|
fallback: [
|
|
1705
|
+
"minimax/minimax-m2.5",
|
|
1706
|
+
// $0.30/$1.20 - cheap with reasoning
|
|
1690
1707
|
"google/gemini-2.5-flash",
|
|
1691
1708
|
// 1M context, cost-effective
|
|
1692
1709
|
"deepseek/deepseek-chat",
|
|
@@ -1701,6 +1718,8 @@ var DEFAULT_ROUTING_CONFIG = {
|
|
|
1701
1718
|
"google/gemini-2.5-flash",
|
|
1702
1719
|
// CRITICAL: 1M context, cheap failsafe before expensive models
|
|
1703
1720
|
"google/gemini-2.5-pro",
|
|
1721
|
+
"minimax/minimax-m2.5",
|
|
1722
|
+
// $0.30/$1.20 - cheap with reasoning
|
|
1704
1723
|
"deepseek/deepseek-chat",
|
|
1705
1724
|
// Another cheap option
|
|
1706
1725
|
"xai/grok-4-0709",
|
|
@@ -1714,8 +1733,10 @@ var DEFAULT_ROUTING_CONFIG = {
|
|
|
1714
1733
|
primary: "xai/grok-4-1-fast-reasoning",
|
|
1715
1734
|
// Upgraded Grok 4.1 reasoning $0.20/$0.50
|
|
1716
1735
|
fallback: [
|
|
1736
|
+
"minimax/minimax-m2.5",
|
|
1737
|
+
// $0.30/$1.20 - reasoning capable
|
|
1717
1738
|
"deepseek/deepseek-reasoner",
|
|
1718
|
-
// Cheap reasoning model
|
|
1739
|
+
// Cheap reasoning model
|
|
1719
1740
|
"openai/o4-mini",
|
|
1720
1741
|
// Newer and cheaper than o3 ($1.10 vs $2.00)
|
|
1721
1742
|
"openai/o3"
|
|
@@ -1725,24 +1746,41 @@ var DEFAULT_ROUTING_CONFIG = {
|
|
|
1725
1746
|
// Eco tier configs - ultra cost-optimized (blockrun/eco)
|
|
1726
1747
|
ecoTiers: {
|
|
1727
1748
|
SIMPLE: {
|
|
1728
|
-
primary: "
|
|
1729
|
-
// $0.
|
|
1730
|
-
fallback: [
|
|
1749
|
+
primary: "minimax/minimax-m2.5",
|
|
1750
|
+
// $0.30/$1.20 - cheapest with reasoning
|
|
1751
|
+
fallback: [
|
|
1752
|
+
"moonshot/kimi-k2.5",
|
|
1753
|
+
"nvidia/gpt-oss-120b",
|
|
1754
|
+
"deepseek/deepseek-chat",
|
|
1755
|
+
"google/gemini-2.5-flash"
|
|
1756
|
+
]
|
|
1731
1757
|
},
|
|
1732
1758
|
MEDIUM: {
|
|
1733
1759
|
primary: "deepseek/deepseek-chat",
|
|
1734
1760
|
// $0.14/$0.28
|
|
1735
|
-
fallback: [
|
|
1761
|
+
fallback: [
|
|
1762
|
+
"minimax/minimax-m2.5",
|
|
1763
|
+
// $0.30/$1.20 - cheap with reasoning
|
|
1764
|
+
"xai/grok-code-fast-1",
|
|
1765
|
+
"google/gemini-2.5-flash",
|
|
1766
|
+
"moonshot/kimi-k2.5"
|
|
1767
|
+
]
|
|
1736
1768
|
},
|
|
1737
1769
|
COMPLEX: {
|
|
1738
1770
|
primary: "xai/grok-4-0709",
|
|
1739
1771
|
// $0.20/$1.50
|
|
1740
|
-
fallback: [
|
|
1772
|
+
fallback: [
|
|
1773
|
+
"minimax/minimax-m2.5",
|
|
1774
|
+
// $0.30/$1.20 - cheap with reasoning
|
|
1775
|
+
"deepseek/deepseek-chat",
|
|
1776
|
+
"google/gemini-2.5-flash",
|
|
1777
|
+
"openai/gpt-4o-mini"
|
|
1778
|
+
]
|
|
1741
1779
|
},
|
|
1742
1780
|
REASONING: {
|
|
1743
|
-
primary: "
|
|
1744
|
-
// $0.
|
|
1745
|
-
fallback: ["xai/grok-4-1-fast-reasoning"]
|
|
1781
|
+
primary: "minimax/minimax-m2.5",
|
|
1782
|
+
// $0.30/$1.20 - cheapest reasoning model
|
|
1783
|
+
fallback: ["deepseek/deepseek-reasoner", "xai/grok-4-1-fast-reasoning"]
|
|
1746
1784
|
}
|
|
1747
1785
|
},
|
|
1748
1786
|
// Premium tier configs - best quality (blockrun/premium)
|
|
@@ -1793,6 +1831,8 @@ var DEFAULT_ROUTING_CONFIG = {
|
|
|
1793
1831
|
primary: "moonshot/kimi-k2.5",
|
|
1794
1832
|
// Cheaper than Haiku ($0.5/$2.4 vs $1/$5), larger context
|
|
1795
1833
|
fallback: [
|
|
1834
|
+
"minimax/minimax-m2.5",
|
|
1835
|
+
// $0.30/$1.20 - agentic capable, cheaper than kimi
|
|
1796
1836
|
"anthropic/claude-haiku-4.5",
|
|
1797
1837
|
"xai/grok-4-1-fast-non-reasoning",
|
|
1798
1838
|
"openai/gpt-4o-mini"
|
|
@@ -1801,13 +1841,21 @@ var DEFAULT_ROUTING_CONFIG = {
|
|
|
1801
1841
|
MEDIUM: {
|
|
1802
1842
|
primary: "xai/grok-code-fast-1",
|
|
1803
1843
|
// Code specialist for agentic coding
|
|
1804
|
-
fallback: [
|
|
1844
|
+
fallback: [
|
|
1845
|
+
"minimax/minimax-m2.5",
|
|
1846
|
+
// $0.30/$1.20 - agentic capable
|
|
1847
|
+
"moonshot/kimi-k2.5",
|
|
1848
|
+
"anthropic/claude-haiku-4.5",
|
|
1849
|
+
"anthropic/claude-sonnet-4.6"
|
|
1850
|
+
]
|
|
1805
1851
|
},
|
|
1806
1852
|
COMPLEX: {
|
|
1807
1853
|
primary: "anthropic/claude-sonnet-4.6",
|
|
1808
1854
|
fallback: [
|
|
1809
1855
|
"anthropic/claude-opus-4.6",
|
|
1810
1856
|
// Latest Opus - best agentic
|
|
1857
|
+
"minimax/minimax-m2.5",
|
|
1858
|
+
// $0.30/$1.20 - cheap agentic fallback
|
|
1811
1859
|
"openai/gpt-5.2",
|
|
1812
1860
|
"google/gemini-3-pro-preview",
|
|
1813
1861
|
"xai/grok-4-0709"
|
|
@@ -1818,6 +1866,8 @@ var DEFAULT_ROUTING_CONFIG = {
|
|
|
1818
1866
|
// Strong tool use + reasoning for agentic tasks
|
|
1819
1867
|
fallback: [
|
|
1820
1868
|
"anthropic/claude-opus-4.6",
|
|
1869
|
+
"minimax/minimax-m2.5",
|
|
1870
|
+
// $0.30/$1.20 - reasoning + agentic
|
|
1821
1871
|
"xai/grok-4-1-fast-reasoning",
|
|
1822
1872
|
"deepseek/deepseek-reasoner"
|
|
1823
1873
|
]
|
|
@@ -5293,9 +5343,15 @@ function injectModelsConfig(logger) {
|
|
|
5293
5343
|
fixed = true;
|
|
5294
5344
|
}
|
|
5295
5345
|
const currentModels = blockrun.models;
|
|
5296
|
-
|
|
5346
|
+
const currentModelIds = new Set(
|
|
5347
|
+
Array.isArray(currentModels) ? currentModels.map((m) => m?.id).filter(Boolean) : []
|
|
5348
|
+
);
|
|
5349
|
+
const expectedModelIds = OPENCLAW_MODELS.map((m) => m.id);
|
|
5350
|
+
const needsModelUpdate = !currentModels || !Array.isArray(currentModels) || currentModels.length !== OPENCLAW_MODELS.length || expectedModelIds.some((id) => !currentModelIds.has(id));
|
|
5351
|
+
if (needsModelUpdate) {
|
|
5297
5352
|
blockrun.models = OPENCLAW_MODELS;
|
|
5298
5353
|
fixed = true;
|
|
5354
|
+
logger.info(`Updated models list (${OPENCLAW_MODELS.length} models)`);
|
|
5299
5355
|
}
|
|
5300
5356
|
if (fixed) {
|
|
5301
5357
|
logger.info("Fixed incomplete BlockRun provider config");
|