Skip to content

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

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

feat(api): update API spec from langfuse/langfuse 811f641#1738
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 auto-generated PR (via Fern from langfuse/langfuse 811f641) that adds two new API surface areas: a stable experiments client with list and list_items methods, and an unstable dashboard_widgets client with create and delete operations. It also adds the BlobStorageIntegrationFileTypeResponse enum (adding PARQUET to the response type) and updates the export_start_date docstring with a timezone tolerance note.

  • New langfuse/api/experiments/ module exposes paginated listing of experiments and their items, each with optional field groups (core, metadata, scores, io, etc.).
  • New langfuse/api/unstable/dashboard_widgets/ module enables programmatic creation and deletion of reusable dashboard widgets (observations, scores-numeric, scores-categorical views only).
  • BlobStorageIntegrationFileTypeResponse is split out from BlobStorageIntegrationFileType to include PARQUET as a read-only response value.

Confidence Score: 4/5

Safe to merge — all changes are auto-generated from the API spec and follow well-established patterns in this codebase.

The only finding is inline imports inside property methods in client.py and unstable/client.py, which violates the project's import-placement rule. This pattern is already pervasive throughout the existing file and is generated automatically by Fern; it's a style issue rather than a functional defect. The new type definitions, client methods, and exports are structurally correct.

langfuse/api/client.py and langfuse/api/unstable/client.py contain inline imports in the new property methods that should ideally live at module top.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    LangfuseAPI --> ExperimentsClient
    LangfuseAPI --> BlobStorageIntegrationsClient
    LangfuseAPI --> UnstableClient

    ExperimentsClient --> RawExperimentsClient
    ExperimentsClient -->|list| ExperimentsResponse
    ExperimentsClient -->|list_items| ExperimentItemsResponse

    ExperimentsResponse --> Experiment
    ExperimentItemsResponse --> ExperimentItem
    Experiment --> ScoreV3
    ExperimentItem --> ScoreV3

    UnstableClient --> DashboardWidgetsClient
    DashboardWidgetsClient --> RawDashboardWidgetsClient
    DashboardWidgetsClient -->|create| DashboardWidget
    DashboardWidgetsClient -->|delete| void["(void)"]

    DashboardWidget --> DashboardWidgetChartConfig
    DashboardWidget --> DashboardWidgetChartType
    DashboardWidget --> DashboardWidgetView

    BlobStorageIntegrationsClient -->|update| BlobStorageIntegrationResponse
    BlobStorageIntegrationResponse --> BlobStorageIntegrationFileTypeResponse
    BlobStorageIntegrationFileTypeResponse -->|new| PARQUET["PARQUET (read-only)"]
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"}}}%%
flowchart TD
    LangfuseAPI --> ExperimentsClient
    LangfuseAPI --> BlobStorageIntegrationsClient
    LangfuseAPI --> UnstableClient

    ExperimentsClient --> RawExperimentsClient
    ExperimentsClient -->|list| ExperimentsResponse
    ExperimentsClient -->|list_items| ExperimentItemsResponse

    ExperimentsResponse --> Experiment
    ExperimentItemsResponse --> ExperimentItem
    Experiment --> ScoreV3
    ExperimentItem --> ScoreV3

    UnstableClient --> DashboardWidgetsClient
    DashboardWidgetsClient --> RawDashboardWidgetsClient
    DashboardWidgetsClient -->|create| DashboardWidget
    DashboardWidgetsClient -->|delete| void["(void)"]

    DashboardWidget --> DashboardWidgetChartConfig
    DashboardWidget --> DashboardWidgetChartType
    DashboardWidget --> DashboardWidgetView

    BlobStorageIntegrationsClient -->|update| BlobStorageIntegrationResponse
    BlobStorageIntegrationResponse --> BlobStorageIntegrationFileTypeResponse
    BlobStorageIntegrationFileTypeResponse -->|new| PARQUET["PARQUET (read-only)"]
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
langfuse/api/client.py:213-219
**Inline imports inside property methods**

The new `experiments` property (and the corresponding async version below) places `from .experiments.client import ExperimentsClient` inside the method body rather than at module level. The same pattern appears in the `dashboard_widgets` property in `langfuse/api/unstable/client.py`. This violates the project rule requiring all imports to be declared at the top of the module. The `# noqa: E402` suppressor is a sign the linter is already flagging it; the established `TYPE_CHECKING` guard at the top of the file (line 23 already adds `ExperimentsClient` there) is the right place for the runtime import too.

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
@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.

LGTM, auto-generated Fern API spec update adding experiments/dashboard_widgets modules and blob storage enum extensions.

Extended reasoning...

Overview

This PR is an auto-generated Fern update from the langfuse/langfuse OpenAPI spec (commit 811f641). It adds two new API surfaces (experiments with list/list_items, and unstable.dashboard_widgets with create), introduces a new BlobStorageIntegrationFileTypeResponse enum (adds PARQUET to the read side), adds a RUNNING variant to BlobStorageSyncStatus, and clarifies the exportStartDate docstring. Every file carries the This file was auto-generated by Fern from our API Definition header — there are no hand-written changes.

Security risks

None. The generated clients simply forward parameters to existing HTTP endpoints via the shared httpx_client/RequestOptions plumbing; no auth, crypto, permission, or serialization logic is introduced. New enums add variants rather than reinterpret existing ones.

Level of scrutiny

Low. This is purely additive, auto-generated code following the exact patterns already established across the langfuse/api/ tree (lazy __getattr__ imports, RawClient/AsyncClient pairs, Pydantic UniversalBaseModel types). The one non-additive change — swapping BlobStorageIntegrationFileType for BlobStorageIntegrationFileTypeResponse on the response model — is a widening (adds PARQUET), so existing consumers keep parsing correctly.

Other factors

No bugs were flagged by the bug hunting system, no prior reviewer comments are outstanding, and there is no manual code involved that would warrant deeper review. Standard rubber-stamp for a Fern spec sync.

@wochinge wochinge merged commit 5a32d64 into main Jul 7, 2026
21 checks passed
@wochinge wochinge deleted the api-spec-bot-811f641 branch July 7, 2026 08:47
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