@standardagents/builder 0.27.9 → 0.27.10

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.
@@ -43624,6 +43624,17 @@ var init_dist6 = __esm({
43624
43624
  // ============================================================================
43625
43625
  // Error Handling
43626
43626
  // ============================================================================
43627
+ /**
43628
+ * True when a 403 is an edge/CDN block page (HTML challenge such as
43629
+ * Cloudflare's "Unable to load site") rather than a real API auth error.
43630
+ * Real API 403s carry a JSON error body; edge blocks carry HTML.
43631
+ */
43632
+ static isEdgeBlock(error) {
43633
+ const parts = [error?.message];
43634
+ if (typeof error?.error === "string") parts.push(error.error);
43635
+ const body = parts.filter(Boolean).join(" ");
43636
+ return /<html|<!doctype|unable to load site|ray id|cloudflare|attention required/i.test(body);
43637
+ }
43627
43638
  toProviderError(error) {
43628
43639
  if (error instanceof ProviderError) {
43629
43640
  return error;
@@ -43635,6 +43646,9 @@ var init_dist6 = __esm({
43635
43646
  if (status === 429) {
43636
43647
  return new ProviderError(error.message, "rate_limit", status, retryAfter);
43637
43648
  }
43649
+ if (status === 403 && _OpenAIProvider.isEdgeBlock(anyError)) {
43650
+ return new ProviderError(error.message, "server_error", status);
43651
+ }
43638
43652
  if (status === 401 || status === 403) {
43639
43653
  return new ProviderError(error.message, "auth_error", status);
43640
43654
  }
@@ -66263,7 +66277,7 @@ var config_get_default = defineController2(async ({ config, env: env2, req }) =>
66263
66277
  });
66264
66278
 
66265
66279
  // src/version.ts
66266
- var BUILDER_VERSION = "0.27.9".length > 0 ? "0.27.9" : "dev";
66280
+ var BUILDER_VERSION = "0.27.10".length > 0 ? "0.27.10" : "dev";
66267
66281
 
66268
66282
  // src/api/diagnostics.get.ts
66269
66283
  init_LLMRequest();