fix
This commit is contained in:
1 parent
ee1405cc1a
commit
89ae7e5fa8
4 files changed
+74
-7
No files matched your search
@@ -507,7 +507,9 @@ func (c *OpenAIClient) doComplete(ctx context.Context, system, user string, temp
|
||||
msg := formatOpenAIHTTPError(res.StatusCode, parsed.Error)
|
||||
httpErr := errors.New(msg)
|
||||
stopWait(httpErr)
|
||||
return Completion{}, true, httpErr
|
||||
// insufficient_quota also arrives as HTTP 429 — do not burn MaxRetries.
|
||||
retryable := res.StatusCode >= 500 || openAIErrorIsRetryableRateLimit(parsed.Error)
|
||||
return Completion{}, retryable, httpErr
|
||||
}
|
||||
if res.StatusCode >= 400 {
|
||||
msg := formatOpenAIHTTPError(res.StatusCode, parsed.Error)
|
||||
|
||||
Reference in new issue
Block a user