feat(api): update API spec from langfuse/langfuse d89dbc1#1703
feat(api): update API spec from langfuse/langfuse d89dbc1#1703langfuse-bot wants to merge 1 commit into
Conversation
|
@claude review |
There was a problem hiding this comment.
LGTM — auto-generated Fern client docstring updates only.
Extended reasoning...
Overview
This PR is an auto-generated API spec sync from the upstream langfuse/langfuse repo. All 10 modified files are Fern-generated client code under langfuse/api/, and every change in the diff is a docstring/comment update — no logic, signatures, request bodies, or response shapes change.
Security risks
None. The diff contains only Python docstrings and an enum class-level docstring; runtime behavior is unchanged. No auth, crypto, network, or input-handling code is touched.
Level of scrutiny
Low. These files carry the # This file was auto-generated by Fern from our API Definition. marker, the PR is part of the routine API-sync workflow, and the diff is purely documentation describing changes already made on the server side (exportFieldGroups now applying to all blob-storage export sources; v2 scores endpoints marked deprecated in favor of v3; v3 scores fields description expanded).
Other factors
The bug hunting system found no issues. The PR description matches the diff exactly. Approving without human review is appropriate.
|
|
||
| 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.
core silently removed from allowed fields values
The previous docstring listed core as an explicit allowed value for the fields parameter ("Allowed: core, details, subject, annotation. Defaults to 'core'"). The new docstring removes core from the allowed list because core fields are now always returned. If the server also starts rejecting fields=core with HTTP 400 (as the new wording "Unknown group names return HTTP 400" implies), any existing caller that explicitly passes fields="core" or fields="core,details" will receive a 400 error without any SDK-level warning. The same change appears in raw_client.py and both classes in scores_v3/raw_client.py.
Prompt To Fix With AI
This is a comment left during a code review.
Path: langfuse/api/scores_v3/client.py
Line: 81
Comment:
**`core` silently removed from allowed `fields` values**
The previous docstring listed `core` as an explicit allowed value for the `fields` parameter ("Allowed: core, details, subject, annotation. Defaults to 'core'"). The new docstring removes `core` from the allowed list because core fields are now always returned. If the server also starts rejecting `fields=core` with HTTP 400 (as the new wording "Unknown group names return HTTP 400" implies), any existing caller that explicitly passes `fields="core"` or `fields="core,details"` will receive a 400 error without any SDK-level warning. The same change appears in `raw_client.py` and both classes in `scores_v3/raw_client.py`.
How can I resolve this? If you propose a fix, please make it concise.
Greptile Summary
This auto-generated PR (from the Fern API spec at langfuse/langfuse
d89dbc1) updates the Python SDK documentation across three areas: blob-storage integrations, scores v2, and scores v3.exportFieldGroupsnow applies toLEGACY_TRACES_OBSERVATIONSin addition to the V2 sources — the old "must be omitted/null or get HTTP 400" restriction is gone; docs and model docstrings are updated consistently across client, raw_client, and type files./api/public/scores): Deprecation notices are added toget_manyandgetin all four client classes, directing users toGET /api/public/v3/scoresinstead./api/public/v3/scores): Endpoint docstrings are enriched with the exact set of always-returned core fields and a per-group field list;coreis removed from thefieldsparameter allowed-values list because it is now unconditionally included.Confidence Score: 4/5
All changes are auto-generated docstring updates with no functional Python logic altered; the main risk is that removing
corefrom the allowedfieldsvalues list signals a server-side breaking change for callers who currently passfields=coreexplicitly.The scores v3 docstring change drops
corefrom the listed allowed values for thefieldsquery parameter, and the same 'Unknown group names return HTTP 400' rule still applies. If the Langfuse v4 server enforces this, any existing SDK user passingfields="core"will receive a 400 error with no SDK-level warning or migration guard. The blob-storage and deprecation notice changes are straightforward and carry no regression risk.langfuse/api/scores_v3/client.py and langfuse/api/scores_v3/raw_client.py — the
fieldsparameter description change warrants a check that the server still gracefully handlescorebeing passed (or that a migration note is communicated to existing users).Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Client calls scores endpoint] --> B{Which version?} B -->|v2 GET /api/public/scores| C[Deprecated - Not available on v4+] C --> D[Redirect to v3] B -->|v3 GET /api/public/v3/scores| E[Always returns core fields] E --> F{fields param provided?} F -->|fields=details| G[+ comment, configId, metadata] F -->|fields=subject| H[+ kind, id, traceId] F -->|fields=annotation| I[+ authorUserId, queueId] F -->|fields=core| J[HTTP 400 - no longer a valid group name] F -->|omitted| K[core fields only] subgraph BlobStorage [Blob Storage exportFieldGroups] L[LEGACY_TRACES_OBSERVATIONS] --> M[exportFieldGroups now accepted] N[OBSERVATIONS_V2] --> O[exportFieldGroups controls columns] P[LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS] --> Q[exportFieldGroups controls both portions] endPrompt To Fix All With AI
Reviews (1): Last reviewed commit: "feat(api): update API spec from langfuse..." | Re-trigger Greptile