-
Notifications
You must be signed in to change notification settings - Fork 223
feat(api): update API spec from langfuse/langfuse 2c9afcc58b6d445274e852ac83bf0310aff8b25d #1362
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 2c9afcc58b6d445274e852ac83bf0310aff8b25d #1362
Conversation
…852ac83bf0310aff8b25d
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, 5 comments
| ) -> 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.
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 return statement or exception handling. If self doesn't match any of the enum values, the method will implicitly return None, violating the T_Result return type annotation.
| def visit( | ||
| self, | ||
| s_3: typing.Callable[[], T_Result], | ||
| s_3_compatible: typing.Callable[[], T_Result], | ||
| azure_blob_storage: typing.Callable[[], T_Result], | ||
| ) -> 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: The visit method is missing a fallback case - if self doesn't match any of the three enum values, the method will implicitly return None, violating the T_Result return type annotation. Add a final raise ValueError(f'Unknown BlobStorageIntegrationType: {self}') or similar exception handling.
| def visit( | |
| self, | |
| s_3: typing.Callable[[], T_Result], | |
| s_3_compatible: typing.Callable[[], T_Result], | |
| azure_blob_storage: typing.Callable[[], T_Result], | |
| ) -> 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() | |
| def visit( | |
| self, | |
| s_3: typing.Callable[[], T_Result], | |
| s_3_compatible: typing.Callable[[], T_Result], | |
| azure_blob_storage: typing.Callable[[], T_Result], | |
| ) -> 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() | |
| raise ValueError(f"Unknown BlobStorageIntegrationType: {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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: The visit method lacks a default case or explicit error handling. If self doesn't match any of the enum values (which theoretically shouldn't happen), the method will implicitly return None instead of T_Result, violating the type annotation.
| 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: The visit method is missing a return statement or error handling for cases where self doesn't match any of the defined enum values. This could cause the method to return None implicitly, leading to runtime errors.
| from langfuse.core.http_client import get_request_body | ||
| from langfuse.core.request_options import RequestOptions |
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: Import paths changed from langfuse.api.core to langfuse.core but the target modules don't appear to exist in the repository structure. This will cause ImportError at runtime.
| from langfuse.core.http_client import get_request_body | |
| from langfuse.core.request_options import RequestOptions | |
| from langfuse.api.core.http_client import get_request_body | |
| from langfuse.api.core.request_options import RequestOptions |
Important
This PR adds new clients and methods for managing blob storage integrations and organization memberships, updates API documentation, and includes test updates.
BlobStorageIntegrationsClientandAsyncBlobStorageIntegrationsClientinclient.pyfor managing blob storage integrations.get_blob_storage_integrations,upsert_blob_storage_integration, anddelete_blob_storage_integration.types/.delete_organization_membershipanddelete_project_membershipinorganizations/client.py.DeleteMembershipRequestandMembershipDeletionResponsetypes.reference.mdwith new methods and descriptions for blob storage integrations and memberships.ingestion/client.py.README.md.test_http_client.pyandtest_query_encoding.pyfor new functionality.This description was created by
for e04922b. You can customize this summary. It will automatically update as commits are pushed.
Disclaimer: Experimental PR review
Greptile Summary
Updated On: 2025-09-18 09:15:03 UTC
This PR is an auto-generated API specification update from the main Langfuse repository that introduces significant new functionality and makes structural improvements. The changes primarily add blob storage integration capabilities and enhance organization membership management.
Key additions:
The blob storage functionality enables automated data export with flexible scheduling and configuration options. All new models follow established Pydantic patterns with proper field aliasing, serialization methods, and immutable configurations. The changes include both synchronous and asynchronous client implementations, maintaining consistency with the existing codebase architecture.
Additionally, the PR updates test imports to reflect a module restructuring from
langfuse.api.coretolangfuse.core, suggesting a broader reorganization of core utilities.Confidence score: 2/5
blob_storage_export_mode.py,blob_storage_integration_type.py,blob_storage_export_frequency.py,blob_storage_integration_file_type.py) and test files with updated import paths