feat(api): update API spec from langfuse/langfuse 5df5a7cd4871bb38eec85583f5f3dda58ceed8c7#1367
Conversation
…85583f5f3dda58ceed8c7
| 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.
logic: Missing return statement or exception handling for cases where enum value doesn't match any of the defined types
| 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.
logic: Missing fallback return or exception handling. If self doesn't match any of the defined enum values, this method will implicitly return None, violating the return type annotation 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() | |
| ) -> 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}") |
| from langfuse.core.http_client import get_request_body | ||
| from langfuse.core.request_options import RequestOptions |
There was a problem hiding this comment.
logic: Import paths are invalid - 'langfuse.core.http_client' and 'langfuse.core.request_options' do not exist in the repository. Should be 'langfuse.api.core.http_client' and 'langfuse.api.core.request_options'
| 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 |
| 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.
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
| 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}") |
Important
This pull request adds new functionalities for managing blob storage integrations and organization memberships, including new models, clients, and methods, along with updates to API documentation and tests.
BlobStorageIntegrationsClientandAsyncBlobStorageIntegrationsClientinclient.pyfor managing blob storage integrations.BlobStorageIntegrationResponse,CreateBlobStorageIntegrationRequest, and others intypes/.__init__.pyto include new imports for blob storage integration types.delete_organization_membershipanddelete_project_membershipinclient.pyfor managing memberships.DeleteMembershipRequestandMembershipDeletionResponsemodels intypes/.__init__.pyto include new imports for organization membership types.README.mdto reflect changes in API descriptions.test_http_client.pyandtest_query_encoding.pyto reflect changes in core imports.This description was created by
for b907ec8. You can customize this summary. It will automatically update as commits are pushed.
Disclaimer: Experimental PR review
Greptile Summary
Updated On: 2025-09-18 10:35:49 UTC
This is an automated API specification update from the main langfuse repository (commit 5df5a7cd4871bb38eec85583f5f3dda58ceed8c7) that introduces several new features and improvements to the Python SDK:
New Blob Storage Integrations: The most significant addition is comprehensive support for blob storage integrations, allowing users to configure automated data exports to cloud storage services like AWS S3, S3-compatible services, and Azure Blob Storage. This includes 8 new types covering export frequencies (hourly, daily, weekly), modes (full history, from today, from custom date), file types (JSON, CSV, JSONL), and full CRUD operations through a new
BlobStorageIntegrationsClient.Enhanced Organization Management: Added new membership deletion capabilities with
delete_organization_membershipanddelete_project_membershipmethods, completing the CRUD operations for user lifecycle management in organizations and projects.API Migration Guidance: Updated the ingestion endpoints to mark them as legacy and redirect users to the new OpenTelemetry endpoint (
/api/public/otel), part of a broader migration from custom batch ingestion to industry-standard OpenTelemetry.Enhanced Filtering: Added a
session_idparameter to the ScoreV2 API for session-based score filtering, and improved documentation for the trace listfieldsparameter with detailed explanations of field exclusion behavior.Documentation Updates: Minor but important changes including updating "API" to "APIs" in the main README to reflect the multi-API nature of the service, and comprehensive reference documentation updates.
All changes follow the established Fern-generated patterns and maintain consistency with existing code structure, using proper Pydantic models, error handling, and both synchronous and asynchronous client implementations.
Confidence score: 1/5
langfuse.core.*instead oflangfuse.api.core.*)