Skip to content

Conversation

@langfuse-bot
Copy link
Collaborator

@langfuse-bot langfuse-bot commented Nov 14, 2025

Important

Update API spec to include new score filtering parameters and extend media content types.

  • API Changes:
    • get() and async get() in score_v_2/client.py now support dataset_run_id and trace_id parameters for filtering scores.
  • Enum Updates:
    • Added IMAGE_AVIF, IMAGE_HEIC, AUDIO_OPUS, AUDIO_WEBM, VIDEO_OGG, VIDEO_MPEG, VIDEO_QUICKTIME, VIDEO_X_MSVIDEO, VIDEO_X_MATROSKA, TEXT_MARKDOWN, TEXT_X_PYTHON, APPLICATION_JAVASCRIPT, TEXT_X_TYPESCRIPT, APPLICATION_X_YAML, APPLICATION_OPENXML_SPREADSHEET, APPLICATION_OPENXML_WORD, APPLICATION_OPENXML_PRESENTATION, APPLICATION_RTF, APPLICATION_X_NDJSON, APPLICATION_PARQUET, APPLICATION_GZIP, APPLICATION_X_TAR, APPLICATION_X_7_Z_COMPRESSED to MediaContentType in media_content_type.py.
  • Documentation:
    • Added a table of contents to README.md.

This description was created by Ellipsis for ddf0481. You can customize this summary. It will automatically update as commits are pushed.

Disclaimer: Experimental PR review

Greptile Overview

Greptile Summary

This PR updates the auto-generated API client code from the upstream Langfuse API specification. The changes add two new score filtering capabilities and expand media type support.

  • Added dataset_run_id and trace_id parameters to both sync and async score retrieval methods in client.py:44-45 and client.py:272-273, enabling more granular score filtering
  • Expanded MediaContentType enum with 24 new MIME types including modern image formats (AVIF, HEIC), audio codecs (Opus), video formats, code files (Python, TypeScript, YAML), and document formats (DOCX, XLSX, PPTX, Parquet)
  • Updated API documentation to reflect the new filtering parameters

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • Auto-generated code from Fern API spec follows consistent patterns, all imports are properly placed, new parameters are optional with correct typing, and the visitor pattern is correctly extended for all new media types
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
langfuse/api/resources/score_v_2/client.py 5/5 Added dataset_run_id and trace_id filter parameters to score retrieval methods
langfuse/api/resources/media/types/media_content_type.py 5/5 Expanded media type support with 24 new MIME types including AVIF, HEIC, OPUS, and document formats

Sequence Diagram

sequenceDiagram
    participant Client
    participant ScoreV2Client
    participant API as Langfuse API
    
    Note over Client,API: New filtering capabilities added
    
    Client->>ScoreV2Client: get(dataset_run_id="run123", trace_id="trace456")
    ScoreV2Client->>ScoreV2Client: Add datasetRunId and traceId to params
    ScoreV2Client->>API: GET /api/public/v2/scores?datasetRunId=run123&traceId=trace456
    API-->>ScoreV2Client: GetScoresResponse
    ScoreV2Client-->>Client: Return filtered scores
    
    Note over Client,API: Media type validation expanded
    
    Client->>Client: Upload media with content-type
    Note over Client: Now supports 24 additional MIME types:<br/>image/avif, image/heic, audio/opus,<br/>video/ogg, text/markdown, application/parquet, etc.
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@hassiebp hassiebp merged commit c91f5ae into main Nov 14, 2025
12 checks passed
@hassiebp hassiebp deleted the api-spec-bot-e1f390d branch November 14, 2025 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants