Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

pop litellm_logging_obj from request_data before callback loop

michelligabrielebfcba21564fd
diff --git a/litellm/proxy/utils.py b/litellm/proxy/utils.py
index b0d709abbb6..e2df0acd219 100644
--- a/litellm/proxy/utils.py
+++ b/litellm/proxy/utils.py
@@ -1729,6 +1729,9 @@ class ProxyLogging:
original_exception=original_exception,
)
+ # Remove before callbacks iterate — not serialisable
+ request_data.pop("litellm_logging_obj", None)
+
# Track the first HTTPException returned or raised by any callback
transformed_exception: Optional[HTTPException] = None