Skip to content

Conversation

@langfuse-bot
Copy link
Collaborator

@langfuse-bot langfuse-bot commented Dec 1, 2025

Important

Add config field to LlmConnection and UpsertLlmConnectionRequest for adapter-specific configurations, required for Bedrock and optional for VertexAI.

  • Behavior:
    • Add config field to LlmConnection and UpsertLlmConnectionRequest for adapter-specific configurations.
    • config is required for Bedrock ({"region":"us-east-1"}) and optional for VertexAI ({"location":"us-central1"}); not used by other adapters.

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

Disclaimer: Experimental PR review

Greptile Overview

Greptile Summary

This PR adds a new optional config field to both LlmConnection and UpsertLlmConnectionRequest models to support adapter-specific configuration.

Key Changes:

  • Added config: Optional[Dict[str, Any]] field to LlmConnection model for storing adapter-specific configuration
  • Added config: Optional[Dict[str, Any]] field to UpsertLlmConnectionRequest with detailed validation rules
  • Configuration is required for Bedrock adapter (must specify AWS region), optional for VertexAI adapter (can specify GCP location), and not used by other adapters
  • Files are auto-generated by Fern from the API specification

Confidence Score: 5/5

  • This PR is safe to merge with no issues
  • Auto-generated code from Fern API spec with straightforward addition of an optional configuration field using proper typing and Pydantic validation
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
langfuse/api/resources/llm_connections/types/llm_connection.py 5/5 Added optional config field for adapter-specific configuration (Bedrock region, VertexAI location)
langfuse/api/resources/llm_connections/types/upsert_llm_connection_request.py 5/5 Added optional config field with validation rules for Bedrock (required) and VertexAI (optional)

Sequence Diagram

sequenceDiagram
    participant Client
    participant UpsertLlmConnectionRequest
    participant API
    participant LlmConnection
    
    Client->>UpsertLlmConnectionRequest: Create request with config
    Note over UpsertLlmConnectionRequest: config: Optional[Dict[str, Any]]<br/>Bedrock: {"region": "us-east-1"}<br/>VertexAI: {"location": "us-central1"}
    
    UpsertLlmConnectionRequest->>API: Submit upsert request
    
    API->>API: Validate config based on adapter
    Note over API: Bedrock: config required<br/>VertexAI: config optional<br/>Others: config not used
    
    API->>LlmConnection: Create/Update connection
    Note over LlmConnection: Store config for adapter-specific needs
    
    LlmConnection->>Client: Return connection (secrets masked)
Loading

@langfuse-bot langfuse-bot requested a review from hassiebp December 1, 2025 16:36
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.

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@hassiebp hassiebp merged commit bfbfac7 into main Dec 1, 2025
12 checks passed
@hassiebp hassiebp deleted the api-spec-bot-cb16277 branch December 1, 2025 16:49
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