chore: update retry logic
This commit is contained in:
+1
-1
@@ -174,7 +174,7 @@ async function runOllamaLoop(ctx: AgentRunContext): Promise<AgentResult> {
|
|||||||
options: { num_ctx: numCtx, temperature: 0.1 },
|
options: { num_ctx: numCtx, temperature: 0.1 },
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
delaysMs: [3_000, 8_000],
|
delaysMs: [3_000, 8_000, 15_000, 30_000, 600_000], // up to 6 attempts over ~16 minutes
|
||||||
shouldRetry: (err) => {
|
shouldRetry: (err) => {
|
||||||
const msg = err instanceof Error ? err.message : String(err);
|
const msg = err instanceof Error ? err.message : String(err);
|
||||||
return /unexpected EOF|XML syntax error|ECONNRESET|ETIMEDOUT|fetch failed/i.test(msg);
|
return /unexpected EOF|XML syntax error|ECONNRESET|ETIMEDOUT|fetch failed/i.test(msg);
|
||||||
|
|||||||
Reference in New Issue
Block a user