Skip to content

feat(api): update API spec from langfuse/langfuse 7c46d98#1744

Open
langfuse-bot wants to merge 1 commit into
mainfrom
api-spec-bot-7c46d98
Open

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

Conversation

@langfuse-bot

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

Copy link
Copy Markdown
Collaborator

Greptile Summary

This auto-generated PR (from the Fern API spec at langfuse/langfuse@7c46d98) promotes PARQUET from a response-only file type to a fully supported request file type for blob storage integrations, and updates the docstrings accordingly.

  • BlobStorageIntegrationFileType gains the PARQUET enum member and a new required parquet callback in visit(), along with a docstring describing Parquet-specific constraints (no gzip, missing price columns in observation exports).
  • BlobStorageIntegrationFileTypeResponse has its docstring simplified — the previous caveat that PARQUET could not be set via the API is removed, since it is now settable on the request side.

Confidence Score: 4/5

Safe to merge for the API spec sync itself; callers using BlobStorageIntegrationFileType.visit() must add the new parquet argument before upgrading.

Adding parquet as a required parameter to BlobStorageIntegrationFileType.visit() is a breaking change for any existing caller of that method, since PARQUET was not previously a member of that enum. All call sites that pass only json, csv, and jsonl will raise a TypeError at runtime without a corresponding code update. The BlobStorageIntegrationFileTypeResponse change is documentation-only and carries no risk.

langfuse/api/blob_storage_integrations/types/blob_storage_integration_file_type.py — the new required parquet parameter in visit() will break existing callers.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["visit called with json, csv, jsonl, parquet callbacks"] --> B{self is JSON?}
    B -->|Yes| C["return json()"]
    B -->|No| D{self is CSV?}
    D -->|Yes| E["return csv()"]
    D -->|No| F{self is JSONL?}
    F -->|Yes| G["return jsonl()"]
    F -->|No| H{self is PARQUET?}
    H -->|Yes| I["return parquet()"]
    H -->|No| J["implicit return None - no fallback raise"]
    style J fill:#ffcccc
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
    A["visit called with json, csv, jsonl, parquet callbacks"] --> B{self is JSON?}
    B -->|Yes| C["return json()"]
    B -->|No| D{self is CSV?}
    D -->|Yes| E["return csv()"]
    D -->|No| F{self is JSONL?}
    F -->|Yes| G["return jsonl()"]
    F -->|No| H{self is PARQUET?}
    H -->|Yes| I["return parquet()"]
    H -->|No| J["implicit return None - no fallback raise"]
    style J fill:#ffcccc
Loading
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
langfuse/api/blob_storage_integrations/types/blob_storage_integration_file_type.py:20-34
**Breaking change: `parquet` is now a required parameter in `visit()`**

Adding `parquet` as a required positional argument means any existing caller of `BlobStorageIntegrationFileType.visit()` that passes only `json`, `csv`, and `jsonl` will now raise a `TypeError` at runtime. Since `PARQUET` did not previously exist in this enum (only in `BlobStorageIntegrationFileTypeResponse`), all current callers of this method will be broken by this change without a corresponding update on their side.

### Issue 2 of 2
langfuse/api/blob_storage_integrations/types/blob_storage_integration_file_type.py:26-34
**`visit()` returns `None` implicitly when no branch matches**

The method has no final `else`/`raise` clause. If `self` ever holds a value not covered by the `if` checks — e.g. a future enum member added to the spec before the `visit` signature is updated — the function falls through and implicitly returns `None`, silently violating the `T_Result` return type. Adding `raise ValueError(f"Unknown BlobStorageIntegrationFileType: {self}")` as a trailing guard would surface this immediately instead of propagating a `None` into caller logic.

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

Greptile also left 2 inline comments on this PR.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

@claude review

