@autonoma-ai/planner 0.1.11 → 0.1.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 +6 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -302,6 +302,10 @@ function classifyAgentError(err) {
|
|
|
302
302
|
if (msg.includes("timed out") || msg.includes("timeout") || msg.includes("abort")) {
|
|
303
303
|
return "timeout";
|
|
304
304
|
}
|
|
305
|
+
const chain = chainMessages(err);
|
|
306
|
+
if (RETRYABLE_PROVIDER_QUIRKS.some((pattern) => chain.includes(pattern))) {
|
|
307
|
+
return "transient";
|
|
308
|
+
}
|
|
305
309
|
if (APICallError.isInstance(err)) {
|
|
306
310
|
if (err.statusCode != null && FATAL_STATUS_CODES.has(err.statusCode)) return "fatal";
|
|
307
311
|
return "transient";
|
|
@@ -320,7 +324,7 @@ function classifyAgentError(err) {
|
|
|
320
324
|
}
|
|
321
325
|
return "transient";
|
|
322
326
|
}
|
|
323
|
-
var AgentError, FATAL_STATUS_CODES, TRANSIENT_MESSAGE_PATTERNS;
|
|
327
|
+
var AgentError, FATAL_STATUS_CODES, RETRYABLE_PROVIDER_QUIRKS, TRANSIENT_MESSAGE_PATTERNS;
|
|
324
328
|
var init_errors = __esm({
|
|
325
329
|
"src/core/errors.ts"() {
|
|
326
330
|
"use strict";
|
|
@@ -338,6 +342,7 @@ var init_errors = __esm({
|
|
|
338
342
|
cause;
|
|
339
343
|
};
|
|
340
344
|
FATAL_STATUS_CODES = /* @__PURE__ */ new Set([400, 401, 403, 404, 422]);
|
|
345
|
+
RETRYABLE_PROVIDER_QUIRKS = ["corrupted thought signature"];
|
|
341
346
|
TRANSIENT_MESSAGE_PATTERNS = [
|
|
342
347
|
"econnreset",
|
|
343
348
|
"econnrefused",
|