feat(api): update API spec from langfuse/langfuse 99e2ce9 - #1842
Conversation
|
@claude review |
There was a problem hiding this comment.
Additional findings (outside the current diff — GitHub can't attach inline comments there):
-
🟡
langfuse/_client/client.py— Internal supported SDK methods (get_dataset_run, get_dataset_runs, delete_dataset_run in langfuse/_client/client.py:2513-2589, and BatchEvaluation's trace-listing in langfuse/batch_evaluation.py:1167) callself.api.datasets.get_run/get_runs/delete_runandapi.trace.list, which this diff now decorates with @ typing_extensions.deprecated. sweep:self\.api\.(datasets\.(get_run|get_runs|delete_run)|trace\.list)\(Extended reasoning...
These public Langfuse SDK convenience methods are not themselves being deprecated/removed, but static type checkers that honor PEP 702 (e.g. pyright, which surfaces reportDeprecated hints by default) will now flag these legitimate, still-supported internal call sites as using a deprecated API, misleading maintainers/downstream type-checking users into thinking normal SDK usage (run_experiment, get_dataset_run, batch evaluation trace fetch) relies on removed functionality, when a correct fix would keep the raw v3 client marked deprecated for direct external callers while not surfacing false-positive deprecation diagnostics for the SDK's own maintained wrapper implementations.
Verification: nit. The candidate's facts are correct: the diff adds
@ typing_extensions.deprecated("...", category=None)toDatasetsClient.get_run/get_runs/delete_run(langfuse/api/datasets/client.py:174,223,272 + async variants) andtrace.list(langfuse/api/trace/client.py), and these are called by still-supported internal SDK methods — langfuse/_client/client.py:2528 (self.api.datasets.get_run),…
Greptile Summary
This generated API update marks deprecated v3 API operations and documents their v4 migration paths.
typing-extensionsas a direct dependency to support the decorators.Confidence Score: 5/5
The PR appears safe to merge; no changed-code-triggered correctness or security defects were identified.
The decorators preserve endpoint behavior while adding deprecation metadata, synchronous and asynchronous surfaces remain aligned, and the newly direct typing-extensions dependency supports all added imports.
Reviews (1): Last reviewed commit: "feat(api): update API spec from langfuse..." | Re-trigger Greptile
Context used (5)