@blockrun/clawrouter 0.12.43 → 0.12.45

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
@@ -996,6 +996,7 @@ var MODEL_ALIASES = {
996
996
  o3: "openai/o3",
997
997
  // DeepSeek
998
998
  deepseek: "deepseek/deepseek-chat",
999
+ "deepseek-chat": "deepseek/deepseek-chat",
999
1000
  reasoner: "deepseek/deepseek-reasoner",
1000
1001
  // Kimi / Moonshot
1001
1002
  kimi: "moonshot/kimi-k2.5",
@@ -3300,18 +3301,20 @@ var DEFAULT_ROUTING_CONFIG = {
3300
3301
  // Agentic tier configs - models that excel at multi-step autonomous tasks
3301
3302
  agenticTiers: {
3302
3303
  SIMPLE: {
3303
- primary: "moonshot/kimi-k2.5",
3304
- // Cheaper than Haiku ($0.5/$2.4 vs $1/$5), larger context
3304
+ primary: "openai/gpt-4o-mini",
3305
+ // $0.15/$0.60 - best tool compliance at lowest cost
3305
3306
  fallback: [
3307
+ "moonshot/kimi-k2.5",
3306
3308
  "anthropic/claude-haiku-4.5",
3307
- "xai/grok-4-1-fast-non-reasoning",
3308
- "openai/gpt-4o-mini"
3309
+ "xai/grok-4-1-fast-non-reasoning"
3309
3310
  ]
3310
3311
  },
3311
3312
  MEDIUM: {
3312
3313
  primary: "moonshot/kimi-k2.5",
3313
3314
  // $0.50/$2.40 - strong tool use, handles function calls correctly
3314
3315
  fallback: [
3316
+ "openai/gpt-4o-mini",
3317
+ // $0.15/$0.60 - reliable tool calling fallback
3315
3318
  "anthropic/claude-haiku-4.5",
3316
3319
  "deepseek/deepseek-chat",
3317
3320
  "xai/grok-4-1-fast-non-reasoning"
@@ -7414,17 +7417,9 @@ async function proxyRequest(req, res, apiBase, payFetch, options, routerOpts, de
7414
7417
  hasTools
7415
7418
  });
7416
7419
  if (hasTools && routingDecision.tier === "SIMPLE") {
7417
- const simpleRoutingDecision = route(prompt, systemPrompt, maxTokens, {
7418
- ...routerOpts,
7419
- routingProfile: routingProfile ?? void 0,
7420
- hasTools: false
7421
- });
7422
- if (simpleRoutingDecision.tier === "SIMPLE") {
7423
- console.log(
7424
- `[ClawRouter] SIMPLE+tools: using non-agentic model ${simpleRoutingDecision.model} (tools present but query is trivial)`
7425
- );
7426
- routingDecision = simpleRoutingDecision;
7427
- }
7420
+ console.log(
7421
+ `[ClawRouter] SIMPLE+tools: keeping agentic model ${routingDecision.model} (tools need reliable function-call support)`
7422
+ );
7428
7423
  }
7429
7424
  if (existingSession) {
7430
7425
  const tierRank = {
@@ -7741,7 +7736,7 @@ async function proxyRequest(req, res, apiBase, payFetch, options, routerOpts, de
7741
7736
  } else {
7742
7737
  modelsToTry = modelId ? [modelId] : [];
7743
7738
  }
7744
- if (!modelsToTry.includes(FREE_MODEL)) {
7739
+ if (!hasTools && !modelsToTry.includes(FREE_MODEL)) {
7745
7740
  modelsToTry.push(FREE_MODEL);
7746
7741
  }
7747
7742
  let upstream;
@@ -8710,7 +8705,9 @@ function injectModelsConfig(logger) {
8710
8705
  "anthropic/claude-sonnet-4.6",
8711
8706
  "anthropic/claude-opus-4.6",
8712
8707
  "anthropic/claude-haiku-4.5",
8708
+ "openai/gpt-5.4",
8713
8709
  "openai/gpt-5.3",
8710
+ "openai/gpt-5.3-codex",
8714
8711
  "openai/gpt-4o",
8715
8712
  "openai/o3",
8716
8713
  "google/gemini-3.1-pro",
@@ -8919,6 +8916,12 @@ async function createWalletCommand() {
8919
8916
  acceptsArgs: true,
8920
8917
  requireAuth: true,
8921
8918
  handler: async (ctx) => {
8919
+ const primary = String(
8920
+ ctx.config?.agents?.defaults?.model?.primary ?? ""
8921
+ );
8922
+ if (!primary.startsWith("blockrun/")) {
8923
+ return {};
8924
+ }
8922
8925
  const subcommand = ctx.args?.trim().toLowerCase() || "status";
8923
8926
  let walletKey;
8924
8927
  let address;