Skip to content

feat(api): update API spec from langfuse/langfuse d32b852#820

Closed
langfuse-bot wants to merge 1 commit into
mainfrom
api-spec-bot-d32b852
Closed

feat(api): update API spec from langfuse/langfuse d32b852#820
langfuse-bot wants to merge 1 commit into
mainfrom
api-spec-bot-d32b852

Conversation

@langfuse-bot

@langfuse-bot langfuse-bot commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Greptile Summary

This PR adds a new scoresV3 resource to the Langfuse JS SDK, generated from an updated API spec. It introduces a /api/public/v3/scores endpoint with cursor-based pagination and a polymorphic value field that returns different types based on dataType (number for NUMERIC, boolean for BOOLEAN, string for CATEGORICAL/TEXT/CORRECTION).

  • Adds ScoresV3 client class with a getManyV3 method, a full discriminated-union type hierarchy (ScoreV3, ScoreSubjectV3), and all associated request/response types.
  • Wires the new client into LangfuseAPIClient alongside the existing Scores (v2) client, and re-exports all new types from the top-level resources index.

Confidence Score: 5/5

Safe to merge — the change is entirely additive, auto-generated from a versioned API spec, and follows the identical patterns already established by the existing Scores (v2) client.

All new files are auto-generated by Fern and mirror the structure of the existing scores client. The new ScoresV3 client is lazily initialised alongside the v2 client with no shared mutable state, and the discriminated-union type design correctly models the polymorphic value field. No changes are made to existing code paths.

No files require special attention.

Sequence Diagram

sequenceDiagram
    participant Caller
    participant LangfuseAPIClient
    participant ScoresV3
    participant API as Langfuse Server

    Caller->>LangfuseAPIClient: client.scoresV3.getManyV3(request)
    LangfuseAPIClient->>ScoresV3: lazy-init ScoresV3(options)
    ScoresV3->>ScoresV3: build query params (limit, cursor, fields, filters…)
    ScoresV3->>ScoresV3: resolve Authorization header
    ScoresV3->>API: GET /api/public/v3/scores
    API-->>ScoresV3: "GetScoresV3Response { data: ScoreV3[], meta: { limit, cursor? } }"
    Note over ScoresV3: ScoreV3 is discriminated by dataType (NUMERIC→number, BOOLEAN→boolean, else string)
    ScoresV3-->>Caller: "HttpResponsePromise<GetScoresV3Response>"
Loading

Reviews (1): Last reviewed commit: "feat(api): update API spec from langfuse..." | Re-trigger Greptile

@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
langfuse-js Ready Ready Preview Jun 9, 2026 7:33am

Request Review

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

@claude review

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Routine auto-generated Fern API spec update adding ScoresV3 resource — purely additive types/client and follows the established pattern.

Extended reasoning...

Overview

This PR is an auto-generated Fern update that adds a new scoresV3 resource to the API client. It introduces 20 new files under packages/core/src/api/api/resources/scoresV3/ (types and a single GET client method for /api/public/v3/scores) and makes two small additive edits to wire it up: an import + getter in Client.ts and re-exports in resources/index.ts. All new files contain the This file was auto-generated by Fern from our API Definition header.

Security risks

None. The new client uses the same Basic Auth supplier pattern, header merging, and error-handling code paths as every other resource. No new auth surface, no crypto, no permission logic, no user-input parsing — just typed query parameters forwarded to a known endpoint via the existing core.fetcher.

Level of scrutiny

Low. This is a mechanical, additive codegen output following the established Fern pattern. No existing behavior changes, no public API removed, no logic refactored. Recent commits (9f66c31, c34c28b, 3e5a43e) are the same kind of API spec sync.

Other factors

The bug hunting system found no issues. The new client mirrors the surrounding scoresV2/scores resources exactly: identical option/request-option interfaces, identical Authorization header handling, identical status-code-to-error mapping. The discriminated unions for ScoreV3 and ScoreSubjectV3 are straightforward TS pattern. No reviewer comments outstanding.

@wochinge
wochinge deleted the api-spec-bot-d32b852 branch June 11, 2026 13:09
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.

1 participant