feat(api): update API spec from langfuse/langfuse 27cfbb14a17f4c444b45b33c5d5bf413ad43aa89#1364
Closed
langfuse-bot wants to merge 1 commit into
Closed
Conversation
…5b33c5d5bf413ad43aa89
Comment on lines
+14
to
+25
| def visit( | ||
| self, | ||
| json: typing.Callable[[], T_Result], | ||
| csv: typing.Callable[[], T_Result], | ||
| jsonl: 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() |
Contributor
There was a problem hiding this comment.
logic: Missing fallback case - if self doesn't match any enum value, this method will implicitly return None instead of T_Result, violating the type contract
Suggested change
| def visit( | |
| self, | |
| json: typing.Callable[[], T_Result], | |
| csv: typing.Callable[[], T_Result], | |
| jsonl: 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() | |
| def visit( | |
| self, | |
| json: typing.Callable[[], T_Result], | |
| csv: typing.Callable[[], T_Result], | |
| jsonl: 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() | |
| raise ValueError(f"Unknown BlobStorageIntegrationFileType: {self}") |
Comment on lines
+20
to
+25
| if self is BlobStorageExportMode.FULL_HISTORY: | ||
| return full_history() | ||
| if self is BlobStorageExportMode.FROM_TODAY: | ||
| return from_today() | ||
| if self is BlobStorageExportMode.FROM_CUSTOM_DATE: | ||
| return from_custom_date() |
Contributor
There was a problem hiding this comment.
logic: The visit method is missing a fallback case. If an unexpected enum value is encountered, the method will implicitly return None, which could cause runtime errors.
Comment on lines
+19
to
+25
| ) -> T_Result: | ||
| if self is BlobStorageIntegrationType.S_3: | ||
| return s_3() | ||
| if self is BlobStorageIntegrationType.S_3_COMPATIBLE: | ||
| return s_3_compatible() | ||
| if self is BlobStorageIntegrationType.AZURE_BLOB_STORAGE: | ||
| return azure_blob_storage() |
Contributor
There was a problem hiding this comment.
logic: Missing fallback case in visit method - if a new enum value is added but not handled, this will return None implicitly, potentially causing runtime errors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
This PR adds functionality for managing blob storage integrations and organization memberships, including new client methods and types, and updates API documentation and tests.
BlobStorageIntegrationsClientandAsyncBlobStorageIntegrationsClientinclient.pyfor managing blob storage integrations.get_blob_storage_integrations(),upsert_blob_storage_integration(), anddelete_blob_storage_integration().types/.OrganizationsClientandAsyncOrganizationsClientfor managing organization memberships.delete_organization_membership()anddelete_project_membership().DeleteMembershipRequestandMembershipDeletionResponseintypes/.reference.mdwith new endpoints and usage examples for blob storage integrations and memberships.README.mdto correct a typo.test_http_client.pyandtest_query_encoding.pyto reflect changes in request handling.This description was created by
for f6d0bc7. You can customize this summary. It will automatically update as commits are pushed.
Disclaimer: Experimental PR review
Greptile Summary
Updated On: 2025-09-18 10:21:28 UTC
This PR implements an automated API specification update from the main Langfuse repository (commit 27cfbb14a17f4c444b45b33c5d5bf413ad43aa89), adding significant new functionality to the Python SDK. The changes introduce blob storage integrations - a new feature that allows users to configure and manage external cloud storage connections (S3, S3-compatible, Azure Blob Storage) for automated data exports with configurable frequencies and file formats. Additionally, the PR enhances organization membership management by adding DELETE endpoints for removing user memberships from organizations and projects.
The implementation follows established patterns throughout the codebase with proper Pydantic models, both synchronous and asynchronous client support, and consistent error handling. The changes include 8 new blob storage integration types (export frequencies, modes, file types, etc.), new request/response models for membership deletion, and enhanced API documentation. The PR also adds session-based filtering to the ScoreV2 endpoint and marks the legacy batch ingestion endpoint as deprecated in favor of OpenTelemetry standards.
Since this is an auto-generated update from the API specification using Fern, all changes maintain consistency with existing code patterns and maintain backward compatibility. The new blob storage integrations feature appears to target enterprise users needing data export capabilities, while the membership management enhancements provide better organizational control features.
Confidence score: 1/5
langfuse/api/tests/utils/test_http_client.pyandlangfuse/api/tests/utils/test_query_encoding.py- these contain imports tolangfuse.core.*modules that don't exist in the repository structure