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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix _success_handler_helper_fn
Ishaan Jaffer9e3a8c4b0d98
diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.pyindex 782f6dd2259..4d6fd351858 100644--- a/litellm/litellm_core_utils/litellm_logging.py+++ b/litellm/litellm_core_utils/litellm_logging.py@@ -1571,12 +1571,14 @@ class Logging(LiteLLMLoggingBaseClass):# MAP RESPONSES API USAGE OBJECT TO LITELLM USAGE OBJECTif isinstance(result, ResponsesAPIResponse):result = result.model_copy()+ transformed_usage = ResponseAPILoggingUtils._transform_response_api_usage_to_chat_usage(+ result.usage+ )+ # Set as dict instead of Usage object so model_dump() serializes it correctlysetattr(result,"usage",- ResponseAPILoggingUtils._transform_response_api_usage_to_chat_usage(- result.usage- ),+ transformed_usage.model_dump() if hasattr(transformed_usage, 'model_dump') else dict(transformed_usage),)if (