Skip to content

Conversation

@langfuse-bot
Copy link
Collaborator

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

Important

This PR adds new clients and types for managing blob storage integrations and organization memberships, updates API documentation, and modifies test utilities.

  • Blob Storage Integrations:
    • Added BlobStorageIntegrationsClient and AsyncBlobStorageIntegrationsClient in client.py for managing blob storage integrations.
    • Introduced types for blob storage integrations in types/.
    • Added methods for creating, updating, and deleting integrations.
  • Organization Memberships:
    • Added delete_organization_membership and delete_project_membership methods in organizations/client.py.
    • Introduced DeleteMembershipRequest and MembershipDeletionResponse types.
  • API Documentation:
    • Updated reference.md with new endpoints and usage examples.
    • Updated legacy endpoint descriptions in ingestion/client.py.
  • Test Utilities:
    • Updated imports in test_http_client.py and test_query_encoding.py to reflect new core module structure.

This description was created by Ellipsis 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:

  • Blob Storage Integration Management: Complete CRUD operations with comprehensive configuration options including authentication credentials, export scheduling, regional settings, and conditional requirements based on storage provider types
  • Enhanced Organization Management: Addition of membership deletion capabilities for both organization and project-level memberships
  • API Evolution: Legacy ingestion endpoint deprecation in favor of OpenTelemetry standards
  • Improved Filtering: Addition of session_id filtering for scores and enhanced field documentation for trace listings
  • Module Restructuring: Core utilities moved from langfuse.api.core.* to langfuse.core.* for better organization

All 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

  • This PR introduces significant new functionality but has some implementation issues that should be addressed before merging
  • Score reflects mostly solid auto-generated code with established patterns, but lowered due to missing error handling in visitor pattern implementations that could cause runtime issues
  • Pay close attention to enum files with visitor pattern methods that lack proper fallback handling for unmatched cases

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, 2 comments

Edit Code Review Bot Settings | Greptile

Comment on lines +14 to +25
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()
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 fallback case - if self doesn't match any enum value, method returns None instead of T_Result, violating the return type annotation

Suggested change
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}")

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: 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.

Suggested change
) -> 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}")

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