What happened?
We found a reproducible issue in LiteLLM v1.77.2 where the store_prompts_in_spend_logs feature completely fails.
Even when store_prompts_in_spend_logs: true is enabled, all rows in the LiteLLM_SpendLogs table have empty JSON objects {} in both messages and response columns.
Other fields such as request_id, tokens_in/out, total_cost, and status are stored correctly, and API responses are successfully returned to the client.
This means the message and response payloads are being lost somewhere in the internal spend-log write pipeline.
We tested with:
- Docker image:
ghcr.io/berriai/litellm:v1.77.2
- PostgreSQL backend
- No custom callbacks or guardrails (pure default setup)
stream: false (non-streaming requests)
- Verified with direct SQL query:
SELECT messages, response
FROM "LiteLLM_SpendLogs"
ORDER BY "startTime" DESC
LIMIT 5;
Relevant log output
litellm | 16:58:50 - LiteLLM Proxy:DEBUG: litellm_pre_call_utils.py:825 - receiving data: {'model': 'Qwen/Qwen3-4B-Instruct-2507', 'messages': [{'role': 'user', 'content': 'DEBUG: store_prompts_in_spend_logs 동작 추적'}], 'stream': False, 'user': 'debug-trace'}
litellm | 16:58:56 - LiteLLM Proxy:DEBUG: utils.py:3277 - Spend Logs transactions: 0
litellm | INFO: Writing spend log to db
litellm | INFO: Logged request status: success
Database query result:
SELECT messages, response FROM "LiteLLM_SpendLogs" ORDER BY "startTime" DESC LIMIT 1;
messages | response
----------+----------
{} | {}
Are you a ML Ops Team?
No
What LiteLLM version are you on ?
v1.77.2 (tested both standard and -stable variants)
Twitter / LinkedIn details
No social details to share publicly.
What happened?
We found a reproducible issue in LiteLLM v1.77.2 where the
store_prompts_in_spend_logsfeature completely fails.Even when
store_prompts_in_spend_logs: trueis enabled, all rows in theLiteLLM_SpendLogstable have empty JSON objects{}in bothmessagesandresponsecolumns.Other fields such as
request_id,tokens_in/out,total_cost, andstatusare stored correctly, and API responses are successfully returned to the client.This means the message and response payloads are being lost somewhere in the internal spend-log write pipeline.
We tested with:
ghcr.io/berriai/litellm:v1.77.2stream: false(non-streaming requests)Relevant log output
Are you a ML Ops Team?
No
What LiteLLM version are you on ?
v1.77.2 (tested both standard and -stable variants)
Twitter / LinkedIn details
No social details to share publicly.