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]

revert to older logging implementation

Ishaan Jaff122c11d346cd
diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.py
index 964bbfb70cd..cd5e9ef65d1 100644
--- a/litellm/litellm_core_utils/litellm_logging.py
+++ b/litellm/litellm_core_utils/litellm_logging.py
@@ -1002,8 +1002,10 @@ class Logging(LiteLLMLoggingBaseClass):
## if model in model cost map - log the response cost
## else set cost to None
if (
- standard_logging_object is None and result is not None
- ): # handle streaming separately
+ standard_logging_object is None
+ and result is not None
+ and self.stream is not True
+ ):
if (
isinstance(result, ModelResponse)
or isinstance(result, ModelResponseStream)
@@ -1016,7 +1018,6 @@ class Logging(LiteLLMLoggingBaseClass):
or isinstance(result, FineTuningJob)
or isinstance(result, LiteLLMBatch)
or isinstance(result, ResponsesAPIResponse)
- or isinstance(result, ResponseCompletedEvent)
):
## HIDDEN PARAMS ##
hidden_params = getattr(result, "_hidden_params", {})