From fd0c469a25797f12cfb5d0ffe7cb7ac4554203cf Mon Sep 17 00:00:00 2001 From: jungraekim-gif Date: Mon, 8 Jun 2026 14:18:54 +0800 Subject: [PATCH] test: strengthen assertion to verify num_retries=0 is stamped, not just !=99 Co-Authored-By: Claude Sonnet 4.6 --- tests/test_litellm/test_retry_count_in_exception_messages.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_litellm/test_retry_count_in_exception_messages.py b/tests/test_litellm/test_retry_count_in_exception_messages.py index fac509f9515..4a51f7ed45c 100644 --- a/tests/test_litellm/test_retry_count_in_exception_messages.py +++ b/tests/test_litellm/test_retry_count_in_exception_messages.py @@ -178,8 +178,9 @@ async def test_decorator_does_not_inject_global_num_retries_for_router_calls(): ) raised = exc_info.value - assert raised.num_retries != 99, ( - "Decorator injected litellm.num_retries=99 into a router-managed exception. " + assert raised.num_retries == 0, ( + f"Expected num_retries=0 (router stamped actual count), " + f"got {raised.num_retries}. " "Router calls should not be polluted by the global litellm.num_retries value." ) finally: