feat: add server_error, rate_limit, and no_kv_space retry logic to accommodate Foundry API issues (#5527)

Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
This commit is contained in:
Sellers Crisp 2025-12-14 12:46:14 -05:00 committed by GitHub
parent 6d412d8872
commit 92948ed8a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -68,6 +68,12 @@ export namespace SessionRetry {
if (json.code === "Some resource has been exhausted") {
return "Provider is overloaded"
}
if (json.type === "error" && json.error?.code?.includes("rate_limit")) {
return "Rate Limited"
}
if (json.error?.message?.includes("no_kv_space") || (json.type === "error" && json.error?.type === "server_error")) {
return "Provider Server Error"
}
} catch {}
}