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]

test(spend): assert batch spend metadata keeps user email

Cursor Agenteeb8b4f7f39a
diff --git a/tests/test_litellm/proxy/spend_tracking/test_spend_tracking_utils.py b/tests/test_litellm/proxy/spend_tracking/test_spend_tracking_utils.py
index bea1f8e2d6c..6cdf9e3fe7e 100644
--- a/tests/test_litellm/proxy/spend_tracking/test_spend_tracking_utils.py
+++ b/tests/test_litellm/proxy/spend_tracking/test_spend_tracking_utils.py
@@ -2789,6 +2789,7 @@ def test_get_logging_payload_batch_attribution_keeps_verification_token_hash():
parsed_meta = json.loads(payload["metadata"])
assert parsed_meta["user_api_key"] == token_hash
assert parsed_meta["user_api_key_alias"] == "batch-creator"
+ assert parsed_meta["user_api_key_user_email"] == "[email protected]"
def test_get_spend_logs_metadata_provenance_bypass_requires_hash_match():