-
Notifications
You must be signed in to change notification settings - Fork 223
feat(api): update API spec from langfuse/langfuse 6379c7c54bd2c19071777b9477878d24d5aa3c22 #1354
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 6379c7c54bd2c19071777b9477878d24d5aa3c22 #1354
Conversation
…77b9477878d24d5aa3c22
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 in visit method - if an unexpected enum value exists, this will return None instead of raising an error
| ) -> 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: Missing fallback case in visit method - if an unexpected enum value exists, this will return None instead of raising an error, potentially causing silent failures
| ) -> 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() | |
| ) -> 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"Unexpected BlobStorageExportMode value: {self}") |
| def visit( | ||
| self, | ||
| hourly: typing.Callable[[], T_Result], | ||
| daily: typing.Callable[[], T_Result], | ||
| weekly: typing.Callable[[], T_Result], | ||
| ) -> 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 doesn't handle cases where the enum value doesn't match any of the expected values, which could lead to None being returned instead of raising an error
| def visit( | |
| self, | |
| hourly: typing.Callable[[], T_Result], | |
| daily: typing.Callable[[], T_Result], | |
| weekly: typing.Callable[[], T_Result], | |
| ) -> T_Result: | |
| if self is BlobStorageExportFrequency.HOURLY: | |
| return hourly() | |
| if self is BlobStorageExportFrequency.DAILY: | |
| return daily() | |
| if self is BlobStorageExportFrequency.WEEKLY: | |
| return weekly() | |
| def visit( | |
| self, | |
| hourly: typing.Callable[[], T_Result], | |
| daily: typing.Callable[[], T_Result], | |
| weekly: typing.Callable[[], T_Result], | |
| ) -> 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 value: {self}") |
Important
This pull request adds functionality for managing blob storage integrations and organization memberships, including new client methods and types, along with updates to API documentation and minor code improvements.
BlobStorageIntegrationsClientandAsyncBlobStorageIntegrationsClientinclient.pyto manage blob storage integrations.get_blob_storage_integrations(),upsert_blob_storage_integration(), anddelete_blob_storage_integration().types/.client.pyfor managing organization memberships:delete_organization_membership()anddelete_project_membership().DeleteMembershipRequestandMembershipDeletionResponsetypes.reference.mdwith new endpoints and usage examples for blob storage integrations and memberships.ingestion/client.py.README.mdandtest_http_client.pyfor clarity and consistency.This description was created by
for bd2d71b. You can customize this summary. It will automatically update as commits are pushed.
Disclaimer: Experimental PR review
Greptile Summary
Updated On: 2025-09-17 16:43:41 UTC
This PR updates the Langfuse Python client with auto-generated API changes from the main Langfuse repository (commit 6379c7c54bd2c19071777b9477878d24d5aa3c22). The changes introduce comprehensive blob storage integration functionality and enhance organization membership management capabilities.
Major additions include:
session_idparameter to the ScoreV2 API for session-specific score filteringThe blob storage integration feature appears designed for enterprise customers who need to export their Langfuse observability data to their own storage systems. The comprehensive type system includes enums for export configurations (
BlobStorageExportMode,BlobStorageExportFrequency), storage providers (BlobStorageIntegrationType), file formats (BlobStorageIntegrationFileType), and corresponding request/response models.All changes follow the established patterns in the codebase for auto-generated API clients, with proper Pydantic models, field aliasing, serialization methods, and error handling. The module structure maintains consistency with existing resource organization, and both synchronous and asynchronous client variants are provided.
This update also includes minor infrastructure changes like import path restructuring (moving core utilities from
langfuse.api.coretolangfuse.core) and documentation URL updates reflecting the shift towards OpenTelemetry as the preferred observability standard.Confidence score: 3/5
blob_storage_integration_file_type.py,blob_storage_export_mode.py,blob_storage_export_frequency.py) and verify core module restructuring doesn't break existing functionalityContext used:
Rule - Open a GitHub issue or discussion first before submitting PRs to explain the rationale and necessity of the proposed changes, as required by the contributing guide. (link)