Skip to content

Conversation

@langfuse-bot
Copy link
Collaborator

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

Important

This pull request updates the API specification to include new functionalities for blob storage integrations and membership management, adding new clients, methods, and types to support these features.

  • Blob Storage Integrations:
    • Added BlobStorageIntegrationsClient and AsyncBlobStorageIntegrationsClient in client.py to manage blob storage integrations.
    • Introduced methods get_blob_storage_integrations(), upsert_blob_storage_integration(), and delete_blob_storage_integration().
    • Added types BlobStorageExportFrequency, BlobStorageExportMode, BlobStorageIntegrationDeletionResponse, BlobStorageIntegrationFileType, BlobStorageIntegrationResponse, BlobStorageIntegrationType, BlobStorageIntegrationsResponse, and CreateBlobStorageIntegrationRequest.
  • Membership Management:
    • Added delete_organization_membership() and delete_project_membership() methods in organizations/client.py.
    • Introduced types DeleteMembershipRequest and MembershipDeletionResponse.
  • Miscellaneous:
    • Updated get() method in score_v_2/client.py to include session_id parameter.
    • Updated list() method in trace/client.py to clarify field group behavior in the fields parameter.
    • Fixed import paths in test_http_client.py and test_query_encoding.py.

This description was created by Ellipsis for 7288996. 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:28:27 UTC

This PR is an automated API specification update from the main Langfuse repository (commit 0335dcd18d2a141f9c6825e7ba21c14b0bdb56bd) that introduces significant new functionality and makes important documentation improvements:

New Blob Storage Integration Feature: The most substantial addition is comprehensive blob storage integration support, allowing users to configure external cloud storage (AWS S3, S3-compatible services, Azure Blob Storage) for automated data exports. This includes:

  • Complete API client with CRUD operations (get, upsert, delete)
  • Support for different export frequencies (hourly, daily, weekly), modes (full history, from today, from custom date), and file types (JSON, CSV, JSONL)
  • Comprehensive request/response models with proper field validation and serialization
  • Both synchronous and asynchronous client implementations

Organization Management Enhancement: New membership deletion capabilities allow programmatic removal of users from organizations and projects through dedicated endpoints that require organization-scoped API keys.

API Modernization: The batch ingestion endpoints are now marked as legacy with clear migration guidance toward OpenTelemetry standards at /api/public/otel, reflecting Langfuse's strategic move toward industry-standard observability protocols.

Enhanced Filtering: The ScoreV2 API now supports filtering by session_id, completing the filtering capabilities for both trace and session scores.

Documentation Improvements: Enhanced field parameter documentation for trace listing endpoints provides clearer guidance on exclusion behavior (empty arrays vs. sentinel values).

All changes follow established patterns in the codebase with consistent error handling, field aliasing (camelCase to snake_case), Pydantic model configurations, and serialization methods. The auto-generation ensures type safety and maintains compatibility with the backend API specification.

Confidence Score: 1/5

  • This PR contains critical import path errors that will cause test failures and potentially break existing functionality
  • The import path changes reference non-existent modules (langfuse.core.* instead of langfuse.api.core.*)
  • Several visitor pattern implementations in new enum classes lack proper fallback cases, risking runtime errors with unexpected values

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, 1 comment

Edit Code Review Bot Settings | Greptile

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 fallback case in visitor pattern - method could return None if an unexpected enum value exists, violating the return type annotation

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

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