This commit is contained in:
Ishaan Jaff
2025-09-06 18:14:47 -07:00
parent 05dfad8837
commit 52ed60ca45
@@ -1164,15 +1164,6 @@ class Logging(LiteLLMLoggingBaseClass):
used for consistent cost calculation across response headers + logging integrations.
"""
# Check if response_cost is already calculated and stored in model_call_details
# This is used by passthrough endpoints that calculate costs manually
if (
hasattr(self, "model_call_details")
and self.model_call_details.get("response_cost") is not None
):
return self.model_call_details["response_cost"]
if isinstance(result, BaseModel) and hasattr(result, "_hidden_params"):
hidden_params = getattr(result, "_hidden_params", {})
if (