@blockrun/clawrouter 0.9.25 → 0.9.27
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 +36 -32
- package/dist/cli.js.map +1 -1
- package/dist/index.js +43 -38
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/scripts/reinstall.sh +2 -1
package/dist/index.js
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
// src/models.ts
|
|
2
2
|
var MODEL_ALIASES = {
|
|
3
|
-
// Claude - short names
|
|
4
|
-
claude: "anthropic/claude-sonnet-4
|
|
5
|
-
sonnet: "anthropic/claude-sonnet-4
|
|
6
|
-
opus: "anthropic/claude-opus-4
|
|
7
|
-
|
|
8
|
-
"opus-
|
|
9
|
-
|
|
10
|
-
haiku: "anthropic/claude-haiku-4.5",
|
|
3
|
+
// Claude - short names (use dashes in version, not dots - Anthropic API format)
|
|
4
|
+
claude: "anthropic/claude-sonnet-4-6",
|
|
5
|
+
sonnet: "anthropic/claude-sonnet-4-6",
|
|
6
|
+
opus: "anthropic/claude-opus-4-6",
|
|
7
|
+
"opus-46": "anthropic/claude-opus-4-6",
|
|
8
|
+
"opus-45": "anthropic/claude-opus-4-5",
|
|
9
|
+
haiku: "anthropic/claude-haiku-4-5",
|
|
11
10
|
// Claude - provider/shortname patterns (common in agent frameworks)
|
|
12
|
-
"anthropic/sonnet": "anthropic/claude-sonnet-4
|
|
13
|
-
"anthropic/opus": "anthropic/claude-opus-4
|
|
14
|
-
"anthropic/haiku": "anthropic/claude-haiku-4
|
|
15
|
-
"anthropic/claude": "anthropic/claude-sonnet-4
|
|
11
|
+
"anthropic/sonnet": "anthropic/claude-sonnet-4-6",
|
|
12
|
+
"anthropic/opus": "anthropic/claude-opus-4-6",
|
|
13
|
+
"anthropic/haiku": "anthropic/claude-haiku-4-5",
|
|
14
|
+
"anthropic/claude": "anthropic/claude-sonnet-4-6",
|
|
15
|
+
// Backward compatibility - old dot notation still works
|
|
16
|
+
"anthropic/claude-sonnet-4.6": "anthropic/claude-sonnet-4-6",
|
|
17
|
+
"anthropic/claude-opus-4.6": "anthropic/claude-opus-4-6",
|
|
18
|
+
"anthropic/claude-opus-4.5": "anthropic/claude-opus-4-5",
|
|
19
|
+
"anthropic/claude-haiku-4.5": "anthropic/claude-haiku-4-5",
|
|
16
20
|
// OpenAI
|
|
17
21
|
gpt: "openai/gpt-4o",
|
|
18
22
|
gpt4: "openai/gpt-4o",
|
|
@@ -201,7 +205,7 @@ var BLOCKRUN_MODELS = [
|
|
|
201
205
|
},
|
|
202
206
|
// Anthropic - all Claude models excel at agentic workflows
|
|
203
207
|
{
|
|
204
|
-
id: "anthropic/claude-haiku-4
|
|
208
|
+
id: "anthropic/claude-haiku-4-5",
|
|
205
209
|
name: "Claude Haiku 4.5",
|
|
206
210
|
inputPrice: 1,
|
|
207
211
|
outputPrice: 5,
|
|
@@ -210,7 +214,7 @@ var BLOCKRUN_MODELS = [
|
|
|
210
214
|
agentic: true
|
|
211
215
|
},
|
|
212
216
|
{
|
|
213
|
-
id: "anthropic/claude-sonnet-4
|
|
217
|
+
id: "anthropic/claude-sonnet-4-6",
|
|
214
218
|
name: "Claude Sonnet 4.6",
|
|
215
219
|
inputPrice: 3,
|
|
216
220
|
outputPrice: 15,
|
|
@@ -230,7 +234,7 @@ var BLOCKRUN_MODELS = [
|
|
|
230
234
|
agentic: true
|
|
231
235
|
},
|
|
232
236
|
{
|
|
233
|
-
id: "anthropic/claude-opus-4
|
|
237
|
+
id: "anthropic/claude-opus-4-5",
|
|
234
238
|
name: "Claude Opus 4.5",
|
|
235
239
|
inputPrice: 5,
|
|
236
240
|
outputPrice: 25,
|
|
@@ -240,7 +244,7 @@ var BLOCKRUN_MODELS = [
|
|
|
240
244
|
agentic: true
|
|
241
245
|
},
|
|
242
246
|
{
|
|
243
|
-
id: "anthropic/claude-opus-4
|
|
247
|
+
id: "anthropic/claude-opus-4-6",
|
|
244
248
|
name: "Claude Opus 4.6",
|
|
245
249
|
inputPrice: 5,
|
|
246
250
|
outputPrice: 25,
|
|
@@ -1726,7 +1730,7 @@ var DEFAULT_ROUTING_CONFIG = {
|
|
|
1726
1730
|
"openai/gpt-5.2",
|
|
1727
1731
|
// Newer and cheaper input than gpt-4o
|
|
1728
1732
|
"openai/gpt-4o",
|
|
1729
|
-
"anthropic/claude-sonnet-4
|
|
1733
|
+
"anthropic/claude-sonnet-4-6"
|
|
1730
1734
|
]
|
|
1731
1735
|
},
|
|
1732
1736
|
REASONING: {
|
|
@@ -1789,7 +1793,7 @@ var DEFAULT_ROUTING_CONFIG = {
|
|
|
1789
1793
|
SIMPLE: {
|
|
1790
1794
|
primary: "moonshot/kimi-k2.5",
|
|
1791
1795
|
// $0.50/$2.40 - good for simple coding
|
|
1792
|
-
fallback: ["anthropic/claude-haiku-4
|
|
1796
|
+
fallback: ["anthropic/claude-haiku-4-5", "google/gemini-2.5-flash", "xai/grok-code-fast-1"]
|
|
1793
1797
|
},
|
|
1794
1798
|
MEDIUM: {
|
|
1795
1799
|
primary: "openai/gpt-5.2-codex",
|
|
@@ -1798,26 +1802,26 @@ var DEFAULT_ROUTING_CONFIG = {
|
|
|
1798
1802
|
"moonshot/kimi-k2.5",
|
|
1799
1803
|
"google/gemini-2.5-pro",
|
|
1800
1804
|
"xai/grok-4-0709",
|
|
1801
|
-
"anthropic/claude-sonnet-4
|
|
1805
|
+
"anthropic/claude-sonnet-4-6"
|
|
1802
1806
|
]
|
|
1803
1807
|
},
|
|
1804
1808
|
COMPLEX: {
|
|
1805
|
-
primary: "anthropic/claude-opus-4
|
|
1809
|
+
primary: "anthropic/claude-opus-4-6",
|
|
1806
1810
|
// Best quality for complex tasks
|
|
1807
1811
|
fallback: [
|
|
1808
1812
|
"openai/gpt-5.2-codex",
|
|
1809
|
-
"anthropic/claude-opus-4
|
|
1810
|
-
"anthropic/claude-sonnet-4
|
|
1813
|
+
"anthropic/claude-opus-4-5",
|
|
1814
|
+
"anthropic/claude-sonnet-4-6",
|
|
1811
1815
|
"google/gemini-3-pro-preview",
|
|
1812
1816
|
"moonshot/kimi-k2.5"
|
|
1813
1817
|
]
|
|
1814
1818
|
},
|
|
1815
1819
|
REASONING: {
|
|
1816
|
-
primary: "anthropic/claude-sonnet-4
|
|
1820
|
+
primary: "anthropic/claude-sonnet-4-6",
|
|
1817
1821
|
// $3/$15 - best for reasoning/instructions
|
|
1818
1822
|
fallback: [
|
|
1819
|
-
"anthropic/claude-opus-4
|
|
1820
|
-
"anthropic/claude-opus-4
|
|
1823
|
+
"anthropic/claude-opus-4-6",
|
|
1824
|
+
"anthropic/claude-opus-4-5",
|
|
1821
1825
|
"openai/o4-mini",
|
|
1822
1826
|
// Newer and cheaper than o3 ($1.10 vs $2.00)
|
|
1823
1827
|
"openai/o3",
|
|
@@ -1833,7 +1837,7 @@ var DEFAULT_ROUTING_CONFIG = {
|
|
|
1833
1837
|
fallback: [
|
|
1834
1838
|
"minimax/minimax-m2.5",
|
|
1835
1839
|
// $0.30/$1.20 - agentic capable, cheaper than kimi
|
|
1836
|
-
"anthropic/claude-haiku-4
|
|
1840
|
+
"anthropic/claude-haiku-4-5",
|
|
1837
1841
|
"xai/grok-4-1-fast-non-reasoning",
|
|
1838
1842
|
"openai/gpt-4o-mini"
|
|
1839
1843
|
]
|
|
@@ -1845,14 +1849,14 @@ var DEFAULT_ROUTING_CONFIG = {
|
|
|
1845
1849
|
"minimax/minimax-m2.5",
|
|
1846
1850
|
// $0.30/$1.20 - agentic capable
|
|
1847
1851
|
"moonshot/kimi-k2.5",
|
|
1848
|
-
"anthropic/claude-haiku-4
|
|
1849
|
-
"anthropic/claude-sonnet-4
|
|
1852
|
+
"anthropic/claude-haiku-4-5",
|
|
1853
|
+
"anthropic/claude-sonnet-4-6"
|
|
1850
1854
|
]
|
|
1851
1855
|
},
|
|
1852
1856
|
COMPLEX: {
|
|
1853
|
-
primary: "anthropic/claude-sonnet-4
|
|
1857
|
+
primary: "anthropic/claude-sonnet-4-6",
|
|
1854
1858
|
fallback: [
|
|
1855
|
-
"anthropic/claude-opus-4
|
|
1859
|
+
"anthropic/claude-opus-4-6",
|
|
1856
1860
|
// Latest Opus - best agentic
|
|
1857
1861
|
"minimax/minimax-m2.5",
|
|
1858
1862
|
// $0.30/$1.20 - cheap agentic fallback
|
|
@@ -1862,10 +1866,10 @@ var DEFAULT_ROUTING_CONFIG = {
|
|
|
1862
1866
|
]
|
|
1863
1867
|
},
|
|
1864
1868
|
REASONING: {
|
|
1865
|
-
primary: "anthropic/claude-sonnet-4
|
|
1869
|
+
primary: "anthropic/claude-sonnet-4-6",
|
|
1866
1870
|
// Strong tool use + reasoning for agentic tasks
|
|
1867
1871
|
fallback: [
|
|
1868
|
-
"anthropic/claude-opus-4
|
|
1872
|
+
"anthropic/claude-opus-4-6",
|
|
1869
1873
|
"minimax/minimax-m2.5",
|
|
1870
1874
|
// $0.30/$1.20 - reasoning + agentic
|
|
1871
1875
|
"xai/grok-4-1-fast-reasoning",
|
|
@@ -5383,9 +5387,9 @@ function injectModelsConfig(logger) {
|
|
|
5383
5387
|
{ id: "eco", alias: "eco" },
|
|
5384
5388
|
{ id: "premium", alias: "premium" },
|
|
5385
5389
|
{ id: "free", alias: "free" },
|
|
5386
|
-
{ id: "sonnet", alias: "
|
|
5387
|
-
{ id: "opus", alias: "
|
|
5388
|
-
{ id: "haiku", alias: "
|
|
5390
|
+
{ id: "sonnet", alias: "sonnet4.6" },
|
|
5391
|
+
{ id: "opus", alias: "opus4.6" },
|
|
5392
|
+
{ id: "haiku", alias: "haiku" },
|
|
5389
5393
|
{ id: "gpt5", alias: "gpt5" },
|
|
5390
5394
|
{ id: "codex", alias: "codex" },
|
|
5391
5395
|
{ id: "grok-fast", alias: "grok-fast" },
|
|
@@ -5394,15 +5398,16 @@ function injectModelsConfig(logger) {
|
|
|
5394
5398
|
{ id: "reasoner", alias: "reasoner" },
|
|
5395
5399
|
{ id: "kimi", alias: "kimi" },
|
|
5396
5400
|
{ id: "minimax", alias: "minimax" },
|
|
5397
|
-
{ id: "gemini", alias: "gemini" }
|
|
5398
|
-
{ id: "flash", alias: "flash" }
|
|
5401
|
+
{ id: "gemini", alias: "gemini" }
|
|
5399
5402
|
];
|
|
5400
5403
|
const DEPRECATED_ALIASES = [
|
|
5401
5404
|
"blockrun/nvidia",
|
|
5402
5405
|
"blockrun/gpt",
|
|
5403
5406
|
"blockrun/o3",
|
|
5404
5407
|
"blockrun/grok",
|
|
5405
|
-
"blockrun/mini"
|
|
5408
|
+
"blockrun/mini",
|
|
5409
|
+
"blockrun/flash"
|
|
5410
|
+
// removed from picker - use gemini instead
|
|
5406
5411
|
];
|
|
5407
5412
|
if (!defaults.models) {
|
|
5408
5413
|
defaults.models = {};
|