@blockrun/clawrouter 0.12.6 → 0.12.7

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 CHANGED
@@ -1449,8 +1449,8 @@ var DEFAULT_ROUTING_CONFIG = {
1449
1449
  "google/gemini-2.5-pro",
1450
1450
  "deepseek/deepseek-chat",
1451
1451
  "xai/grok-4-0709",
1452
- "openai/gpt-5.2",
1453
- // Newer and cheaper input than gpt-4o
1452
+ "openai/gpt-5.4",
1453
+ // Newest flagship, same price as 4o
1454
1454
  "openai/gpt-4o",
1455
1455
  "anthropic/claude-sonnet-4.6"
1456
1456
  ]
@@ -1516,6 +1516,8 @@ var DEFAULT_ROUTING_CONFIG = {
1516
1516
  primary: "anthropic/claude-opus-4.6",
1517
1517
  // Best quality for complex tasks
1518
1518
  fallback: [
1519
+ "openai/gpt-5.4",
1520
+ // Newest flagship
1519
1521
  "openai/gpt-5.2-codex",
1520
1522
  "anthropic/claude-opus-4.6",
1521
1523
  "anthropic/claude-sonnet-4.6",
@@ -1563,7 +1565,8 @@ var DEFAULT_ROUTING_CONFIG = {
1563
1565
  fallback: [
1564
1566
  "anthropic/claude-opus-4.6",
1565
1567
  // Latest Opus - best agentic
1566
- "openai/gpt-5.2",
1568
+ "openai/gpt-5.4",
1569
+ // Newest flagship
1567
1570
  "google/gemini-3.1-pro",
1568
1571
  // Newest Gemini
1569
1572
  "google/gemini-3-pro-preview",
@@ -1692,7 +1695,9 @@ var MODEL_ALIASES = {
1692
1695
  // OpenAI
1693
1696
  gpt: "openai/gpt-4o",
1694
1697
  gpt4: "openai/gpt-4o",
1695
- gpt5: "openai/gpt-5.2",
1698
+ gpt5: "openai/gpt-5.4",
1699
+ "gpt-5.4": "openai/gpt-5.4",
1700
+ "gpt-5.4-pro": "openai/gpt-5.4-pro",
1696
1701
  codex: "openai/gpt-5.2-codex",
1697
1702
  mini: "openai/gpt-4o-mini",
1698
1703
  o1: "openai/o1",
@@ -1816,6 +1821,31 @@ var BLOCKRUN_MODELS = [
1816
1821
  reasoning: true,
1817
1822
  toolCalling: true
1818
1823
  },
1824
+ // GPT-5.4 — newest flagship, same input price as 4o but much more capable
1825
+ {
1826
+ id: "openai/gpt-5.4",
1827
+ name: "GPT-5.4",
1828
+ version: "5.4",
1829
+ inputPrice: 2.5,
1830
+ outputPrice: 15,
1831
+ contextWindow: 4e5,
1832
+ maxOutput: 128e3,
1833
+ reasoning: true,
1834
+ vision: true,
1835
+ agentic: true,
1836
+ toolCalling: true
1837
+ },
1838
+ {
1839
+ id: "openai/gpt-5.4-pro",
1840
+ name: "GPT-5.4 Pro",
1841
+ version: "5.4",
1842
+ inputPrice: 30,
1843
+ outputPrice: 180,
1844
+ contextWindow: 4e5,
1845
+ maxOutput: 128e3,
1846
+ reasoning: true,
1847
+ toolCalling: true
1848
+ },
1819
1849
  // OpenAI Codex Family
1820
1850
  {
1821
1851
  id: "openai/gpt-5.2-codex",
@@ -3520,12 +3550,7 @@ var sha5122 = sha512;
3520
3550
  // src/wallet.ts
3521
3551
  import { privateKeyToAccount } from "viem/accounts";
3522
3552
  var ETH_DERIVATION_PATH = "m/44'/60'/0'/0/0";
3523
- var SOLANA_HARDENED_INDICES = [
3524
- 44 + 2147483648,
3525
- 501 + 2147483648,
3526
- 0 + 2147483648,
3527
- 0 + 2147483648
3528
- ];
3553
+ var SOLANA_HARDENED_INDICES = [44 + 2147483648, 501 + 2147483648, 0 + 2147483648, 0 + 2147483648];
3529
3554
  function generateWalletMnemonic() {
3530
3555
  return generateMnemonic(english, 256);
3531
3556
  }
@@ -6613,13 +6638,24 @@ async function proxyRequest(req, res, apiBase, payFetch, options, routerOpts, de
6613
6638
  `[ClawRouter] Context filter (~${estimatedTotalTokens} tokens): excluded ${contextExcluded.join(", ")}`
6614
6639
  );
6615
6640
  }
6616
- const toolFiltered = filterByToolCalling(contextFiltered, hasTools, supportsToolCalling);
6641
+ let toolFiltered = filterByToolCalling(contextFiltered, hasTools, supportsToolCalling);
6617
6642
  const toolExcluded = contextFiltered.filter((m) => !toolFiltered.includes(m));
6618
6643
  if (toolExcluded.length > 0) {
6619
6644
  console.log(
6620
6645
  `[ClawRouter] Tool-calling filter: excluded ${toolExcluded.join(", ")} (no structured function call support)`
6621
6646
  );
6622
6647
  }
6648
+ const TOOL_NONCOMPLIANT_MODELS = ["google/gemini-2.5-flash-lite"];
6649
+ if (hasTools && toolFiltered.length > 1) {
6650
+ const compliant = toolFiltered.filter((m) => !TOOL_NONCOMPLIANT_MODELS.includes(m));
6651
+ if (compliant.length > 0 && compliant.length < toolFiltered.length) {
6652
+ const dropped = toolFiltered.filter((m) => TOOL_NONCOMPLIANT_MODELS.includes(m));
6653
+ console.log(
6654
+ `[ClawRouter] Tool-compliance filter: excluded ${dropped.join(", ")} (unreliable tool schema handling)`
6655
+ );
6656
+ toolFiltered = compliant;
6657
+ }
6658
+ }
6623
6659
  const visionFiltered = filterByVision(toolFiltered, hasVision, supportsVision);
6624
6660
  const visionExcluded = toolFiltered.filter((m) => !visionFiltered.includes(m));
6625
6661
  if (visionExcluded.length > 0) {