Skip to content

Conversation

@langfuse-bot
Copy link
Collaborator

@langfuse-bot langfuse-bot commented Sep 18, 2025

Important

Add blob storage integration management to Langfuse API, including new clients, methods, and types for handling integrations.

  • Blob Storage Integrations:
    • Added BlobStorageIntegrationsClient and AsyncBlobStorageIntegrationsClient in client.py for managing blob storage integrations.
    • Introduced methods: get_blob_storage_integrations(), upsert_blob_storage_integration(), and delete_blob_storage_integration().
    • Added types for blob storage integration requests and responses in types/.
  • Organizations:
    • Added delete_organization_membership() and delete_project_membership() methods in organizations/client.py.
    • Introduced DeleteMembershipRequest and MembershipDeletionResponse types.
  • Ingestion:
    • Marked batch() method in ingestion/client.py as legacy, recommending OpenTelemetry endpoint.
  • Score V2:
    • Added session_id parameter to get() method in score_v_2/client.py.
  • Trace:
    • Updated fields parameter description in trace/client.py to clarify behavior when fields are excluded.
  • Misc:
    • Fixed import paths in test_http_client.py and test_query_encoding.py.

This description was created by Ellipsis 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_id parameter 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.core to langfuse.core as 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

  • This PR contains several implementation issues that could cause runtime errors, particularly in enum visitor methods and import path changes
  • Score reflects critical bugs in auto-generated enum classes where visitor methods lack fallback handling, and test import paths that reference non-existent module locations
  • Pay close attention to BlobStorageExportFrequency, BlobStorageExportMode, BlobStorageIntegrationType enum files and the test files with updated import paths

Copy link
Contributor

@greptile-apps greptile-apps bot left a 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

Edit Code Review Bot Settings | Greptile

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()
Copy link
Contributor

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.

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()
Copy link
Contributor

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

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
Copy link
Contributor

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.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants