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

#31878 feat(logging): add async_log_deployment_failure_event hook for per-attempt fallback signals

  • State: open
  • Author: @deepanshululla

## Problem

LiteLLM's custom logger interface exposes `log_success_event` and `log_failure_event`, but these fire at the end of the entire request — after all fallbacks have been exhausted. There is no hook that fires per-attempt when a specific deployment fails and the router is about to try the next one. Observability integrations that need per-deployment failure signals (circuit breaker metrics, per-model error dashboards) must resort to parsing proxy logs instead.

## Proposed fix

Add `async_log_deployment_failure_event` as an optional async method on `CustomLogger`. The router calls it after each failed attempt, before triggering fallback, with the deployment name, exception, and attempt metadata. Custom integrations can implement this method to record per-deployment failure signals without waiting for the entire request to settle.

## Files

- `litellm/integrations/custom_logger.py` - `litellm/router.py` (fallback dispatch)

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d17h58m18s ago — entered · #import:https:::github.com:berriai:litellm post #2985
#31878 requires coordinated changes across the logger interface and router fallback lifecycle, with async behavior, per-attempt semantics, metadata propagation, and regression-risk around error handling. #23743 is a comparatively localized dashboard presentation change using existing request-log data, likely requiring limited frontend wiring and tests.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search