Repository navigation
Conversation
langfuse.model no longer re-exports DatasetRun, Observation and TraceWithFullDetails, which the regenerated API client removes. The api docstrings point to the v2 observations, scores_v3 and experiments reads instead of trace.get/list and the legacy v1 resources. Two unit tests no longer mock the removed dataset_run_items resource. Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
|
@claude review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Claude Code Review
No review was started: this request came from a bot account. Manual reviews can only be requested by someone with write access to this repository. Ask a maintainer to comment @claude review, or have your automation post the comment from a user account with write access.
Tip: disable this comment in your organization's Code Review settings.
There was a problem hiding this comment.
LGTM, straightforward docstring/import/test cleanup. What was reviewed: the docstring edits in langfuse/_client/client.py (api property and flush()) replacing v1 trace-get/list references with the v2 observations API; the removal of unused DatasetRun, Observation, TraceWithFullDetails re-exports in langfuse/model.py (confirmed no other references to these names remain in langfuse/, tests/, outside the untouched generated langfuse/api/ package); and the two test files dropping now-invalid dataset_run_items.create monkeypatches/assertions, consistent with that call path no longer being exercised.
Extended reasoning...
Diff touches only docstrings, two re-exported type imports, and two unit test monkeypatch removals; no security-sensitive surface (auth, crypto, data exposure) is involved. Verified via grep that the removed names (DatasetRun, Observation, TraceWithFullDetails, dataset_run_items) have no remaining hand-written references outside the generated, untouched langfuse/api package, matching the PR author's stated AST-scan verification. Change is small, mechanical, and self-contained, matching approval criteria.
Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
What does this PR do?
This prepares the SDK for the upcoming API client regeneration, which drops the v4-deprecated read endpoints and their types (langfuse/langfuse#18335). Without this PR, the regenerated client would fail to import.
langfuse/model.py: stops re-exportingDatasetRun,ObservationandTraceWithFullDetails, which the regenerated client removes. An AST scan of every hand-writtenlangfuse.apiimport inlangfuse/,tests/andscripts/, checked against the full list of types #18335 deletes, found no other references.Langfuse.api/flush()docstrings: they no longer point toapi.trace.get/api.trace.list,TraceWithDetails/TraceWithFullDetails, orapi.legacy.observations_v1/metrics_v1. They now describe the v4 read path:api.observations.get_many(v2),api.scores_v3andapi.experiments. They also no longer end on a dangling "retry with a deadline:" with no example.api.dataset_run_items.create. That resource is removed by the regen, sosetattron it would raiseAttributeError, and the runner no longer calls it anyway.langfuse/api/**itself is untouched; the regen replaces it.Breaking for SDK users:
from langfuse.model import DatasetRun, Observation, TraceWithFullDetailsno longer works. These were v3 response types, and v4 has no equivalent endpoints.Type of change
Verification
Checklist
code_review.md..env.templateif needed.The PR appears safe to merge with its stated breaking changes.
What we checked:
get_manyaccepts bothtrace_idandfields, so the documented call matches the generated client.Summary
Prepares handwritten SDK code for the upcoming generated API client update.
langfuse.model.hassiebpexplicitly acknowledges the three removed public imports as an intentional breaking change because their read endpoints are being removed.Reviews (1) · Last reviewed commit: "chore(api): drop references to API types..." · Reviewed by Greptile