@blockrun/clawrouter 0.9.26 → 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/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.6",
5
- sonnet: "anthropic/claude-sonnet-4.6",
6
- opus: "anthropic/claude-opus-4.6",
7
- // Updated to latest Opus 4.6
8
- "opus-46": "anthropic/claude-opus-4.6",
9
- "opus-45": "anthropic/claude-opus-4.5",
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.6",
13
- "anthropic/opus": "anthropic/claude-opus-4.6",
14
- "anthropic/haiku": "anthropic/claude-haiku-4.5",
15
- "anthropic/claude": "anthropic/claude-sonnet-4.6",
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.5",
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.6",
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.5",
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.6",
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.6"
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.5", "google/gemini-2.5-flash", "xai/grok-code-fast-1"]
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.6"
1805
+ "anthropic/claude-sonnet-4-6"
1802
1806
  ]
1803
1807
  },
1804
1808
  COMPLEX: {
1805
- primary: "anthropic/claude-opus-4.6",
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.5",
1810
- "anthropic/claude-sonnet-4.6",
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.6",
1820
+ primary: "anthropic/claude-sonnet-4-6",
1817
1821
  // $3/$15 - best for reasoning/instructions
1818
1822
  fallback: [
1819
- "anthropic/claude-opus-4.6",
1820
- "anthropic/claude-opus-4.5",
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.5",
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.5",
1849
- "anthropic/claude-sonnet-4.6"
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.6",
1857
+ primary: "anthropic/claude-sonnet-4-6",
1854
1858
  fallback: [
1855
- "anthropic/claude-opus-4.6",
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.6",
1869
+ primary: "anthropic/claude-sonnet-4-6",
1866
1870
  // Strong tool use + reasoning for agentic tasks
1867
1871
  fallback: [
1868
- "anthropic/claude-opus-4.6",
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",