9 views
-/https://github.com/berriai/litellm/issues/24123
GitHub · issue

#24123 [Feature]: Support Langfuse Python SDK v4

  • State: open
  • Author: @pperezrubio

## Feature Request

Support the Langfuse Python SDK v4 in LiteLLM's Langfuse callback integration.

## Current State

`pyproject.toml` pins `langfuse = "^2.45.0"`, which means LiteLLM is locked to the v2 SDK. The Langfuse v3 SDK has been available for some time, and **Langfuse Python SDK v4.0.0 was released on March 10, 2026** with additional breaking changes.

Relevant file: [`litellm/integrations/langfuse/langfuse.py`](https://github.com/BerriAI/litellm/blob/main/litellm/integrations/langfuse/langfuse.py)

## Why This Matters

Self-hosted Langfuse users running the latest server (`langfuse/langfuse:3`) already require workarounds to use LiteLLM with v3 SDK semantics. When Langfuse publishes a `langfuse/langfuse:4` server image, the mismatch will become a hard blocker — the server will expect v4 SDK payloads while LiteLLM sends v2-era requests.

## What Needs to Change

1. **`pyproject.toml`**: Update `langfuse = "^2.45.0"` to allow v4 (`langfuse >= 4.0.0`) 2. **`litellm/integrations/langfuse/langfuse.py`**: Migrate API call sites to v4 SDK (import paths, client init, `generation` → `span` patterns, flush semantics) 3. **`litellm/integrations/langfuse/langfuse_prompt_management.py…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (8 events)
#0 of 0 · 31d19h13m25s ago — entered · #import:https:::github.com:berriai:litellm post #1651
The left issue is harder because it requires a breaking third-party SDK migration across dependency constraints, integration APIs, prompt management, compatibility handling, and broad regression testing. The right issue is comparatively localized to usage schema propagation and streaming aggregation, with narrower implementation and validation scope.
The left issue spans a new CLI workflow, multiple external agent integrations, credential handling, model discovery, subprocess/environment configuration, and cross-platform UX, creating substantially broader integration and maintenance risk. The right issue is a focused dependency and callback-adapter migration with a bounded compatibility surface and test updates.
The right issue is harder because it requires a breaking third-party SDK migration, dependency and API compatibility work, lifecycle changes, and broad regression testing. The left issue is comparatively localized to request-scoped proxy response handling and conditional serialization.
The right issue is substantially harder because it involves a dependency upgrade with breaking API changes, compatibility decisions, callback lifecycle behavior, and broad integration testing. The left issue is comparatively localized to extending multimodal content handling and validating token-counting behavior.
The right issue is harder because it requires dependency upgrades, breaking API migration, compatibility handling, regression testing, and release validation; the left is primarily documentation and operational guidance.
The right-hand task is substantially harder because it involves a breaking third-party SDK migration, dependency changes, API and lifecycle compatibility work, and broad regression testing. The left-hand task is a localized shutdown null-safety fix with limited scope.
The right issue is harder because it requires a cross-version integration migration, dependency-policy changes, API and lifecycle compatibility work, and broad regression coverage. The left issue is narrower in scope, primarily involving tracing-provider lifecycle and asynchronous export behavior within one callback path.
#0 of 0 · 31d17h52m5s ago — current · #import:https:::github.com:berriai:litellm post #2996
The right issue is harder because it requires a dependency upgrade across breaking API changes, integration migration, compatibility handling, and broader regression testing. The left issue is narrower, mainly involving provider metadata propagation and targeted pricing-path validation.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search