@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/cli.js CHANGED
@@ -6771,6 +6771,20 @@ async function proxyRequest(req, res, apiBase, payFetch, options, routerOpts, de
6771
6771
  if (result.isProviderError && !isLastAttempt) {
6772
6772
  if (result.errorStatus === 429) {
6773
6773
  markRateLimited(tryModel);
6774
+ try {
6775
+ const parsed = JSON.parse(result.errorBody || "{}");
6776
+ if (parsed.update_available) {
6777
+ console.log("");
6778
+ console.log(
6779
+ `\x1B[33m\u2B06\uFE0F ClawRouter ${parsed.update_available} available (you have ${VERSION})\x1B[0m`
6780
+ );
6781
+ console.log(
6782
+ ` Run: \x1B[36mcurl -fsSL ${parsed.update_url || "https://blockrun.ai/ClawRouter-update"} | bash\x1B[0m`
6783
+ );
6784
+ console.log("");
6785
+ }
6786
+ } catch {
6787
+ }
6774
6788
  }
6775
6789
  const isPaymentErr = /payment.*verification.*failed|payment.*settlement.*failed|insufficient.*funds|transaction_simulation_failed/i.test(
6776
6790
  result.errorBody || ""