From 9365343e4f1c16e695029026ff7a97ba6320d73f Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Wed, 24 Sep 2025 14:29:08 -0300 Subject: [PATCH] refactor: use http.Status... consts Signed-off-by: Carlos Alexandro Becker --- internal/llm/provider/anthropic.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/llm/provider/anthropic.go b/internal/llm/provider/anthropic.go index cfe8f6210fce8ad75eb930374a618e32ac1e2a03..11c131c6cbc0919e9847c1820740b81cccf7f781 100644 --- a/internal/llm/provider/anthropic.go +++ b/internal/llm/provider/anthropic.go @@ -507,7 +507,7 @@ func (a *anthropicClient) shouldRetry(attempts int, err error) (bool, int64, err } isOverloaded := strings.Contains(apiErr.Error(), "overloaded") || strings.Contains(apiErr.Error(), "rate limit exceeded") - if apiErr.StatusCode != 429 && apiErr.StatusCode != 529 && !isOverloaded { + if apiErr.StatusCode != http.StatusTooManyRequests && apiErr.StatusCode != 529 && !isOverloaded { return false, 0, err }