feat(api): update API spec from langfuse/langfuse 9a83721 - #1821
Conversation
|
@claude review |
There was a problem hiding this comment.
LGTM — auto-generated API client update mirroring the langfuse/langfuse API spec.
What was reviewed: additive changes only (new optional fields like sessionId on observations, new PricingTierAttributeCondition/PricingTierUsageCondition types replacing the old single PricingTierCondition class), plus docstring/wording updates. Checked that PricingTierCondition remains importable and is now a Union re-export rather than a removed symbol — no breaking import removal. No hand-written logic changed; all edits are in Fern auto-generated client/type files.
Extended reasoning...
Overview
This PR is an auto-generated update of the langfuse/api client package, regenerated from the upstream langfuse/langfuse OpenAPI spec (commit 9a83721). All 26 changed files carry the "This file was auto-generated by Fern from our API Definition" header. Changes are: (1) new optional request/response fields (e.g. sessionId filter on observations.get_many, isRootObservation dimension in metrics/evaluation-rule-filter docs), (2) a new PricingTierAttributeCondition/PricingTierAttributeSource type pair, with PricingTierCondition converted from a single pydantic model into a typing.Union[PricingTierUsageCondition, PricingTierAttributeCondition], and (3) numerous docstring/wording-only updates (deprecation notice removals on scores.get_many/get_by_id, SCIM password field clarification, blob storage export-source defaulting language).
Security risks
None identified. There is no new request-signing, auth, or credential-handling logic — the SCIM password field docstring change actually clarifies that the field is already ignored server-side (no credential is created client-side), which is a documentation fix, not a behavior change in this SDK. All new fields are passthrough optional parameters serialized into request bodies/query params using the same existing patterns as sibling fields.
Level of scrutiny
Low-to-medium. This is generated code mirroring an already-reviewed upstream API spec change; the correct scrutiny here is confirming the generation is mechanically consistent (imports wired up, __all__/_dynamic_imports updated, no accidental breaking removals) rather than reviewing business logic, since there is none in this diff. The one structurally interesting change — splitting PricingTierCondition into a discriminated union of two new types — was checked: the symbol is still exported under the same name and both new types are registered in every relevant __init__.py/_dynamic_imports table, so existing consumers importing PricingTierCondition won't break at import time (a static-typing narrowing from concrete class to Union is possible for callers doing isinstance checks, but the frozen pydantic model shape didn't change for the usage-condition path — it was just renamed to PricingTierUsageCondition).
Other factors
The bug-hunting pass found no issues, and the one candidate (a non-ASCII em-dash in a docstring) is a cosmetic typographic nit, not a functional bug. This class of PR (spec-driven client regeneration) recurs frequently in this repo's history and follows an established, low-risk pattern.
Greptile Summary
The PR regenerates the API client from a newer Langfuse specification, adding observation session filtering and attribute-based pricing-tier conditions while updating generated API documentation.
sessionIdfiltering to synchronous and asynchronous observation clients.Confidence Score: 4/5
The PR should not merge until compatibility is preserved for callers that instantiate the publicly exported PricingTierCondition model.
The regenerated pricing API leaves the existing symbol importable but changes it from a Pydantic class into a non-callable union, causing upgraded applications using its prior constructor to fail at runtime.
Files Needing Attention: langfuse/api/commons/types/pricing_tier_condition.py
Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "feat(api): update API spec from langfuse..." | Re-trigger Greptile
Context used: