fix(openai): retry websocket stream failures (#29673)

This commit is contained in:
Aiden Cline
2026-05-28 01:16:18 -05:00
committed by GitHub
parent 2c9db3771f
commit 29dec8214f
7 changed files with 305 additions and 186 deletions
+8
View File
@@ -11,6 +11,14 @@ export class HeaderTimeoutError extends Error {
}
}
export class ResponseStreamError extends Error {
public override readonly name = "ProviderResponseStreamError"
constructor(message: string, options?: ErrorOptions) {
super(message, options)
}
}
// Adapted from overflow detection patterns in:
// https://github.com/badlogic/pi-mono/blob/main/packages/ai/src/utils/overflow.ts
const OVERFLOW_PATTERNS = [