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
Merge pull request #9642 from BerriAI/litellm_mcp_improvements_expose_sse_urls
Ishaan Jaff5df985f96463
diff --cc litellm/litellm_core_utils/litellm_logging.pyindex dcd3ae3a642,8dcd7326866..edb37b33a8b--- a/litellm/litellm_core_utils/litellm_logging.py+++ b/litellm/litellm_core_utils/litellm_logging.py@@@ -1079,39 -1084,39 +1080,39 @@@ class Logging(LiteLLMLoggingBaseClass)"response_cost"]else:- self.model_call_details["response_cost"] = (- self._response_cost_calculator(result=result)- )+ self.model_call_details[+ "response_cost"+ ] = self._response_cost_calculator(result=result)## STANDARDIZED LOGGING PAYLOAD- self.model_call_details["standard_logging_object"] = (- get_standard_logging_object_payload(- kwargs=self.model_call_details,- init_response_obj=result,- start_time=start_time,- end_time=end_time,- logging_obj=self,- status="success",- standard_built_in_tools_params=self.standard_built_in_tools_params,- )+ self.model_call_details[+ "standard_logging_object"+ ] = get_standard_logging_object_payload(+ kwargs=self.model_call_details,+ init_response_obj=result,+ start_time=start_time,+ end_time=end_time,+ logging_obj=self,+ status="success",+ standard_built_in_tools_params=self.standard_built_in_tools_params,)- elif isinstance(result, dict): # pass-through endpoints+ elif isinstance(result, dict) or isinstance(result, list):## STANDARDIZED LOGGING PAYLOAD- self.model_call_details["standard_logging_object"] = (- get_standard_logging_object_payload(- kwargs=self.model_call_details,- init_response_obj=result,- start_time=start_time,- end_time=end_time,- logging_obj=self,- status="success",- standard_built_in_tools_params=self.standard_built_in_tools_params,- )+ self.model_call_details[+ "standard_logging_object"+ ] = get_standard_logging_object_payload(+ kwargs=self.model_call_details,+ init_response_obj=result,+ start_time=start_time,+ end_time=end_time,+ logging_obj=self,+ status="success",+ standard_built_in_tools_params=self.standard_built_in_tools_params,)elif standard_logging_object is not None:- self.model_call_details["standard_logging_object"] = (- standard_logging_object- )+ self.model_call_details[+ "standard_logging_object"+ ] = standard_logging_objectelse: # streaming chunks + image gen.self.model_call_details["response_cost"] = None