From 2cd680cba7ccfa31b0dbede5ebe0a104f76e29e7 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 1 Jul 2024 14:12:00 -0300 Subject: [PATCH] Automatically retry on Anthropic overloaded_error --- HISTORY.md | 1 + aider/sendchat.py | 1 + 2 files changed, 2 insertions(+) diff --git a/HISTORY.md b/HISTORY.md index aecc220df..6595d69d3 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -9,6 +9,7 @@ - Enabled [image support](https://aider.chat/docs/images-urls.html) for 3.5 Sonnet and for GPT-4o & 3.5 Sonnet via OpenRouter (by @yamitzky). - Added `--attribute-commit-message` to prefix aider's commit messages with "aider:". - Fixed regression in quality of one-line commit messages. +- Automatically retry on Anthropic `overloaded_error`. - Bumped dependency versions. ### Aider v0.40.6 diff --git a/aider/sendchat.py b/aider/sendchat.py index 8f661f598..78e16ae64 100644 --- a/aider/sendchat.py +++ b/aider/sendchat.py @@ -40,6 +40,7 @@ def should_giveup(e): litellm.exceptions.RateLimitError, litellm.exceptions.ServiceUnavailableError, litellm.exceptions.Timeout, + litellm.llms.anthropic.AnthropicError, ), giveup=should_giveup, max_time=60,