feat(api): update API spec from langfuse/langfuse cf53f2e#1704
feat(api): update API spec from langfuse/langfuse cf53f2e#1704langfuse-bot wants to merge 1 commit into
Conversation
|
@claude review |
| fields : typing.Optional[str] | ||
| Comma-separated field groups to include. Allowed: core, details, subject, annotation. Defaults to "core". Unknown names return HTTP 400. | ||
| Comma-separated field groups to include in addition to the always-returned core fields. Allowed: details, subject, annotation — see the endpoint description for the fields each group adds. Unknown names return HTTP 400. |
There was a problem hiding this comment.
Removing
core from allowed fields values is a breaking change
The previous spec listed core as an explicitly allowed value: "Allowed: core, details, subject, annotation. Defaults to 'core'." — so users who built integrations passing fields="core" or fields="core,details" explicitly relied on this. The new spec removes core from the allowed list and keeps the rule "Unknown group names return HTTP 400". Any caller on Langfuse v4 that currently passes core in the fields string will receive a 400 error after upgrading. The same change is mirrored in raw_client.py and both async variants.
Prompt To Fix With AI
This is a comment left during a code review.
Path: langfuse/api/scores_v3/client.py
Line: 80-81
Comment:
**Removing `core` from allowed `fields` values is a breaking change**
The previous spec listed `core` as an explicitly allowed value: `"Allowed: core, details, subject, annotation. Defaults to 'core'."` — so users who built integrations passing `fields="core"` or `fields="core,details"` explicitly relied on this. The new spec removes `core` from the allowed list and keeps the rule `"Unknown group names return HTTP 400"`. Any caller on Langfuse v4 that currently passes `core` in the `fields` string will receive a 400 error after upgrading. The same change is mirrored in `raw_client.py` and both async variants.
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
LGTM — docstring-only changes from the API spec sync.
Extended reasoning...
Overview
Auto-generated PR syncing the Python client from Fern API spec cf53f2e. All 13 changed files are under langfuse/api/ (the auto-generated client). The diff is exclusively docstring updates inside auto-generated code: clarifying that exportFieldGroups now applies to all blob storage export sources (not just OBSERVATIONS_V2), adding a 255-char limit note to dataset item id, adding deprecation notices to the v2 /scores endpoints, and expanding the scores_v3 fields parameter description.
Security risks
None. No code paths, signatures, request bodies, or auth handling changed — purely textual updates to docstrings and enum class docstrings. Generated client behavior is byte-identical.
Level of scrutiny
Very low. This is the standard automated Fern regeneration that lands routinely on this repo, and the diff is verifiably docstring-only. No human design judgement is needed.
Other factors
Bug hunting agents reported no findings. Files are auto-generated and marked as such (# This file was auto-generated by Fern from our API Definition.), so direct editing is discouraged anyway — the source of truth is upstream.
Greptile Summary
This is an auto-generated PR syncing the Python SDK's docstrings and type stubs with the upstream Langfuse API spec (commit
cf53f2e). No runtime logic changes: only docstrings, enum descriptions, and parameter annotations are updated.GET /api/public/scoreslist and single-score endpoints are marked deprecated in their docstrings, directing callers toGET /api/public/v3/scores; the endpoints no longer exist on Langfuse v4+.coreis removed from thefieldsparameter's allowed-values list (it is now always returned); onlydetails,subject, andannotationare accepted. Any existing caller that explicitly passescorewill receive HTTP 400 on Langfuse v4.exportFieldGroupsnow applies toLEGACY_TRACES_OBSERVATIONSas well (groups without a counterpart in the legacy model are silently omitted); the previous HTTP 400 rejection for that source has been removed from the spec. Dataset itemiddocumentation adds a 255-character limit.Confidence Score: 3/5
The spec change removing
corefrom the allowedfieldsvalues for scores v3 will cause HTTP 400 responses for any caller that explicitly passes it, but all other changes are documentation-only expansions.Callers that previously relied on
fields=coreas documented will get 400 errors when talking to a Langfuse v4 server after this SDK update ships. All other changes — blob-storage field-group broadening, dataset item length note, and scores v1 deprecation notices — are safe documentation updates with no SDK-level behavior changes.langfuse/api/scores_v3/client.pyandlangfuse/api/scores_v3/raw_client.py— thefieldsparameter description now lists onlydetails, subject, annotationas allowed;coreis silently dropped from the spec and the HTTP 400 rule is still in place.Sequence Diagram
sequenceDiagram participant Client as SDK Client participant API as Langfuse API (v4) Note over Client,API: scores v1 (deprecated – unavailable on v4) Client->>API: GET /api/public/scores API-->>Client: HTTP 404 / not available on v4 Note over Client,API: scores v3 – core always returned Client->>API: "GET /api/public/v3/scores?fields=details,subject" API-->>Client: "{id, projectId, name, value, ... (core always), comment, configId, subject}" Note over Client,API: scores v3 – passing core now rejected Client->>API: "GET /api/public/v3/scores?fields=core" API-->>Client: HTTP 400 (unknown group name) Note over Client,API: blob storage – LEGACY_TRACES_OBSERVATIONS now accepts exportFieldGroups Client->>API: PUT /api/public/blob-storage-integrations API-->>Client: 200 OK (groups without legacy counterpart silently omitted)Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "feat(api): update API spec from langfuse..." | Re-trigger Greptile