From 5ac705968c842dafb85e2366db90575d135e396d Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 15 Jul 2026 15:16:11 +0000 Subject: [PATCH] test(langfuse): remove remaining v2 SDK usage --- tests/local_testing/test_alangfuse.py | 2 +- tests/old_proxy_tests/tests/test_pass_through_langfuse.py | 3 ++- tests/test_config.py | 7 ++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/local_testing/test_alangfuse.py b/tests/local_testing/test_alangfuse.py index 195119b08ce..f64cbcb649f 100644 --- a/tests/local_testing/test_alangfuse.py +++ b/tests/local_testing/test_alangfuse.py @@ -83,7 +83,7 @@ def search_logs(log_file_path, num_good_logs=1): print(line.strip()) print("\n\n") match = re.search( - r'"POST /api/public/ingestion HTTP/1.1" (\d+) (\d+)', + r'"POST /api/public/otel/v1/traces HTTP/1.1" (\d+) (\d+)', line, ) if match: diff --git a/tests/old_proxy_tests/tests/test_pass_through_langfuse.py b/tests/old_proxy_tests/tests/test_pass_through_langfuse.py index dfc91ee1b10..41624445912 100644 --- a/tests/old_proxy_tests/tests/test_pass_through_langfuse.py +++ b/tests/old_proxy_tests/tests/test_pass_through_langfuse.py @@ -7,7 +7,8 @@ langfuse = Langfuse( ) print("sending langfuse trace request") -trace = langfuse.trace(name="test-trace-litellm-proxy-passthrough") +with langfuse.start_as_current_observation(name="test-trace-litellm-proxy-passthrough"): + pass print("flushing langfuse request") langfuse.flush() diff --git a/tests/test_config.py b/tests/test_config.py index 8ec65341963..8ce050e0ea5 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -110,7 +110,12 @@ async def test_team_logging(): print(f"searching for trace_id={_trace_id} on langfuse") - generations = langfuse_client.get_generations(trace_id=_trace_id).data + trace_id = langfuse_client.create_trace_id(seed=_trace_id) + generations = langfuse_client.api.observations.get_many( + trace_id=trace_id, + type="GENERATION", + parse_io_as_json=True, + ).data # 1 generation with this trace id assert len(generations) == 1