From e4932a453953340e9df7b839ea20a9eff28429b5 Mon Sep 17 00:00:00 2001 From: Kerry Lu Date: Wed, 28 Oct 2026 18:35:54 -0700 Subject: [PATCH] test(router): set string fallback targets after Router init in the sdk cooldown cases (#48954) Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../sdk/test_router_cooldown_fallback_sdk.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/integration/sdk/test_router_cooldown_fallback_sdk.py b/tests/integration/sdk/test_router_cooldown_fallback_sdk.py index e7508a2670e..0a5bfd339fc 100644 --- a/tests/integration/sdk/test_router_cooldown_fallback_sdk.py +++ b/tests/integration/sdk/test_router_cooldown_fallback_sdk.py @@ -122,12 +122,12 @@ async def test_cooldown_skips_only_the_failed_duplicate_model_deployment() -> No @pytest.mark.parametrize( - "router_kwargs", - [{"fallbacks": [{"primary": "backup"}]}, {"default_fallbacks": "backup"}], - ids=["string_fallback_target", "string_default_fallbacks"], + "fallbacks", + [[{"primary": "backup"}], [{"*": "backup"}]], + ids=["string_fallback_target", "string_catch_all_target"], ) @pytest.mark.asyncio -async def test_string_valued_fallbacks_still_cool_down_the_failing_primary(router_kwargs: dict[str, object]) -> None: +async def test_string_valued_fallbacks_still_cool_down_the_failing_primary(fallbacks: list[dict[str, object]]) -> None: with wire_server(_peer) as wire: router: Final = Router( model_list=[ @@ -136,8 +136,8 @@ async def test_string_valued_fallbacks_still_cool_down_the_failing_primary(route ], allowed_fails=0, num_retries=0, - **router_kwargs, ) + router.fallbacks = fallbacks with pytest.raises(litellm.AuthenticationError): await router.acompletion( model="primary",