Comment on lines 20 to +34
def visit(
self,
json: typing.Callable[[], T_Result],
csv: typing.Callable[[], T_Result],
jsonl: typing.Callable[[], T_Result],
parquet: typing.Callable[[], T_Result],
) -> T_Result:
if self is BlobStorageIntegrationFileType.JSON:
return json()
if self is BlobStorageIntegrationFileType.CSV:
return csv()
if self is BlobStorageIntegrationFileType.JSONL:
return jsonl()
if self is BlobStorageIntegrationFileType.PARQUET:
return parquet()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Breaking change: parquet is now a required parameter in visit()

Adding parquet as a required positional argument means any existing caller of BlobStorageIntegrationFileType.visit() that passes only json, csv, and jsonl will now raise a TypeError at runtime. Since PARQUET did not previously exist in this enum (only in BlobStorageIntegrationFileTypeResponse), all current callers of this method will be broken by this change without a corresponding update on their side.

Prompt To Fix With AI
This is a comment left during a code review.
Path: langfuse/api/blob_storage_integrations/types/blob_storage_integration_file_type.py
Line: 20-34

Comment:
**Breaking change: `parquet` is now a required parameter in `visit()`**

Adding `parquet` as a required positional argument means any existing caller of `BlobStorageIntegrationFileType.visit()` that passes only `json`, `csv`, and `jsonl` will now raise a `TypeError` at runtime. Since `PARQUET` did not previously exist in this enum (only in `BlobStorageIntegrationFileTypeResponse`), all current callers of this method will be broken by this change without a corresponding update on their side.

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines 26 to +34
) -> T_Result:
if self is BlobStorageIntegrationFileType.JSON:
return json()
if self is BlobStorageIntegrationFileType.CSV:
return csv()
if self is BlobStorageIntegrationFileType.JSONL:
return jsonl()
if self is BlobStorageIntegrationFileType.PARQUET:
return parquet()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 visit() returns None implicitly when no branch matches

The method has no final else/raise clause. If self ever holds a value not covered by the if checks — e.g. a future enum member added to the spec before the visit signature is updated — the function falls through and implicitly returns None, silently violating the T_Result return type. Adding raise ValueError(f"Unknown BlobStorageIntegrationFileType: {self}") as a trailing guard would surface this immediately instead of propagating a None into caller logic.

Prompt To Fix With AI
This is a comment left during a code review.
Path: langfuse/api/blob_storage_integrations/types/blob_storage_integration_file_type.py
Line: 26-34

Comment:
**`visit()` returns `None` implicitly when no branch matches**

The method has no final `else`/`raise` clause. If `self` ever holds a value not covered by the `if` checks — e.g. a future enum member added to the spec before the `visit` signature is updated — the function falls through and implicitly returns `None`, silently violating the `T_Result` return type. Adding `raise ValueError(f"Unknown BlobStorageIntegrationFileType: {self}")` as a trailing guard would surface this immediately instead of propagating a `None` into caller logic.

How can I resolve this? If you propose a fix, please make it concise.

@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 API spec update adding PARQUET to the request-side file type enum.

Extended reasoning...

Overview

This PR is an auto-generated API client update from the langfuse/langfuse OpenAPI spec (commit 7c46d98). It adds PARQUET as a new variant to BlobStorageIntegrationFileType (the request-side enum), including a corresponding parquet callback in the visit() method, and updates docstrings on both request- and response-side enums to reflect that PARQUET is now settable via the API.

Security risks

None. These are pure enum additions in auto-generated client type files with no logic changes, no auth, and no network handling.

Level of scrutiny

Low. The files carry the # This file was auto-generated by Fern from our API Definition. header, and the changes are mechanical: one new enum member and one new visitor callback parameter, mirrored across the two files consistently. This aligns with prior auto-gen update PRs in the repo history.

Other factors

The visit() signature gains a required parquet callback, which is technically a breaking change for any external caller directly invoking visit() — but this is standard for Fern-generated visitors on enum additions and is the intended pattern. No caller in this repo uses visit() on these types.

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