#24123 [Feature]: Support Langfuse Python SDK v4
## 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…