test(langfuse): isolate the e2e sync test from cached clients and log the real sdk major

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
yucheng 2026-09-14 21:13:50 +00:00
parent 0a4cb508d8
commit b962fa90e2
2 changed files with 7 additions and 2 deletions

View file

@ -625,7 +625,7 @@ class LangFuseLogger:
level: str,
litellm_call_id: str | None,
) -> tuple:
verbose_logger.debug("Langfuse Layer Logging - logging to langfuse v2")
verbose_logger.debug("Langfuse Layer Logging - logging to langfuse via sdk v%s", self.langfuse_sdk_version)
try:
standard_logging_object: Final[StandardLoggingPayload | None] = cast(

View file

@ -318,6 +318,8 @@ def test_langfuse_e2e_sync(monkeypatch):
import litellm
from litellm import completion
from litellm.integrations.langfuse.langfuse import LangFuseLogger
from litellm.integrations.langfuse.langfuse_prompt_management import langfuse_client_init
from litellm.litellm_core_utils import litellm_logging
received_paths = []
@ -338,7 +340,10 @@ def test_langfuse_e2e_sync(monkeypatch):
monkeypatch.setenv("LANGFUSE_PUBLIC_KEY", "pk-e2e-sync")
monkeypatch.setenv("LANGFUSE_SECRET_KEY", "sk-e2e-sync")
monkeypatch.setattr(litellm, "success_callback", ["langfuse"])
monkeypatch.setattr(litellm, "_langfuse_logger_cache", {}, raising=False)
monkeypatch.setattr(litellm_logging, "langFuseLogger", None)
monkeypatch.setattr(litellm_logging, "in_memory_dynamic_logger_cache", DynamicLoggingCache())
monkeypatch.setattr(litellm_logging, "_in_memory_loggers", [])
langfuse_client_init.cache_clear()
try:
completion(