From 77265afaa0fc99bf3c3c2de5195222b2d37bd8bf Mon Sep 17 00:00:00 2001 From: Yinghan Ma Date: Fri, 24 Oct 2025 17:10:26 -0700 Subject: [PATCH 1/4] add litellm error to the default retry exceptions --- eval_protocol/pytest/exception_config.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/eval_protocol/pytest/exception_config.py b/eval_protocol/pytest/exception_config.py index 2584aa50..7c965699 100644 --- a/eval_protocol/pytest/exception_config.py +++ b/eval_protocol/pytest/exception_config.py @@ -8,7 +8,7 @@ import backoff - +import litellm import requests import httpx @@ -28,8 +28,14 @@ httpx.TimeoutException, httpx.NetworkError, httpx.RemoteProtocolError, -} + litellm.exceptions.RateLimitError, + litellm.exceptions.InternalServerError, + litellm.exceptions.Timeout, + litellm.exceptions.NotFoundError, + litellm.exceptions.BadRequestError, + litellm.exceptions.ServiceUnavailableError, +} @dataclass class BackoffConfig: From 1de86dbfe25ca842404a3d181318f7e29342b1c0 Mon Sep 17 00:00:00 2001 From: Yinghan Ma Date: Fri, 24 Oct 2025 17:12:22 -0700 Subject: [PATCH 2/4] format --- eval_protocol/pytest/exception_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_protocol/pytest/exception_config.py b/eval_protocol/pytest/exception_config.py index 7c965699..1cc801d3 100644 --- a/eval_protocol/pytest/exception_config.py +++ b/eval_protocol/pytest/exception_config.py @@ -28,7 +28,6 @@ httpx.TimeoutException, httpx.NetworkError, httpx.RemoteProtocolError, - litellm.exceptions.RateLimitError, litellm.exceptions.InternalServerError, litellm.exceptions.Timeout, @@ -37,6 +36,7 @@ litellm.exceptions.ServiceUnavailableError, } + @dataclass class BackoffConfig: """Configuration for backoff behavior.""" From 88a9f88e5213a8ceb8e42069680febcd6f885f51 Mon Sep 17 00:00:00 2001 From: Yinghan Ma Date: Fri, 24 Oct 2025 17:14:54 -0700 Subject: [PATCH 3/4] add --- eval_protocol/pytest/exception_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_protocol/pytest/exception_config.py b/eval_protocol/pytest/exception_config.py index 1cc801d3..29b1f6d2 100644 --- a/eval_protocol/pytest/exception_config.py +++ b/eval_protocol/pytest/exception_config.py @@ -32,7 +32,7 @@ litellm.exceptions.InternalServerError, litellm.exceptions.Timeout, litellm.exceptions.NotFoundError, - litellm.exceptions.BadRequestError, + litellm.exceptions.BadRequestError, # remove this once we have a long term solution litellm.exceptions.ServiceUnavailableError, } From b37ff013ef3ac36e6dd9ace69cb8418de029ac1a Mon Sep 17 00:00:00 2001 From: Yinghan Ma Date: Fri, 24 Oct 2025 17:25:15 -0700 Subject: [PATCH 4/4] format --- eval_protocol/pytest/exception_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_protocol/pytest/exception_config.py b/eval_protocol/pytest/exception_config.py index 29b1f6d2..355e716a 100644 --- a/eval_protocol/pytest/exception_config.py +++ b/eval_protocol/pytest/exception_config.py @@ -32,7 +32,7 @@ litellm.exceptions.InternalServerError, litellm.exceptions.Timeout, litellm.exceptions.NotFoundError, - litellm.exceptions.BadRequestError, # remove this once we have a long term solution + litellm.exceptions.BadRequestError, # remove this once we have a long term solution litellm.exceptions.ServiceUnavailableError, }