feat(api): update API spec from langfuse/langfuse 83d3009331ce11dc5fda825bc4dd5d4ced913a53#1352
Conversation
…a825bc4dd5d4ced913a53
| 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.
logic: Missing fallback case - method could return None if enum has unexpected value, violating return type annotation
| ) -> 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.
logic: Missing fallback case in visit method - if an unexpected enum value exists, this method will return None instead of T_Result, potentially causing runtime errors
| def visit( | ||
| self, | ||
| full_history: typing.Callable[[], T_Result], | ||
| from_today: typing.Callable[[], T_Result], | ||
| from_custom_date: typing.Callable[[], T_Result], | ||
| ) -> T_Result: | ||
| 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.
logic: Missing fallback case in visit method - if self doesn't match any of the enum values, the method will implicitly return None instead of T_Result, violating the return type annotation
| def visit( | |
| self, | |
| full_history: typing.Callable[[], T_Result], | |
| from_today: typing.Callable[[], T_Result], | |
| from_custom_date: typing.Callable[[], T_Result], | |
| ) -> T_Result: | |
| 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() | |
| def visit( | |
| self, | |
| full_history: typing.Callable[[], T_Result], | |
| from_today: typing.Callable[[], T_Result], | |
| from_custom_date: typing.Callable[[], T_Result], | |
| ) -> T_Result: | |
| 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() | |
| raise ValueError(f"Unknown BlobStorageExportMode: {self}") |
| ) -> T_Result: | ||
| if self is BlobStorageExportFrequency.HOURLY: | ||
| return hourly() | ||
| if self is BlobStorageExportFrequency.DAILY: | ||
| return daily() | ||
| if self is BlobStorageExportFrequency.WEEKLY: | ||
| return weekly() |
There was a problem hiding this comment.
logic: Missing fallback case in visit method - if an unexpected enum value exists, this method will implicitly return None instead of T_Result, violating the return type annotation
| ) -> T_Result: | |
| if self is BlobStorageExportFrequency.HOURLY: | |
| return hourly() | |
| if self is BlobStorageExportFrequency.DAILY: | |
| return daily() | |
| if self is BlobStorageExportFrequency.WEEKLY: | |
| return weekly() | |
| ) -> T_Result: | |
| if self is BlobStorageExportFrequency.HOURLY: | |
| return hourly() | |
| if self is BlobStorageExportFrequency.DAILY: | |
| return daily() | |
| if self is BlobStorageExportFrequency.WEEKLY: | |
| return weekly() | |
| raise ValueError(f"Unknown BlobStorageExportFrequency: {self}") |
Important
This PR adds functionality for managing blob storage integrations and organization memberships, including new client methods and types, along with updated API documentation.
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().DeleteMembershipRequestandMembershipDeletionResponsetypes.README.mdto correct a typo.test_http_client.pyandtest_query_encoding.pyfor consistency.This description was created by
for 42c4395. You can customize this summary. It will automatically update as commits are pushed.
Disclaimer: Experimental PR review
Greptile Summary
Updated On: 2025-09-17 15:44:07 UTC
This PR is an automated API specification update from the main Langfuse repository (commit 83d3009331ce11dc5fda825bc4dd5d4ced913a53) that introduces significant new functionality to the Python SDK. The changes are auto-generated by Fern from OpenAPI specifications, ensuring consistency between the backend API and client library.
Key additions include:
Blob Storage Integrations: A complete new API resource supporting S3, S3-compatible, and Azure Blob Storage integrations for automated data exports. This includes:
Organization Membership Management: Enhanced organization administration with new DELETE endpoints for removing memberships at both organization and project levels, including proper request/response types.
Enhanced Score Filtering: Added
session_idparameter to ScoreV2 endpoints, allowing more granular filtering of scores by session.Documentation Updates:
Structural Improvements: Core utilities have been moved from
langfuse.api.core.*tolangfuse.core.*, simplifying the module hierarchy.All changes follow established patterns in the codebase: Pydantic v1 models with proper field aliasing, consistent serialization methods, immutable configuration, and both sync/async client implementations. The auto-generated nature ensures type safety and maintains architectural consistency across the SDK.
Confidence score: 3/5