feat(api): update API spec from langfuse/langfuse 6379c7c54bd2c19071777b9477878d24d5aa3c22#1354
Closed
langfuse-bot wants to merge 1 commit intomainfrom
Closed
Conversation
…77b9477878d24d5aa3c22
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 in visit method - if an unexpected enum value exists, this will return None instead of raising an error
Comment on lines
+19
to
+25
| ) -> 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() |
Contributor
There was a problem hiding this comment.
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
Suggested change
| ) -> 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}") |
Comment on lines
+14
to
+25
| 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() |
Contributor
There was a problem hiding this comment.
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
Suggested change
| 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}") |
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 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)