feat(api): update API spec from langfuse/langfuse 0b68c41 #640
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
Enhance API client with new resources, improved error handling, and robust request retry mechanisms.
BlobStorageIntegrations
andLlmConnections
resources toClient.ts
.createQueue
andcreateQueueAssignment
methods inAnnotationQueues
.createQueueAssignment
anddeleteQueueAssignment
methods inAnnotationQueues
.deleteOrganizationMembership
anddeleteProjectMembership
methods inOrganizations
.status-code
,non-json
,timeout
, andunknown
errors in multiple client files.headers.ts
to handlenull
andundefined
values.requestWithRetries.ts
to include jitter in retry delays and handleRetry-After
andX-RateLimit-Reset
headers.ObservationType
inObservationType.ts
to include new types likeAGENT
,TOOL
, etc.Fetcher.ts
to allownull
values.This description was created by
for a229817. You can customize this summary. It will automatically update as commits are pushed.
Disclaimer: Experimental PR review
Greptile Summary
Updated On: 2025-09-18 13:51:16 UTC
This PR represents an automated API specification update from the main Langfuse repository (commit 0b68c41) that synchronizes the JavaScript SDK with backend API changes. The update includes several key areas of enhancement:
New API Resources: The PR adds two major new API resource modules -
blobStorageIntegrations
andllmConnections
. The blob storage integrations feature allows users to configure automated exports of Langfuse data to various cloud storage providers (S3, S3-compatible services, Azure Blob Storage) with configurable export frequencies, file formats, and date ranges. The LLM connections feature enables management of LLM API provider connections (OpenAI, Anthropic, Azure, Bedrock, Google Vertex AI, Google AI Studio) within Langfuse projects.Enhanced Annotation Queue Management: The update expands annotation queue functionality by adding user assignment capabilities. New interfaces support creating queues (
CreateAnnotationQueueRequest
), assigning users to queues (AnnotationQueueAssignmentRequest
), and managing these assignments with corresponding response types.Improved Type System: Header type definitions across all API clients have been enhanced to explicitly support
null
values alongsidestring
andundefined
, providing better type safety and flexibility for header handling scenarios where values might be explicitly null.Expanded Observation Types: The
ObservationType
enum has been significantly extended with 8 new observation categories: AGENT, TOOL, CHAIN, RETRIEVER, EVALUATOR, EMBEDDING, and GUARDRAIL, enabling more granular categorization of LLM workflow components.Enhanced Retry Logic: The HTTP client's retry mechanism has been upgraded to intelligently handle server-provided retry timing through RFC 7231 Retry-After headers and X-RateLimit-Reset headers, falling back to exponential backoff when headers aren't available.
Code Generation Improvements: All API client files have been refactored to use a consistent header construction pattern, extracting header building logic into separate variables before fetch calls, improving code maintainability and debugging capabilities.
Documentation Formatting: JSDoc comments throughout the codebase have been standardized from multi-line to single-line format for consistency, reflecting updates in the Fern code generation templates.
The changes integrate seamlessly with the existing SDK architecture, following established patterns for auto-generated code while maintaining backward compatibility. All new functionality is properly exported through module index files and follows the codebase's TypeScript and authentication patterns.
Confidence score: 4/5
requestWithRetries.ts
and ensure proper testing of the new blob storage and LLM connection features