π OpenHands: AI-Driven Development
Fix: Retry on Bedrock ServiceUnavailableError (#9419)
Peter Hamilton66b95adbc9f9
diff --git a/openhands/llm/llm.py b/openhands/llm/llm.pyindex 787e0431e4..382cfacf42 100644--- a/openhands/llm/llm.py+++ b/openhands/llm/llm.py@@ -19,6 +19,7 @@ from litellm import completion as litellm_completionfrom litellm import completion_cost as litellm_completion_costfrom litellm.exceptions import (RateLimitError,+ ServiceUnavailableError,)from litellm.types.utils import CostPerToken, ModelResponse, Usagefrom litellm.utils import create_pretrained_tokenizer@@ -40,6 +41,7 @@ __all__ = ['LLM']# tuple of exceptions to retry onLLM_RETRY_EXCEPTIONS: tuple[type[Exception], ...] = (RateLimitError,+ ServiceUnavailableError,litellm.Timeout,litellm.InternalServerError,LLMNoResponseError,