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]

fix test_call_with_key_over_budget

Ishaan Jaffb590d807affe
diff --git a/litellm/tests/test_key_generate_prisma.py b/litellm/tests/test_key_generate_prisma.py
index 708025d1d6d..962d61afba5 100644
--- a/litellm/tests/test_key_generate_prisma.py
+++ b/litellm/tests/test_key_generate_prisma.py
@@ -1492,7 +1492,10 @@ def test_call_with_key_over_budget(prisma_client):
proxy_logging_obj=proxy_logging_obj,
)
# test spend_log was written and we can read it
- spend_logs = await view_spend_logs(request_id=request_id)
+ spend_logs = await view_spend_logs(
+ request_id=request_id,
+ user_api_key_dict=UserAPIKeyAuth(api_key=generated_key),
+ )
print("read spend logs", spend_logs)
assert len(spend_logs) == 1