From 3ab5c1ecdff7f6f9c288963c0c87329ccb1fac05 Mon Sep 17 00:00:00 2001 From: yucheng Date: Thu, 29 Oct 2026 22:34:05 -0700 Subject: [PATCH] test(logging): hand the sync failure path a Langfuse logger through its module global --- tests/unit/litellm_core_utils/test_litellm_logging.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/unit/litellm_core_utils/test_litellm_logging.py b/tests/unit/litellm_core_utils/test_litellm_logging.py index 13eba882131..856ed8c30e3 100644 --- a/tests/unit/litellm_core_utils/test_litellm_logging.py +++ b/tests/unit/litellm_core_utils/test_litellm_logging.py @@ -11793,9 +11793,7 @@ def test_sync_failure_hands_callbacks_and_langfuse_the_scrubbed_error(monkeypatc langfuse: Final = MagicMock() monkeypatch.setattr(litellm, "turn_off_message_logging", True) monkeypatch.setattr(litellm, "failure_callback", [capture, "langfuse"]) - monkeypatch.setattr( - litellm_logging.LangFuseHandler, "get_langfuse_logger_for_request", MagicMock(return_value=langfuse) - ) + monkeypatch.setattr(litellm_logging, "langFuseLogger", langfuse) _prompt_failure_logging_obj().failure_handler(_prompt_echo_error(), f"Traceback: {SCRUB_PROMPT}")