@blockrun/clawrouter 0.12.11 → 0.12.12

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
@@ -7255,6 +7255,20 @@ async function proxyRequest(req, res, apiBase, payFetch, options, routerOpts, de
7255
7255
  if (result.isProviderError && !isLastAttempt) {
7256
7256
  if (result.errorStatus === 429) {
7257
7257
  markRateLimited(tryModel);
7258
+ try {
7259
+ const parsed = JSON.parse(result.errorBody || "{}");
7260
+ if (parsed.update_available) {
7261
+ console.log("");
7262
+ console.log(
7263
+ `\x1B[33m\u2B06\uFE0F ClawRouter ${parsed.update_available} available (you have ${VERSION})\x1B[0m`
7264
+ );
7265
+ console.log(
7266
+ ` Run: \x1B[36mcurl -fsSL ${parsed.update_url || "https://blockrun.ai/ClawRouter-update"} | bash\x1B[0m`
7267
+ );
7268
+ console.log("");
7269
+ }
7270
+ } catch {
7271
+ }
7258
7272
  }
7259
7273
  const isPaymentErr = /payment.*verification.*failed|payment.*settlement.*failed|insufficient.*funds|transaction_simulation_failed/i.test(
7260
7274
  result.errorBody || ""