diff --git a/aider/sendchat.py b/aider/sendchat.py index 126bb50de..00833a27a 100644 --- a/aider/sendchat.py +++ b/aider/sendchat.py @@ -20,6 +20,13 @@ def should_giveup(e): if not hasattr(e, "status_code"): return False + if type(e) in ( + httpx.ConnectError, + httpx.RemoteProtocolError, + httpx.ReadTimeout, + ): + return False + return not litellm._should_retry(e.status_code)