fix(opencode): retry network error variants (#43806)

Co-authored-by: Aiden <rekram1-node@users.noreply.github.com>
This commit is contained in:
opencode-agent[bot]
2026-08-21 01:47:20 -05:00
committed by GitHub
parent e11dbd0206
commit 40282c1d4d
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ const RETRYABLE_MESSAGE_PATTERNS = [
/429|500|502|503|504|524/i,
/rate increased too quickly|rate limit|rate-limit|rate_limit|too many requests/i,
/overloaded|service unavailable|service_unavailable|service-unavailable|internal error|internal_error|internal server error|server error|server_error|server-error|provider returned error|provider_returned_error|provider-returned-error/i,
/terminated|fetch failed|failed to fetch|network error|upstream connect|connection error|connection refused|connection lost|socket connection was closed|socket hang up|reset before headers|getaddrinfo|enotfound|eai_again|econnrefused|econnreset|etimedout/i,
/terminated|fetch failed|failed to fetch|network[-_\s]error|upstream connect|connection error|connection refused|connection lost|socket connection was closed|socket hang up|reset before headers|getaddrinfo|enotfound|eai_again|econnrefused|econnreset|etimedout/i,
/^timeout$|\b(?:request|response|connection|network|stream|read) (?:timeout|timed out|time out)\b/i,
/try your request again|retry your request|resource exhausted|resource_exhausted/i,
/\btry again (?:later|in\b)|\b(?:currently|temporarily) at capacity\b/i,
@@ -207,6 +207,9 @@ describe("session.retry.retryable", () => {
"provider-returned-error",
"terminated",
"fetch failed",
"network error",
"network-error",
"network_error",
"connection refused",
"connect ECONNREFUSED",
"request ETIMEDOUT",