Skip to content

feat(api): update API spec from langfuse/langfuse 811f641#860

Merged
wochinge merged 1 commit into
mainfrom
api-spec-bot-811f641
Jul 7, 2026
Merged

feat(api): update API spec from langfuse/langfuse 811f641#860
wochinge merged 1 commit into
mainfrom
api-spec-bot-811f641

Conversation

@langfuse-bot

@langfuse-bot langfuse-bot commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Greptile Summary

This is an automated API spec sync from langfuse/langfuse commit 811f641, generated by Fern. It introduces two new top-level resource groups and a new response-only type.

  • experiments resource: Adds Experiments.list and Experiments.listItems client methods with cursor-based pagination, along with all supporting request/response types (Experiment, ExperimentItem, ExperimentsResponse, ExperimentItemsResponse, ExperimentsResponseMeta).
  • unstable/dashboardWidgets resource: Adds DashboardWidgets.create for programmatically creating reusable dashboard widgets, plus a full set of widget-config types (DashboardWidgetView, DashboardWidgetChartType, DashboardWidgetMetricAggregation, etc.).
  • BlobStorageIntegrationFileTypeResponse: A new response-only variant of the blob storage file-type enum that includes PARQUET (which the request type intentionally omits).

Confidence Score: 3/5

The experiments and blob-storage changes are straightforward and safe, but the DashboardWidgets.create error handler contains duplicate switch case labels that TypeScript rejects at compile time, blocking the build.

The DashboardWidgets __create switch block repeats case labels 400, 401, 403, and 405 — the second set is dead code and TypeScript will emit 'Duplicate case label' errors, preventing a clean build for any consumer who includes the unstable.dashboardWidgets surface. All other changed files (experiments client, blob-storage types, index barrels) are clean generated code with no logic issues.

packages/core/src/api/api/resources/unstable/resources/dashboardWidgets/client/Client.ts — the error-handling switch needs the four duplicate case blocks removed.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant Caller
    participant LangfuseAPIClient
    participant Experiments
    participant DashboardWidgets
    participant LangfuseServer

    Note over LangfuseAPIClient: Lazy-initialises sub-clients on first access

    Caller->>LangfuseAPIClient: .experiments.list(request)
    LangfuseAPIClient->>Experiments: list(request)
    Experiments->>LangfuseServer: GET /api/public/experiments
    LangfuseServer-->>Experiments: ExperimentsResponse
    Experiments-->>Caller: "HttpResponsePromise<ExperimentsResponse>"

    Caller->>LangfuseAPIClient: .experiments.listItems(request)
    LangfuseAPIClient->>Experiments: listItems(request)
    Experiments->>LangfuseServer: GET /api/public/experiment-items
    LangfuseServer-->>Experiments: ExperimentItemsResponse
    Experiments-->>Caller: "HttpResponsePromise<ExperimentItemsResponse>"

    Caller->>LangfuseAPIClient: .unstable.dashboardWidgets.create(request)
    LangfuseAPIClient->>DashboardWidgets: create(request)
    DashboardWidgets->>LangfuseServer: POST /api/public/unstable/dashboard-widgets
    LangfuseServer-->>DashboardWidgets: DashboardWidget
    DashboardWidgets-->>Caller: "HttpResponsePromise<DashboardWidget>"
Loading
%%{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 Caller
    participant LangfuseAPIClient
    participant Experiments
    participant DashboardWidgets
    participant LangfuseServer

    Note over LangfuseAPIClient: Lazy-initialises sub-clients on first access

    Caller->>LangfuseAPIClient: .experiments.list(request)
    LangfuseAPIClient->>Experiments: list(request)
    Experiments->>LangfuseServer: GET /api/public/experiments
    LangfuseServer-->>Experiments: ExperimentsResponse
    Experiments-->>Caller: "HttpResponsePromise<ExperimentsResponse>"

    Caller->>LangfuseAPIClient: .experiments.listItems(request)
    LangfuseAPIClient->>Experiments: listItems(request)
    Experiments->>LangfuseServer: GET /api/public/experiment-items
    LangfuseServer-->>Experiments: ExperimentItemsResponse
    Experiments-->>Caller: "HttpResponsePromise<ExperimentItemsResponse>"

    Caller->>LangfuseAPIClient: .unstable.dashboardWidgets.create(request)
    LangfuseAPIClient->>DashboardWidgets: create(request)
    DashboardWidgets->>LangfuseServer: POST /api/public/unstable/dashboard-widgets
    LangfuseServer-->>DashboardWidgets: DashboardWidget
    DashboardWidgets-->>Caller: "HttpResponsePromise<DashboardWidget>"
Loading
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
packages/core/src/api/api/resources/unstable/resources/dashboardWidgets/client/Client.ts:1028-1052
**Duplicate switch case labels — dead code and likely a compile error**

The `switch` block on `_response.error.statusCode` already handles cases `400`, `401`, `403`, and `405` earlier (lines 998–1022 with the `unstable.*` errors). The second set of identical cases here (400, 401, 403, 405) is entirely unreachable, and TypeScript raises `error TS2406: Duplicate case label` for each one, which will cause the build to fail. The `case 404` (line 1048) is the only one here that is not duplicated and would be reachable. The four duplicate throws for `LangfuseAPI.Error`, `LangfuseAPI.UnauthorizedError`, `LangfuseAPI.AccessDeniedError`, and `LangfuseAPI.MethodNotAllowedError` should be removed; only `case 404` needs to be kept.

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

@langfuse-bot langfuse-bot requested a review from wochinge July 7, 2026 08:38
@vercel

vercel Bot commented Jul 7, 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 Jul 7, 2026 8:39am

Request Review

@github-actions

github-actions Bot commented Jul 7, 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.

Auto-generated Fern SDK update from API spec — routine additions and a response-type refinement, following established patterns.

Extended reasoning...

Overview

This PR is an auto-generated Fern SDK update from the upstream langfuse/langfuse API definition (commit 811f641). Every file carries the This file was auto-generated by Fern from our API Definition header. Changes: adds a new top-level experiments client with list and listItems endpoints; adds a new unstable.dashboardWidgets client with a create endpoint; introduces a new BlobStorageIntegrationFileTypeResponse enum (with PARQUET support on responses) and switches BlobStorageIntegrationResponse.fileType to reference it; and wires everything through the resource index barrels and the top-level LangfuseAPIClient.

Security risks

None. This is generated client-side type/request wiring for public API endpoints — no auth logic, crypto, permission handling, or user input parsing changes. The new endpoints use the same _getAuthorizationHeader pattern as every other generated resource client in this SDK.

Level of scrutiny

Low. Auto-generated code follows a deterministic, well-established pattern; the diff is structurally identical to prior Fern-generated SDK updates in this repo (compare recent commits like 1080e51 and 0c8120e). The bug hunter found nothing, and the changes are additive except for the fileType field-type swap, which is a widening (adds PARQUET as a valid response value) and is consistent with the accompanying type-doc comment.

Other factors

Bug hunter returned no findings. The auto-generation pipeline is authoritative for these files, so hand-editing would just be reverted on the next sync. Vercel preview is building. Safe to shadow-approve.

@wochinge wochinge merged commit 9e821d2 into main Jul 7, 2026
16 checks passed
@wochinge wochinge deleted the api-spec-bot-811f641 branch July 7, 2026 09:05
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.

2 participants