From cffd190887302e89f092dff12cc4cdb42ebe998b Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Wed, 13 Dec 2023 19:06:02 -0800 Subject: [PATCH] test(test_custom_callback_router.py): fix test --- litellm/tests/test_custom_callback_router.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/tests/test_custom_callback_router.py b/litellm/tests/test_custom_callback_router.py index 8c31300a1..83fed89de 100644 --- a/litellm/tests/test_custom_callback_router.py +++ b/litellm/tests/test_custom_callback_router.py @@ -214,7 +214,7 @@ class CompletionCustomHandler(CustomLogger): # https://docs.litellm.ai/docs/obse assert isinstance(kwargs['original_response'], (str, litellm.CustomStreamWrapper)) or inspect.isasyncgen(kwargs['original_response']) or inspect.iscoroutine(kwargs['original_response']) assert isinstance(kwargs['additional_args'], (dict, type(None))) assert isinstance(kwargs['log_event_type'], str) - assert isinstance(kwargs["cache_hit"], Optional[bool]) + assert kwargs["cache_hit"] is None or isinstance(kwargs["cache_hit"], bool) ### ROUTER-SPECIFIC KWARGS assert isinstance(kwargs["litellm_params"]["metadata"], dict) assert isinstance(kwargs["litellm_params"]["metadata"]["model_group"], str)