@strayl/agent 0.1.14 → 0.1.15
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/agent.js +3 -1
- package/package.json +1 -1
package/dist/agent.js
CHANGED
|
@@ -13693,7 +13693,9 @@ ${IMPLEMENTATION_MODE_PROMPT2}`);
|
|
|
13693
13693
|
emitter.emit({ type: "error", message: `LLM failed ${consecutiveLLMErrors} times in a row: ${msg}`, recoverable: false });
|
|
13694
13694
|
break;
|
|
13695
13695
|
}
|
|
13696
|
-
|
|
13696
|
+
const backoffMs = Math.min(2e3 * Math.pow(2, consecutiveLLMErrors - 1), 16e3);
|
|
13697
|
+
emitter.emit({ type: "error", message: `LLM error (${consecutiveLLMErrors}/${MAX_CONSECUTIVE_LLM_ERRORS}): ${msg} \u2014 retrying in ${backoffMs / 1e3}s`, recoverable: true });
|
|
13698
|
+
await new Promise((r) => setTimeout(r, backoffMs));
|
|
13697
13699
|
context.addAssistant(`[Error communicating with model: ${msg}]`);
|
|
13698
13700
|
continue;
|
|
13699
13701
|
}
|