-
Notifications
You must be signed in to change notification settings - Fork 223
feat(api): update API spec from langfuse/langfuse 4c5828dadef0b861362eff27a42991a9c236a55c #1363
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 4c5828dadef0b861362eff27a42991a9c236a55c #1363
Conversation
…eff27a42991a9c236a55c
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
| ) -> 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: The visit method doesn't handle the case where self doesn't match any enum value, causing it to implicitly return None instead of T_Result. Add a final else clause or assertion to handle unexpected values.
| ) -> 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: Missing return statement or exception handling - if none of the conditions match, the 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: {self}") |
| from langfuse.core.http_client import get_request_body | ||
| from langfuse.core.request_options import RequestOptions |
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: Import paths changed from 'langfuse.api.core' to 'langfuse.core', but based on the repository structure, these modules still exist under 'langfuse/api/core/'. This will cause ImportError when tests run.
| 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 |
Important
Add blob storage integration management to Langfuse API, including new clients, methods, and types for handling integrations.
BlobStorageIntegrationsClientandAsyncBlobStorageIntegrationsClientinclient.pyfor managing blob storage integrations.get_blob_storage_integrations(),upsert_blob_storage_integration(), anddelete_blob_storage_integration().types/.delete_organization_membership()anddelete_project_membership()methods inorganizations/client.py.DeleteMembershipRequestandMembershipDeletionResponsetypes.batch()method iningestion/client.pyas legacy, recommending OpenTelemetry endpoint.session_idparameter toget()method inscore_v_2/client.py.fieldsparameter description intrace/client.pyto clarify behavior when fields are excluded.test_http_client.pyandtest_query_encoding.py.This description was created by
for b52dd79. 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:06:06 UTC
This PR is an automated API specification update from the main langfuse/langfuse repository that adds comprehensive blob storage integration functionality and enhances membership management capabilities. The changes introduce a complete blob storage integrations API with support for S3, S3-compatible services, and Azure Blob Storage, enabling users to configure automated data exports with customizable frequencies (hourly, daily, weekly), file formats (JSON, CSV, JSONL), and export modes (full history, from today, or from custom date).
The blob storage integration feature includes 8 new type definitions, request/response models, and a full client implementation with sync/async support for CRUD operations. All new code follows the established patterns in the codebase using Pydantic models with proper field aliasing, serialization methods, and frozen configurations.
Additionally, the PR completes the membership management API by adding deletion endpoints for both organization and project memberships, previously missing from the CRUD operations. The score filtering API is enhanced with a new optional
session_idparameter for more granular querying.Documentation updates mark the legacy batch ingestion endpoint as deprecated in favor of OpenTelemetry standards, and the trace list endpoint documentation is clarified regarding field exclusion behavior. Import paths are also updated in test files, moving core utilities from
langfuse.api.coretolangfuse.coreas part of a module restructuring effort.All changes are auto-generated by Fern from the API specification, ensuring consistency between the Python SDK and the backend API while maintaining backward compatibility.
Confidence score: 2/5
BlobStorageExportFrequency,BlobStorageExportMode,BlobStorageIntegrationTypeenum files and the test files with updated import paths