feat(api): update API spec from langfuse/langfuse 8cdf8a4#1720
Merged
Conversation
|
@claude review |
This comment has been minimized.
This comment has been minimized.
wochinge
approved these changes
Jun 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Greptile Summary
This auto-generated API spec sync adds media reference support for dataset items and makes
trace_idoptional on the media upload URL endpoint to support dataset item media uploads alongside trace/observation uploads.DatasetItemMediaReference,DatasetItemMediaReferenceField, andDatasetItemMediaReferenceMediaare introduced;DatasetItemgains a requiredmedia_referencesfield pointing to resolved media records found ininput,expectedOutput, andmetadata.get_upload_urlsignature change:trace_idbecomes optional and two new optional params (dataset_id,dataset_item_id) are added, allowing callers to associate media with a dataset item instead of a trace.listandgetendpoints now recommend the v2 observations endpoint for new data-extraction workflows.Confidence Score: 3/5
The media upload signature change and new types are safe, but the required
media_referencesfield onDatasetItemwill break deserialization for any user whose server has not yet been updated to returnmediaReferences.The core concern is
media_referencesbeing a required field with no default inDatasetItem. Any SDK user who upgrades the Python client before upgrading their server will get a PydanticValidationErroron everyDatasetItemresponse, effectively making the SDK unusable for dataset operations. Theget_upload_urlsignature change is cleanly backward-compatible, and the new type files are well-structured.langfuse/api/commons/types/dataset_item.py — the required
media_referencesfield warrants a second look to confirm the server guarantees this field in all responses before this SDK version ships.Sequence Diagram
%%{init: {'theme': 'neutral'}}%% sequenceDiagram participant Client as Python SDK Client participant Server as Langfuse Server Note over Client,Server: Dataset Item Media Upload (new path) Client->>Server: POST /api/public/media (datasetId, datasetItemId, field, contentType, ...) Server-->>Client: GetMediaUploadUrlResponse (presigned URL) Client->>Server: PUT presigned URL (media bytes) Note over Client,Server: Fetch Dataset Item with Media References Client->>Server: "GET /api/public/dataset-items/{id}" Server-->>Client: "DatasetItem { ..., mediaReferences: [{ field, referenceString, jsonPath, media: { mediaId, url, urlExpiry } }] }" Client->>Client: Parse DatasetItem (media_references now required field)%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% sequenceDiagram participant Client as Python SDK Client participant Server as Langfuse Server Note over Client,Server: Dataset Item Media Upload (new path) Client->>Server: POST /api/public/media (datasetId, datasetItemId, field, contentType, ...) Server-->>Client: GetMediaUploadUrlResponse (presigned URL) Client->>Server: PUT presigned URL (media bytes) Note over Client,Server: Fetch Dataset Item with Media References Client->>Server: "GET /api/public/dataset-items/{id}" Server-->>Client: "DatasetItem { ..., mediaReferences: [{ field, referenceString, jsonPath, media: { mediaId, url, urlExpiry } }] }" Client->>Client: Parse DatasetItem (media_references now required field)Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "feat(api): update API spec from langfuse..." | Re-trigger Greptile