fix
This commit is contained in:
@@ -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