Skip to content

Conversation

@langfuse-bot
Copy link
Collaborator

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

Important

This pull request adds new functionalities for managing blob storage integrations and organization memberships, including new models, clients, and methods, along with updates to API documentation and tests.

  • Blob Storage Integrations:
    • Added BlobStorageIntegrationsClient and AsyncBlobStorageIntegrationsClient in client.py for managing blob storage integrations.
    • Introduced models like BlobStorageIntegrationResponse, CreateBlobStorageIntegrationRequest, and others in types/.
    • Updated __init__.py to include new imports for blob storage integration types.
  • Organization Memberships:
    • Added methods delete_organization_membership and delete_project_membership in client.py for managing memberships.
    • Introduced DeleteMembershipRequest and MembershipDeletionResponse models in types/.
    • Updated __init__.py to include new imports for organization membership types.
  • Miscellaneous:
    • Updated README.md to reflect changes in API descriptions.
    • Updated test_http_client.py and test_query_encoding.py to reflect changes in core imports.

This description was created by Ellipsis for b907ec8. 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:35:49 UTC

This is an automated API specification update from the main langfuse repository (commit 5df5a7cd4871bb38eec85583f5f3dda58ceed8c7) that introduces several new features and improvements to the Python SDK:

New Blob Storage Integrations: The most significant addition is comprehensive support for blob storage integrations, allowing users to configure automated data exports to cloud storage services like AWS S3, S3-compatible services, and Azure Blob Storage. This includes 8 new types covering export frequencies (hourly, daily, weekly), modes (full history, from today, from custom date), file types (JSON, CSV, JSONL), and full CRUD operations through a new BlobStorageIntegrationsClient.

Enhanced Organization Management: Added new membership deletion capabilities with delete_organization_membership and delete_project_membership methods, completing the CRUD operations for user lifecycle management in organizations and projects.

API Migration Guidance: Updated the ingestion endpoints to mark them as legacy and redirect users to the new OpenTelemetry endpoint (/api/public/otel), part of a broader migration from custom batch ingestion to industry-standard OpenTelemetry.

Enhanced Filtering: Added a session_id parameter to the ScoreV2 API for session-based score filtering, and improved documentation for the trace list fields parameter with detailed explanations of field exclusion behavior.

Documentation Updates: Minor but important changes including updating "API" to "APIs" in the main README to reflect the multi-API nature of the service, and comprehensive reference documentation updates.

All changes follow the established Fern-generated patterns and maintain consistency with existing code structure, using proper Pydantic models, error handling, and both synchronous and asynchronous client implementations.

Confidence score: 1/5

  • This PR contains critical import path errors that will cause immediate test failures and potentially break functionality
  • Score significantly lowered due to incorrect module paths in test files that reference non-existent modules (langfuse.core.* instead of langfuse.api.core.*)
  • Pay close attention to test files with import path changes and blob storage enum implementations with incomplete visitor patterns

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

Edit Code Review Bot Settings | Greptile

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 return statement or exception handling for cases where enum value doesn't match any of the defined types

Suggested change
return azure_blob_storage()
def visit(
self,
s_3: typing.Callable[[], T_Result],
s_3_compatible: typing.Callable[[], T_Result],
azure_blob_storage: typing.Callable[[], T_Result],
) -> 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}")

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 return or exception handling. If self doesn't match any of the defined enum values, this 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 value: {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 are invalid - 'langfuse.core.http_client' and 'langfuse.core.request_options' do not exist in the repository. Should be 'langfuse.api.core.http_client' and 'langfuse.api.core.request_options'

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

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 in visit method - if an unexpected enum value exists, this will return None instead of raising an error, potentially causing silent failures

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

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