batch_evaluation fails on self-hosted v4 events_only deployments (uses unavailable v3 read endpoints)
@hassiebp is already working on this.
Since Sep 5, 2026.
Assessment
This issue has not been assessed yet.
Description
Environment
- Langfuse server: self-hosted v4 (
docker.io/langfuse/langfuse:4), default write modeevents_only - Python SDK: 4.14.4 (also verified against 4.15.1 source)
What happened
Running batch evaluation against existing traces fails. The runner fetches items via endpoints that are unavailable on v4 events_only deployments:
scope="traces"→client.api.trace.list→GET /api/public/tracesscope="observations"→ legacyobservations_v1→GET /api/public/observations
Both return:
"This endpoint is not available on deployments running in Langfuse v4 events_only mode."
Root cause
BatchEvaluationRunner._fetch_batch_with_retry (langfuse/batch_evaluation.py, line 1139 in v4.14.4) still calls the v3 read APIs. Per the v3→v4 migration guide, reads should go through GET /api/public/v2/observations (client-side grouping by traceId, root observation for trace-level io).
Expected
batch_evaluation works on events_only deployments, e.g. by fetching via the v2 observations API.
Workaround
We currently run our own thin loop: fetch v2 observations grouped by traceId → evaluate → create_score (score-create ingestion works fine on v4).
Happy to contribute a PR if the v2-based approach sounds right — glad to align on the design first.
- Dominant language
- Python
- Stars
- 468
- Forks
- 349
- Avg merge
- 12h 16m
- Merged PRs (30d)
- 27
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from langfuse/langfuse-python
-
feat-scores sdk-python unconfirmed-bug
langfuse/langfuse-python#1890 · 1 assignee ·
-
improvement sdk-python
langfuse/langfuse-python#1856 · 1 assignee ·
-
improvement sdk-python security
langfuse/langfuse-python#1855 · 1 assignee ·
-
billing bug feat-billing feat-llm-cost-tracking integration-openai sdk-python
langfuse/langfuse-python#1834 · 1 comment · 1 assignee ·
-
[Integrations] Language Clients bug sdk-python
langfuse/langfuse-python#1799 · 1 comment · 1 reaction · 1 assignee ·
All issues in langfuse/langfuse-python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main Openarea: ci bug perceived difficulty: 3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ClickHouse/clickhouse-connect#1057 ·