feat(api): update API spec from langfuse/langfuse 4c5828dadef0b861362eff27a42991a9c236a55c#1363
Closed
langfuse-bot wants to merge 1 commit intomainfrom
Closed
Conversation
…eff27a42991a9c236a55c
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: 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.
Comment on lines
+19
to
+25
| ) -> 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: 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
Suggested change
| ) -> 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}") |
Comment on lines
+3
to
+4
| from langfuse.core.http_client import get_request_body | ||
| from langfuse.core.request_options import RequestOptions |
Contributor
There was a problem hiding this comment.
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.
Suggested change
| 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 |
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
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