feat(api): update API spec from langfuse/langfuse e84ca45#1562
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.
Disclaimer: Experimental PR review
Greptile Summary
This is an auto-generated API spec sync from
langfuse/langfuse@e84ca45, adding two sets of changes across the Python SDK client layer.Blob Storage Integration status endpoint:
GET api/public/integrations/blob-storage/{id}asget_blob_storage_integration_status()on both the high-level and raw sync/async clients.BlobStorageSyncStatus(StrEnum with visitor pattern) andBlobStorageIntegrationStatusResponse(Pydantic model withsyncStatus,lastSyncAt,nextSyncAt,lastError,lastErrorAt).BlobStorageIntegrationResponsewith the newlast_error/last_error_atoptional fields.__init__.py,__all__, and dynamic-import map.Prompt
resolveparameter:resolve: boolquery parameter toPromptsClient.get()and the underlying raw client, letting callers bypass dependency resolution and prompt caching for debugging or one-off jobs.BasePrompt.resolution_graphdocstring is updated to document theresolve=falsebehaviour.The changes are consistent with the existing Fern-generated patterns in the codebase. One minor issue was found in the new
BlobStorageSyncStatus.visit()method (see inline comment).Confidence Score: 4/5
raiseinBlobStorageSyncStatus.visit(), which is a type-safety gap but won't cause failures in current usage since the enum values are exhaustive. No security concerns, no breaking changes.visit()method should add a finalraise ValueErrorfor forward-compatibility.Important Files Changed
get_blob_storage_integration_statusto both sync and async raw clients, hittingGET api/public/integrations/blob-storage/{id}; visit() method in the new sync-status enum lacks a fallback raise, but otherwise correct.get_blob_storage_integration_statuswrappers to both sync and async high-level clients, delegating correctly to the raw client.BlobStorageSyncStatusStrEnum with visitor pattern;visit()method has no fallbackraiseafter exhausting all enum branches, leaving an implicitNonereturn that mismatches theT_Resultreturn type.last_errorandlast_error_atoptional fields to the existing integration response model; consistent with the new status response fields.resolveboolean query parameter to both sync and asyncget()methods, passed cleanly into theparamsdict.resolveparameter through the high-level sync and asyncget()wrappers; documentation is clear.resolution_graphto mention theresolve=falsecase; accurate and helpful.BlobStorageIntegrationStatusResponseandBlobStorageSyncStatusto top-level TYPE_CHECKING imports, dynamic import map, and__all__.TYPE_CHECKINGblock, dynamic import map, and__all__.Sequence Diagram
sequenceDiagram participant Caller participant BlobStorageIntegrationsClient participant RawBlobStorageIntegrationsClient participant LangfuseAPI as Langfuse API Note over Caller,LangfuseAPI: New: get blob storage integration status Caller->>BlobStorageIntegrationsClient: get_blob_storage_integration_status(id) BlobStorageIntegrationsClient->>RawBlobStorageIntegrationsClient: get_blob_storage_integration_status(id) RawBlobStorageIntegrationsClient->>LangfuseAPI: GET api/public/integrations/blob-storage/{id} LangfuseAPI-->>RawBlobStorageIntegrationsClient: BlobStorageIntegrationStatusResponse (syncStatus, lastSyncAt, nextSyncAt, lastError…) RawBlobStorageIntegrationsClient-->>BlobStorageIntegrationsClient: HttpResponse[BlobStorageIntegrationStatusResponse] BlobStorageIntegrationsClient-->>Caller: BlobStorageIntegrationStatusResponse Note over Caller,LangfuseAPI: Existing: get all integrations Caller->>BlobStorageIntegrationsClient: get_blob_storage_integrations() BlobStorageIntegrationsClient->>LangfuseAPI: GET api/public/integrations/blob-storage LangfuseAPI-->>BlobStorageIntegrationsClient: BlobStorageIntegrationsResponse Note over Caller,LangfuseAPI: New: resolve param on prompt fetch Caller->>PromptsClient: get(prompt_name, resolve=false) PromptsClient->>LangfuseAPI: GET api/public/prompts/{name}?resolve=false LangfuseAPI-->>PromptsClient: Prompt (raw, with dependency tags intact) PromptsClient-->>Caller: PromptLast reviewed commit: 040e8a3