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] Include all SpendLogsMetadata keys in spend logs payload
yuneng-jianged4b654934d1
diff --git a/litellm/proxy/spend_tracking/spend_tracking_utils.py b/litellm/proxy/spend_tracking/spend_tracking_utils.pyindex 0796fdcc0b9..d517c76a08c 100644--- a/litellm/proxy/spend_tracking/spend_tracking_utils.py+++ b/litellm/proxy/spend_tracking/spend_tracking_utils.py@@ -98,9 +98,8 @@ def _get_spend_logs_metadata(# Filter the metadata dictionary to include only the specified keysclean_metadata = SpendLogsMetadata(**{ # type: ignore- key: metadata[key]+ key: metadata.get(key)for key in SpendLogsMetadata.__annotations__.keys()- if key in metadata})clean_metadata["applied_guardrails"] = applied_guardrails