Skip to content

Conversation

@langfuse-bot
Copy link
Collaborator

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

Important

Adds support for updating score configurations via new update() methods in ScoreConfigsClient and AsyncScoreConfigsClient, with UpdateScoreConfigRequest defining the request structure.

  • Behavior:
    • Adds update() method to ScoreConfigsClient and AsyncScoreConfigsClient in client.py to update score configurations.
    • Supports updating fields like is_archived, name, categories, min_value, max_value, and description.
  • Types:
    • Introduces UpdateScoreConfigRequest in update_score_config_request.py to define the structure of update requests.
  • Imports:
    • Adds UpdateScoreConfigRequest to imports in __init__.py files in api, resources, and score_configs directories.

This description was created by Ellipsis for 895b882. You can customize this summary. It will automatically update as commits are pushed.

Disclaimer: Experimental PR review

Greptile Overview

Updated On: 2025-09-29 11:30:24 UTC

Summary

This PR adds update functionality for score configurations in the Langfuse Python SDK. The changes were auto-generated from the Langfuse OpenAPI specification and introduce a new update() method for both synchronous and asynchronous score config clients.

Key Changes:

  • Added UpdateScoreConfigRequest type with optional fields: is_archived, name, categories, min_value, max_value, and description
  • Implemented update() method in both ScoreConfigsClient and AsyncScoreConfigsClient classes
  • Updated import statements across relevant __init__.py files
  • Added comprehensive documentation and error handling for the new endpoints

The implementation follows established patterns in the codebase and maintains consistency with existing create/get operations. All fields in the update request are optional, allowing for partial updates of score configurations via PATCH requests to /api/public/score-configs/{config_id}.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk - auto-generated code following established patterns
  • Score reflects auto-generated code from OpenAPI specification that follows existing patterns, includes proper error handling, comprehensive documentation, and maintains API consistency. All changes are additive with no breaking modifications.
  • No files require special attention - all generated files follow established conventions

Sequence Diagram

sequenceDiagram
    participant Client as Python SDK Client
    participant API as Langfuse API
    participant DB as Database
    
    Note over Client,DB: Score Configuration Update Flow
    
    Client->>+Client: Create UpdateScoreConfigRequest
    Note right of Client: Optional fields: is_archived, name,<br/>categories, min_value, max_value, description
    
    Client->>+API: PATCH /api/public/score-configs/{config_id}
    Note right of Client: HTTP request with JSON body
    
    API->>+DB: Validate config_id exists
    DB-->>-API: Config validation result
    
    alt Config not found
        API-->>Client: 404 NotFoundError
    else Config exists
        API->>+DB: Update score configuration
        Note right of API: Partial update with provided fields
        DB-->>-API: Updated ScoreConfig
        API-->>-Client: 200 OK + ScoreConfig
    end
    
    alt Error cases
        API-->>Client: 400 BadRequest (invalid data)
        API-->>Client: 401 Unauthorized 
        API-->>Client: 403 AccessDenied
        API-->>Client: 405 MethodNotAllowed
    end
Loading

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.

7 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@hassiebp hassiebp merged commit 60748e8 into main Sep 29, 2025
11 checks passed
@hassiebp hassiebp deleted the api-spec-bot-9b8868a branch September 29, 2025 14:42
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.

3 participants