feat(api): update API spec from langfuse/langfuse efe3532#1425
Merged
Conversation
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 organization API key retrieval functionality and update filter documentation for observations and traces.
get_organization_api_keys()method toOrganizationsClientandAsyncOrganizationsClientinclient.pyto fetch all API keys for an organization.OrganizationApiKeyandOrganizationApiKeysResponsemodels intypes/organization_api_key.pyandtypes/organization_api_keys_response.py.reference.mdandclient.pyfiles for observations and traces.client.pyfiles.__init__.pyfiles to include new modelsOrganizationApiKeyandOrganizationApiKeysResponse.This description was created by
for ecab1f4. You can customize this summary. It will automatically update as commits are pushed.
Disclaimer: Experimental PR review
Greptile Overview
Updated On: 2025-11-03 10:13:01 UTC
Greptile Summary
This PR updates the Python API client to sync with the latest Langfuse API specification. The changes add support for retrieving organization API keys and significantly enhance the documentation for filter parameters.
Key Changes
New Organization API Key Management: Added
get_organization_api_keys()method to both sync and asyncOrganizationsClientclasses, allowing retrieval of all API keys for an organization (requires organization-scoped authentication)OrganizationApiKeyandOrganizationApiKeysResponsewith proper Pydantic modelsEnhanced Filter Documentation: Updated docstrings for
observations.get_many()andtrace.list()methods with comprehensive filter documentationGenerated Code Quality
All changes appear to be auto-generated by the Fern code generator from the OpenAPI spec. The code follows established patterns in the codebase with consistent error handling, proper type annotations, and appropriate Pydantic model configurations.
Confidence Score: 5/5
Important Files Changed
File Analysis
Sequence Diagram
sequenceDiagram participant Client participant OrganizationsClient participant LangfuseAPI Note over Client,LangfuseAPI: Get Organization API Information Client->>OrganizationsClient: get_organization_api_keys() OrganizationsClient->>LangfuseAPI: GET /api/public/organizations/apiKeys alt Success (200) LangfuseAPI-->>OrganizationsClient: OrganizationApiKeysResponse OrganizationsClient-->>Client: List of API key metadata else Access Denied (403) LangfuseAPI-->>OrganizationsClient: AccessDeniedError OrganizationsClient-->>Client: Raise exception else Unauthorized (401) LangfuseAPI-->>OrganizationsClient: UnauthorizedError OrganizationsClient-->>Client: Raise exception end Note over Client,LangfuseAPI: Enhanced Filtering (Observations & Traces) Client->>OrganizationsClient: observations.get_many(filter=json_string) OrganizationsClient->>LangfuseAPI: GET with filter parameter LangfuseAPI->>LangfuseAPI: Parse and apply filter conditions LangfuseAPI-->>OrganizationsClient: Filtered results OrganizationsClient-->>Client: ObservationsViews