Browse Source

add retry case for grok resource exhausted

Aiden Cline 2 months ago
parent
commit
91db82c138
1 changed files with 3 additions and 0 deletions
  1. 3 0
      packages/opencode/src/session/retry.ts

+ 3 - 0
packages/opencode/src/session/retry.ts

@@ -65,6 +65,9 @@ export namespace SessionRetry {
         if (json.type === "error" && json.error?.type === "too_many_requests") {
         if (json.type === "error" && json.error?.type === "too_many_requests") {
           return "Too Many Requests"
           return "Too Many Requests"
         }
         }
+        if (json.code === "Some resource has been exhausted") {
+          return "Provider is overloaded"
+        }
       } catch {}
       } catch {}
     }
     }