feat(api): update API spec from langfuse/langfuse 53726d58bf45034a56231f7aa04e06e660d8d98c#1356
Closed
langfuse-bot wants to merge 1 commit intomainfrom
Closed
Conversation
…31f7aa04e06e660d8d98c
Comment on lines
+14
to
+25
| 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() |
Contributor
There was a problem hiding this comment.
logic: Missing fallback case - if self doesn't match any enum value, method returns None instead of T_Result, violating the return type annotation
Suggested change
| 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}") |
Comment on lines
+19
to
+25
| ) -> 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() |
Contributor
There was a problem hiding this comment.
logic: Missing default case or exception handling. If a new enum value is added without updating this method, it will return None instead of T_Result, violating the return type annotation.
Suggested change
| ) -> 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() | |
| ) -> 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}") |
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 PR adds new clients and types for managing blob storage integrations and organization memberships, updates API documentation, and modifies test utilities.
BlobStorageIntegrationsClientandAsyncBlobStorageIntegrationsClientinclient.pyfor managing blob storage integrations.types/.delete_organization_membershipanddelete_project_membershipmethods inorganizations/client.py.DeleteMembershipRequestandMembershipDeletionResponsetypes.reference.mdwith new endpoints and usage examples.ingestion/client.py.test_http_client.pyandtest_query_encoding.pyto reflect new core module structure.This description was created by
for fab5e95. You can customize this summary. It will automatically update as commits are pushed.
Disclaimer: Experimental PR review
Greptile Summary
Updated On: 2025-09-17 20:58:57 UTC
This PR is an auto-generated API specification update that adds comprehensive blob storage integration functionality to the Langfuse Python SDK. The update introduces support for managing external blob storage connections (S3, S3-compatible services, Azure Blob Storage) with configurable export settings including frequency (hourly, daily, weekly), modes (full history, from today, from custom date), and file formats (JSON, CSV, JSONL).
The changes follow Langfuse's established patterns for API client generation using Fern. New functionality includes:
session_idfiltering for scores and enhanced field documentation for trace listingslangfuse.api.core.*tolangfuse.core.*for better organizationAll new models follow the codebase's Pydantic patterns with proper field aliasing (snake_case to camelCase), immutable configuration, custom serialization methods, and comprehensive type safety. The changes are additive and maintain backward compatibility while expanding the SDK's capabilities to match the latest backend API specification.
Confidence score: 3/5