Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

langfuse-bot
Copy link
Collaborator

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

Important

Enhance API client with new resources, improved error handling, and robust request retry mechanisms.

  • New Features:
    • Add BlobStorageIntegrations and LlmConnections resources to Client.ts.
    • Introduce createQueue and createQueueAssignment methods in AnnotationQueues.
    • Add createQueueAssignment and deleteQueueAssignment methods in AnnotationQueues.
    • Add deleteOrganizationMembership and deleteProjectMembership methods in Organizations.
  • Error Handling:
    • Implement new error handling for status-code, non-json, timeout, and unknown errors in multiple client files.
  • Headers and Requests:
    • Update header merging logic in headers.ts to handle null and undefined values.
    • Modify requestWithRetries.ts to include jitter in retry delays and handle Retry-After and X-RateLimit-Reset headers.
  • Miscellaneous:
    • Update ObservationType in ObservationType.ts to include new types like AGENT, TOOL, etc.
    • Change header types in Fetcher.ts to allow null values.

This description was created by Ellipsis 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 and llmConnections. 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 alongside string and undefined, 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

  • This PR is safe to merge with minimal risk as it's an automated API spec update that maintains backward compatibility
  • Score reflects the systematic nature of auto-generated changes and consistent patterns, though the large scope requires attention to integration points
  • Pay close attention to the new retry logic in requestWithRetries.ts and ensure proper testing of the new blob storage and LLM connection features

Copy link

vercel bot commented Sep 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
langfuse-js Ready Ready Preview Sep 18, 2025 1:50pm

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.

75 files reviewed, no comments

Edit Code Review Bot Settings | Greptile

@hassiebp hassiebp merged commit 2aff295 into main Sep 18, 2025
8 checks passed
@hassiebp hassiebp deleted the api-spec-bot-0b68c41 branch September 18, 2025 13:54
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