@blockrun/clawrouter 0.10.7 → 0.10.9

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
@@ -1880,6 +1880,8 @@ var MODEL_ALIASES = {
1880
1880
  reasoner: "deepseek/deepseek-reasoner",
1881
1881
  // Kimi / Moonshot
1882
1882
  kimi: "moonshot/kimi-k2.5",
1883
+ moonshot: "moonshot/kimi-k2.5",
1884
+ "kimi-k2.5": "moonshot/kimi-k2.5",
1883
1885
  // Google
1884
1886
  gemini: "google/gemini-2.5-pro",
1885
1887
  flash: "google/gemini-2.5-flash",
@@ -4272,7 +4274,10 @@ var PROVIDER_ERROR_PATTERNS = [
4272
4274
  /authentication.*failed/i,
4273
4275
  /request too large/i,
4274
4276
  /request.*size.*exceeds/i,
4275
- /payload too large/i
4277
+ /payload too large/i,
4278
+ /payment.*verification.*failed/i,
4279
+ /model.*not.*allowed/i,
4280
+ /unknown.*model/i
4276
4281
  ];
4277
4282
  var DEGRADED_RESPONSE_PATTERNS = [
4278
4283
  /the ai service is temporarily overloaded/i,
@@ -4592,7 +4597,7 @@ function estimateAmount(modelId, bodyLength, maxTokens) {
4592
4597
  const estimatedInputTokens = Math.ceil(bodyLength / 4);
4593
4598
  const estimatedOutputTokens = maxTokens || model.maxOutput || 4096;
4594
4599
  const costUsd = estimatedInputTokens / 1e6 * model.inputPrice + estimatedOutputTokens / 1e6 * model.outputPrice;
4595
- const amountMicros = Math.max(100, Math.ceil(costUsd * 1.2 * 1e6));
4600
+ const amountMicros = Math.max(1e3, Math.ceil(costUsd * 1.2 * 1e6));
4596
4601
  return amountMicros.toString();
4597
4602
  }
4598
4603
  async function proxyPartnerRequest(req, res, apiBase, payFetch) {