on main help sign in
chore: comment
685c81bCarlos Alexandro Becker
internal/llm/provider/anthropic.go+1
@@ -507,6 +507,7 @@ func (a *anthropicClient) shouldRetry(attempts int, err error) (bool, int64, err
507 }
507 }
508
508
509 isOverloaded := strings.Contains(apiErr.Error(), "overloaded") || strings.Contains(apiErr.Error(), "rate limit exceeded")
509 isOverloaded := strings.Contains(apiErr.Error(), "overloaded") || strings.Contains(apiErr.Error(), "rate limit exceeded")
510+ // 529 (unofficial): The service is overloaded
510 if apiErr.StatusCode != http.StatusTooManyRequests && apiErr.StatusCode != 529 && !isOverloaded {
511 if apiErr.StatusCode != http.StatusTooManyRequests && apiErr.StatusCode != 529 && !isOverloaded {
511 return false, 0, err
512 return false, 0, err
512 }
513 }