-
Notifications
You must be signed in to change notification settings - Fork 223
feat(api): update API spec from langfuse/langfuse 27cfbb14a17f4c444b45b33c5d5bf413ad43aa89 #1364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(api): update API spec from langfuse/langfuse 27cfbb14a17f4c444b45b33c5d5bf413ad43aa89 #1364
Conversation
…5b33c5d5bf413ad43aa89
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
26 files reviewed, 3 comments
| 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() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
| 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}") |
| 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() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| ) -> 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() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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