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 fixes

Ishaan Jaffaa8261af89e0
diff --git a/litellm/proxy/hooks/proxy_track_cost_callback.py b/litellm/proxy/hooks/proxy_track_cost_callback.py
index dc0c27eb3ec..9ae1eb4c340 100644
--- a/litellm/proxy/hooks/proxy_track_cost_callback.py
+++ b/litellm/proxy/hooks/proxy_track_cost_callback.py
@@ -13,7 +13,6 @@ from litellm.litellm_core_utils.core_helpers import (
from litellm.litellm_core_utils.litellm_logging import StandardLoggingPayloadSetup
from litellm.proxy._types import UserAPIKeyAuth
from litellm.proxy.auth.auth_checks import log_db_metrics
-from litellm.proxy.db.db_spend_update_writer import DBSpendUpdateWriter
from litellm.proxy.utils import ProxyUpdateSpend
from litellm.types.utils import (
StandardLoggingPayload,
diff --git a/tests/proxy_unit_tests/test_unit_test_proxy_hooks.py b/tests/proxy_unit_tests/test_unit_test_proxy_hooks.py
index 129be6d7546..46863889d26 100644
--- a/tests/proxy_unit_tests/test_unit_test_proxy_hooks.py
+++ b/tests/proxy_unit_tests/test_unit_test_proxy_hooks.py
@@ -24,9 +24,10 @@ async def test_disable_spend_logs():
"litellm.proxy.proxy_server.prisma_client", mock_prisma_client
):
from litellm.proxy.db.db_spend_update_writer import DBSpendUpdateWriter
+ db_spend_update_writer = DBSpendUpdateWriter()
# Call update_database with disable_spend_logs=True
- await DBSpendUpdateWriter.update_database(
+ await db_spend_update_writer.update_database(
token="fake-token",
response_cost=0.1,
user_id="user123",