Add API streaming failed error handling

This commit is contained in:
Saoud Rizwan
2024-09-30 19:52:00 -04:00
parent 9b1b9c10a1
commit 42bcc4420d
3 changed files with 110 additions and 62 deletions

View File

@@ -95,5 +95,8 @@ export interface ClaudeApiReqInfo {
cacheWrites?: number
cacheReads?: number
cost?: number
cancelled?: boolean
cancelReason?: ClaudeApiReqCancelReason
streamingFailedMessage?: string
}
export type ClaudeApiReqCancelReason = "streaming_failed" | "user_cancelled"