UI Spend Log Settings
Configure spend log behavior directly from the Admin UIβno config file edits or proxy restart required. This is especially useful for cloud deployments where updating the config is difficult or requires a long release process.
Overviewβ
Previously, spend log options (such as storing request/response content and retention period) had to be set in proxy_config.yaml under general_settings. Changing them required editing the config and restarting the proxy, which was a pain point for users-especially in cloud environmentsβwho don't have easy access to the config or whose deployment process makes config updates slow.
UI Spend Log Settings lets you:
- Store prompts in spend logs β Enable or disable storing request and response content in the spend logs table (only affects logs created after you change the setting)
- Set retention period β Configure how long spend logs are kept before automatic cleanup (e.g.
7d,30d) - Apply changes immediately β No proxy restart needed; settings take effect for new requests as soon as you save
Settings changed in the UI override the values in your config file. For example, if store_prompts_in_spend_logs is explicitly set to false in general_settings, turning it on in the UI will still enable storing prompts. Use the UI when you want runtime control without redeploying.
Settings You Can Configureβ
| Setting | Description |
|---|---|
| Store Prompts in Spend Logs | When enabled, request messages and response content are stored for new spend logs so you can view them in the Logs UI. Logs created before you enabled this will not have request/response content. When disabled, only metadata (e.g. tokens, cost, model) is stored for new logs. |
| Retention Period | Maximum time to keep spend logs before they are automatically deleted (e.g. 7d, 30d). Optional; if not set, logs are retained according to your config or default behavior. |
The same options can be set in config via general_settings (store_prompts_in_spend_logs, maximum_spend_logs_retention_period). Values set in the UI take precedence.
How to Configure Spend Log Settings in the UIβ
1. Open the Logs pageβ
Navigate to the Admin UI (e.g. http://localhost:4000/ui or your PROXY_BASE_URL/ui) and click Logs.


2. Open Logs settingsβ
Click the Settings (gear) icon on the Logs page to open the spend log settings panel.

3. Enable Store Prompts in Spend Logs (optional)β
Turn on Store Prompts in Spend Logs if you want request and response content to be stored for new requests and visible when you open those log entries. This only affects logs created after you enable it; existing logs will not gain request/response content. Leave it off if you only need metadata (tokens, cost, model, etc.).

4. Set the retention period (optional)β
Optionally set the Retention Period (e.g. 7d, 30d) to control how long spend logs are kept before automatic cleanup. Uses the same format as the config option maximum_spend_logs_retention_period.

5. Save settingsβ
Click Save Settings. Changes take effect immediately for new requests; no proxy restart is required. Existing logs are not updated.
