diff --git a/opendevin/llm/llm.py b/opendevin/llm/llm.py index 021bc9c2fdc0..225252588a90 100644 --- a/opendevin/llm/llm.py +++ b/opendevin/llm/llm.py @@ -8,6 +8,7 @@ from litellm import completion_cost as litellm_completion_cost from litellm.exceptions import ( APIConnectionError, + InternalServerError, RateLimitError, ServiceUnavailableError, ) @@ -184,7 +185,12 @@ def attempt_on_error(retry_state): stop=stop_after_attempt(num_retries), wait=wait_random_exponential(min=retry_min_wait, max=retry_max_wait), retry=retry_if_exception_type( - (RateLimitError, APIConnectionError, ServiceUnavailableError) + ( + RateLimitError, + APIConnectionError, + ServiceUnavailableError, + InternalServerError, + ) ), after=attempt_on_error, )