7 views
-/https://github.com/berriai/litellm/issues/29638
GitHub · issue

#29638 [Bug]: Proxy double-logs image_generation (2 callback events per call); SDK logs once

  • State: open
  • Author: @PoyrazTahan
  • Labels: llm translation

## What happened

On the **proxy**, every `/v1/images/generations` call fires the success-logging callbacks **twice** — two identical logging events per call (e.g. two Langfuse GENERATION observations, byte-identical except `id`: same model, prompt, `start_time` **and** `end_time`, cost). Two real API calls can't share an end-timestamp, so it's one call logged twice.

`/v1/chat/completions` on the same proxy logs **once**. The duplication is specific to the image path.

## Isolation (verified — the solid evidence)

Using a minimal `CustomLogger` that counts success-callback invocations:

| call path | success-callback invocations | |---|---| | `Router.image_generation` (sync) | **1** | | `Router.aimage_generation` (async) | **1** | | `Router.aimage_generation` + langfuse (direct) | **1** (one observation) | | **litellm proxy** → `/v1/images/generations` | **2** |

So the Router, the core call, and the Langfuse integration each log exactly once. **Only the full proxy doubles** — the second emit is added in the proxy's image request path. chat does not exhibit it. For multi-attempt images (retry/fallback) the count is 2× per real attempt, so totals are always even multiples of the re…

GitHub resolver

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

Refresh page
vote history (4 events)
#0 of 0 · 31d19h13m6s ago — entered · #import:https:::github.com:berriai:litellm post #1666
The dark-theme work is broader and riskier because it spans the UI’s styling system, component coverage, theme state, and visual/accessibility validation. The logging defect appears more localized to one proxy request lifecycle and can likely be resolved with targeted tracing and regression tests.
Issue 26507 is harder because it requires designing and validating robust bidirectional tool-name normalization across semantic matching, routing, and collision-prone client conventions. Issue 29638 appears more localized to tracing duplicate proxy callback registration or emission in one endpoint, with narrower regression coverage.
Azure realtime WebRTC integration spans provider-specific protocol translation, endpoint routing, authentication, API-version compatibility, and streaming behavior, creating substantially broader implementation and validation risk than isolating a proxy-only duplicate callback emission.
#0 of 0 · 31d18h6m24s ago — current · #import:https:::github.com:berriai:litellm post #2756
The left issue requires diagnosing and safely correcting asynchronous cancellation, state initialization, protocol-specific behavior, and regression coverage across MCP transport variants. The right issue appears more localized to proxy callback wiring and should be easier to isolate and fix.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search