From 2f719fec521cd6fb2ab281b17e08b876b0b09acb Mon Sep 17 00:00:00 2001 From: yassin Date: Tue, 15 Sep 2026 20:26:46 +0000 Subject: [PATCH] test(router): run the fallback provider-408 cooldown regression inside an event loop Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../test_litellm/router_utils/test_fallback_event_handlers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_litellm/router_utils/test_fallback_event_handlers.py b/tests/test_litellm/router_utils/test_fallback_event_handlers.py index 15db22dc758..783f8da31e9 100644 --- a/tests/test_litellm/router_utils/test_fallback_event_handlers.py +++ b/tests/test_litellm/router_utils/test_fallback_event_handlers.py @@ -984,7 +984,8 @@ class TestTriggerCooldownForFailedDeployment: mock_set_cooldown.assert_not_called() mock_increment.assert_not_called() - def test_still_cools_down_provider_408_before_caller_deadline(self): + @pytest.mark.asyncio + async def test_still_cools_down_provider_408_before_caller_deadline(self): """client_side_timeout only records that the caller configured a timeout. A 408 that comes back before that deadline was raised by the provider itself, so it is a real health signal and must still cool the deployment down."""