test(logging): hand the sync failure path a Langfuse logger through its module global
Some checks failed
Cost map pins recheck / rerun-cost-map-guard (push) Waiting to run
LiteLLM Rust DB / db-queries (push) Waiting to run
LiteLLM Rust / rust-lint (push) Waiting to run
LiteLLM Rust / rust-test (push) Waiting to run
LiteLLM Rust / rust-wheel (push) Waiting to run
Terraform Provider / gofmt, vet, build, test (push) Has been cancelled
Terraform Provider / Provider endpoints vs proxy OpenAPI schema (push) Has been cancelled

This commit is contained in:
yucheng 2026-10-29 22:34:05 -07:00
parent 32a3471529
commit 3ab5c1ecdf

View file

@ -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}")