﻿# LiteLLM prerelease makes spend-log token scanning an explicit setting

Set and verify redact_tokens_in_spend_logs explicitly when retaining spend-log token scanning; inspect synthetic secrets through storage and detail views.

Author: Retrivium team
Updated: 2026-11-15
Canonical URL: https://retrivium.ai/journal/week46-agent-litellm-spend-token-redaction-opt-in/
Language: en

LiteLLM v1.111.0-dev.4 changes spend-log token redaction to opt-in. Its November 15 prerelease notes explicitly require general_settings.redact_tokens_in_spend_logs: true to retain token scanning. Operators who store prompt or tool content should inspect the effective configuration and the saved record, because an unchanged logging switch does not establish unchanged masking.

## Inventory the content that reaches spend logs

List which request fields, tool arguments and tool outputs the application stores. A credential-shaped value in free-form text differs from a dedicated API-key field. Use only synthetic markers in the inspection fixture. Submit one marker in each logged surface and follow it into the database record and supported detail response. This establishes the actual exposure path without printing or circulating a live credential.

## An absent setting is now a migration decision

Compare an explicitly enabled configuration with the application’s current configuration file. Do not assume an omitted value retains a previous default. Record the effective setting loaded by every worker, including workers restarted during a rolling update. A mixed fleet can produce inconsistent records for the same request shape. The release note provides the setting name; the team still needs evidence that its deployment actually applies it.

## Masking and access control solve different questions

Inspect who can retrieve spend-log details and how long those records remain available. A masked fixture verifies one content transformation, not the entire logging policy. Conversely, restricted log access does not prove free-form secrets are absent. Keep those observations separate when evaluating the upgrade. The relevant outcome is a known content policy applied consistently to the destinations the application actually exposes to its operators.

## Verify the retention boundary after configuration changes

Run the synthetic fixture after changing the setting and after restarting a worker. Check newly written records rather than expecting a configuration update to rewrite historical content. Keep evidence of the tested artifact and configuration together. This prerelease announcement establishes a default change, not a claim that stored history has been sanitized. The migration is reviewable when the team can show the intended behavior for each newly logged surface.

## Sources

- [LiteLLM v1.111.0-dev.4 prerelease notes](https://github.com/BerriAI/litellm/releases/tag/v1.111.0-dev.4)
- [LiteLLM implementation and review #51729](https://github.com/BerriAI/litellm/pull/51729)

## Related reading

- [LiteLLM guardrails: choosing where to inspect requests and responses](/journal/litellm-guardrails-boundary/)
- [LiteLLM Proxy: when to operate your own model gateway](/journal/litellm-proxy-guide/)
