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]

ui_view_spend_logs (#7952)

Ishaan Jaffe6ec4f21e58b
diff --git a/litellm/proxy/proxy_config.yaml b/litellm/proxy/proxy_config.yaml
index e0c3e678a8e..b8b69fd2821 100644
--- a/litellm/proxy/proxy_config.yaml
+++ b/litellm/proxy/proxy_config.yaml
@@ -13,8 +13,7 @@ model_list:
api_key: fake-key
api_base: https://exampleopenaiendpoint-production.up.railway.app/
-general_settings:
- store_prompts_in_spend_logs: true
+
litellm_settings:
callbacks: ["prometheus"]
diff --git a/litellm/proxy/spend_tracking/spend_management_endpoints.py b/litellm/proxy/spend_tracking/spend_management_endpoints.py
index e63bef71eec..8882cffacb5 100644
--- a/litellm/proxy/spend_tracking/spend_management_endpoints.py
+++ b/litellm/proxy/spend_tracking/spend_management_endpoints.py
@@ -1667,17 +1667,7 @@ async def ui_view_spend_logs( # noqa: PLR0915
param="None",
code=status.HTTP_401_UNAUTHORIZED,
)
- if _should_store_prompts_and_responses_in_spend_logs() is not True:
- verbose_proxy_logger.debug(
- "Prompts and responses are not stored in spend logs, returning empty list"
- )
- return {
- "data": [],
- "total": 0,
- "page": page,
- "page_size": page_size,
- "total_pages": 0,
- }
+
if start_date is None or end_date is None:
raise ProxyException(
message="Start date and end date are required",