6 views
-/https://github.com/berriai/litellm/issues/30825
GitHub · issue

#30825 [Bug]: Multiple logging callbacks in key metadata - only last callback's credentials are used

  • State: open
  • Author: @progseq
  • Labels: bug, proxy

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

When configuring two logging callbacks in a key's metadata (via the UI or API), e.g. `langfuse` + `langfuse_otel` or two `langfuse` entries each pointing to different Langfuse projects - **only the last callback's credentials are applied to all callbacks**. The first callback silently receives the second callback's credentials and fails or logs to the wrong project.

Expected: each callback fires independently with its own credentials.

## Root cause (code pointer)

In `litellm/proxy/litellm_pre_call_utils.py`, `convert_key_logging_metadata_to_callback` merges all callbacks into a single `TeamCallbackMetadata` with **one flat `callback_vars` dict**. Iterating over multiple logging entries causes later entries to overwrite earlier ones (lines ~187–191):

```python for var, value in data.callback_vars.items(): if team_callback_settings_obj.callback_vars is None: team_callback_settings_obj.callback_vars = {} team_callback_settings_obj.callback_vars[var] = str(...) # ← overwrites previous callback's vars ```

Since `langfuse` and `…

GitHub resolver

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

Refresh page
vote history (8 events)
#0 of 0 · 31d19h14m50s ago — entered · #import:https:::github.com:berriai:litellm post #1636
Issue #35131 is harder because it spans asynchronous response lifecycle handling, provider-specific completion behavior, background polling, persistence state transitions, cost calculation, retry/cleanup logic, and regression testing. Issue #30825 is comparatively localized to callback-specific metadata isolation and its surrounding tests.
22195 spans proxy serialization, Anthropic/OpenAI schema normalization, log persistence, and Logs View v2 rendering, requiring cross-layer changes and broader regression coverage. 30825 is comparatively localized to callback metadata modeling and credential isolation, though it may require compatibility adjustments.
Issue 30825 requires changes to callback metadata modeling and execution paths, with compatibility considerations and broader regression testing. Issue 26668 is a narrowly scoped configuration correction.
The left issue spans provider-specific request translation, asynchronous or conditional cost calculation, and propagation through response metadata, callbacks, storage, and UI, making diagnosis and end-to-end validation broader. The right issue is comparatively localized to callback metadata modeling and credential isolation, with focused code changes and tests.
30825 is harder because it requires redesigning callback-specific metadata propagation and preserving compatibility across multiple logging integrations, whereas 29066 is comparatively localized to nullable model handling and related validation tests.
The left issue spans configuration reconciliation, redeploy lifecycle behavior, persistence, and backward-compatibility concerns, requiring broader integration testing. The right issue is comparatively localized to callback metadata representation and assignment logic.
The left issue spans a broad provider-capability expansion across multiple API modalities, request/response transformations, model coverage, and likely provider documentation and testing. The right issue is a localized proxy metadata propagation defect with a clearer code path and narrower compatibility surface, though it may require careful regression tests for multiple callback configurations.
#0 of 0 · 31d18h14s ago — current · #import:https:::github.com:berriai:litellm post #2864
Transcription parsing spans shared response-model validation, provider-specific payload normalization, and both SDK and proxy execution paths, creating broader compatibility and regression-testing risk. The callback issue is more localized to proxy metadata representation and callback isolation, with a clearer architectural fix.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search