From 7a8399571acfc590c0112d8ee389bc8cb0b99358 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 8 Nov 2024 10:03:49 -0800 Subject: [PATCH] fix: Handle non-retryable errors by returning None in simple_send_with_retries --- aider/sendchat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/sendchat.py b/aider/sendchat.py index 7414243c2..3d1224bc6 100644 --- a/aider/sendchat.py +++ b/aider/sendchat.py @@ -88,10 +88,10 @@ def simple_send_with_retries(model_name, messages, extra_params=None): should_retry = False if not should_retry: - break + return None print(f"Retrying in {retry_delay:.1f} seconds...") time.sleep(retry_delay) continue except AttributeError: - return + return None