From 82ead979616bf57220b918c23565f1743e6d1a1e Mon Sep 17 00:00:00 2001 From: yassin Date: Thu, 17 Sep 2026 23:39:59 +0000 Subject: [PATCH] fix(proxy): resolve pass-through log dispatch lazily so instance patches still apply Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- litellm/proxy/pass_through_endpoints/success_handler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/litellm/proxy/pass_through_endpoints/success_handler.py b/litellm/proxy/pass_through_endpoints/success_handler.py index 59d853a3df8..7141bf1d156 100644 --- a/litellm/proxy/pass_through_endpoints/success_handler.py +++ b/litellm/proxy/pass_through_endpoints/success_handler.py @@ -61,7 +61,7 @@ class PassThroughEndpointLogging: self.transcribe_passthrough_logging_handler: Final = ( transcribe_handler if transcribe_handler is not None else TranscribePassthroughLoggingHandler() ) - self._log_dispatch: Final = log_dispatch if log_dispatch is not None else self._handle_logging + self._injected_log_dispatch: Final = log_dispatch self.TRACKED_VERTEX_METHOD_ROUTES = ( "generateContent", "streamGenerateContent", @@ -103,6 +103,10 @@ class PassThroughEndpointLogging: # Vertex AI Live API WebSocket self.TRACKED_VERTEX_AI_LIVE_ROUTES = ["/vertex_ai/live"] + @property + def _log_dispatch(self) -> PassThroughLogDispatch: + return self._injected_log_dispatch if self._injected_log_dispatch is not None else self._handle_logging + async def _handle_logging( self, logging_obj: LiteLLMLoggingObj,