diff --git a/aider/exceptions.py b/aider/exceptions.py index 9df758026..12c257540 100644 --- a/aider/exceptions.py +++ b/aider/exceptions.py @@ -85,6 +85,6 @@ class LiteLLMExceptions: return ExInfo("APIConnectionError", False, "You need to: pip install boto3") if "OpenrouterException" in str(ex) and "'choices'" in str(ex): return ExInfo( - "APIConnectionError", False, "The OpenRouter API provider is down or offline" + "APIConnectionError", True, "The OpenRouter API provider is down or offline" ) return self.exceptions.get(ex.__class__, ExInfo(None, None, None)) diff --git a/tests/basic/test_exceptions.py b/tests/basic/test_exceptions.py index 5e376636a..7a335133d 100644 --- a/tests/basic/test_exceptions.py +++ b/tests/basic/test_exceptions.py @@ -78,5 +78,5 @@ def test_openrouter_error(): ) ex_info = ex.get_ex_info(openrouter_error) - assert ex_info.retry is False + assert ex_info.retry is True assert "OpenRouter API provider is down" in ex_info.description