From 8ee51a96f47113befbf349e57d5a43e4f10f438f Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Tue, 30 Apr 2024 16:42:10 -0700 Subject: [PATCH] test(test_router_debug_logs.py): fix retry logic --- litellm/tests/test_router_debug_logs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/litellm/tests/test_router_debug_logs.py b/litellm/tests/test_router_debug_logs.py index 0bc711b157..19a83287fd 100644 --- a/litellm/tests/test_router_debug_logs.py +++ b/litellm/tests/test_router_debug_logs.py @@ -46,6 +46,7 @@ def test_async_fallbacks(caplog): router = Router( model_list=model_list, fallbacks=[{"gpt-3.5-turbo": ["azure/gpt-3.5-turbo"]}], + num_retries=1, ) user_message = "Hello, how are you?" @@ -83,6 +84,7 @@ def test_async_fallbacks(caplog): expected_logs = [ "Intialized router with Routing strategy: simple-shuffle\n\nRouting fallbacks: [{'gpt-3.5-turbo': ['azure/gpt-3.5-turbo']}]\n\nRouting context window fallbacks: None\n\nRouter Redis Caching=None", "litellm.acompletion(model=gpt-3.5-turbo)\x1b[31m Exception OpenAIException - Error code: 401 - {'error': {'message': 'Incorrect API key provided: bad-key. You can find your API key at https://platform.openai.com/account/api-keys.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'}}\x1b[0m", + "litellm.acompletion(model=None)\x1b[31m Exception No deployments available for selected model, passed model=gpt-3.5-turbo\x1b[0m", "Falling back to model_group = azure/gpt-3.5-turbo", "litellm.acompletion(model=azure/chatgpt-v-2)\x1b[32m 200 OK\x1b[0m", ]