Fix: Retry on Bedrock ServiceUnavailableError (#9419)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Peter Hamilton 2025-06-27 13:17:50 -07:00 committed by GitHub
parent d617d6842a
commit 66b95adbc9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,6 +19,7 @@ from litellm import completion as litellm_completion
from litellm import completion_cost as litellm_completion_cost
from litellm.exceptions import (
RateLimitError,
ServiceUnavailableError,
)
from litellm.types.utils import CostPerToken, ModelResponse, Usage
from litellm.utils import create_pretrained_tokenizer
@ -40,6 +41,7 @@ __all__ = ['LLM']
# tuple of exceptions to retry on
LLM_RETRY_EXCEPTIONS: tuple[type[Exception], ...] = (
RateLimitError,
ServiceUnavailableError,
litellm.Timeout,
litellm.InternalServerError,
LLMNoResponseError,