-
Notifications
You must be signed in to change notification settings - Fork 223
feat(api): update API spec from langfuse/langfuse 53726d58bf45034a56231f7aa04e06e660d8d98c #1356
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 53726d58bf45034a56231f7aa04e06e660d8d98c #1356
Conversation
…31f7aa04e06e660d8d98c
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, 2 comments
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Missing fallback case - if self doesn't match any enum value, method returns 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 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: 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.
| ) -> 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}") |
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