fix(relay): skip retries for bad response body errors

This commit is contained in:
Seefs
2026-03-06 18:22:25 +08:00
parent e768ae44e1
commit 3cb0ca264f
2 changed files with 14 additions and 0 deletions

View File

@@ -341,6 +341,9 @@ func shouldRetry(c *gin.Context, openaiErr *types.NewAPIError, retryTimes int) b
if code < 100 || code > 599 {
return true
}
if operation_setting.IsAlwaysSkipRetryCode(openaiErr.GetErrorCode()) {
return false
}
return operation_setting.ShouldRetryByStatusCode(code)
}