feat(api): update API spec from langfuse/langfuse d32b852#820
feat(api): update API spec from langfuse/langfuse d32b852#820langfuse-bot wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@claude review |
There was a problem hiding this comment.
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.
Greptile Summary
This PR adds a new
scoresV3resource to the Langfuse JS SDK, generated from an updated API spec. It introduces a/api/public/v3/scoresendpoint with cursor-based pagination and a polymorphicvaluefield that returns different types based ondataType(number for NUMERIC, boolean for BOOLEAN, string for CATEGORICAL/TEXT/CORRECTION).ScoresV3client class with agetManyV3method, a full discriminated-union type hierarchy (ScoreV3,ScoreSubjectV3), and all associated request/response types.LangfuseAPIClientalongside the existingScores(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>"Reviews (1): Last reviewed commit: "feat(api): update API spec from langfuse..." | Re-trigger Greptile