diff --git a/litellm/tests/test_custom_callback_input.py b/litellm/tests/test_custom_callback_input.py index bda876b85..13f1d39aa 100644 --- a/litellm/tests/test_custom_callback_input.py +++ b/litellm/tests/test_custom_callback_input.py @@ -78,7 +78,9 @@ class CompletionCustomHandler( is LiteLLMCommonStrings.redacted_by_litellm.value ) else: - assert isinstance(metadata_value["raw_request"], str) + assert "raw_request" not in metadata_value or isinstance( + metadata_value["raw_request"], str + ) except Exception: print(f"Assertion Error: {traceback.format_exc()}") self.errors.append(traceback.format_exc())