← All problems
Developer tools Observed November 22, 2026

Blocked AI requests can expose the very text a guardrail rejected

Two LiteLLM users reported failure-path logging that retained sensitive prompt text despite a blocking guardrail or a destination-specific redaction setting. A rejected request needs a log-policy check, not an assumption that rejection made it safe.

What someone actually noticed

One LiteLLM operator reported that a pre-call guardrail blocked a request containing a test secret, yet the original text remained visible in the spend-log row and admin Logs page. They traced the failure path to an unrefreshed request snapshot and described workarounds that either depend on callback ordering, disable request-body logs, or replace blocking with masking. The issue remained open when observed; a proposed fix was also open, so this is not a claim about every deployment or later release.

A different operator reported that per-destination message redaction worked for successful calls but sent full prompt text to an opted-out logging destination when a provider rejected a request. A separate commenter reproduced that behavior with a built-in logging callback. The proposed fix was still open when checked. These are two related LiteLLM failure paths, not evidence that all AI gateways leak prompts.

An Unicorne-featured startup profile advertises a no-prompt-logs API for security work. That positioning prompted the adjacent question of how teams verify their own gateway and observability routes; it does not show that the startup has this bug, that its growth proves demand for an audit tool, or that changing providers alone fixes an application's logs.

Read the original signal: GitHub issue · blocked guardrail request stored in LiteLLM spend logs

Ways to solve it

Without new software, use a synthetic canary in a staging request that each relevant guardrail or provider rejects, inspect every authorized logging destination, and document the result. Turn off prompt-body logging globally where full traces are not essential; review provider fixes before changing production settings.

If teams repeatedly miss failure-only redaction regressions, prototype a small local probe that records pass or fail for each destination and runs after gateway upgrades. Do not send real customer prompts to a third-party checker or promise a fix for the underlying logging implementation.

A small app you could build

Rejected-Request Log Probe

Run harmless synthetic prompts through approved failure paths, then check configured log destinations for canary text and report which redaction policy failed.

Who might use it: AI gateway operators and privacy or security engineers who manage prompt observability

  1. Configure a disposable canary and an approved test gateway endpoint
  2. Trigger a blocked request and a provider-rejected request in a test environment
  3. Read only explicitly connected log destinations for the canary
  4. Show the request path, log destination and redaction result without storing raw prompts

What to verify before building

  • Reproduce each reported path on a disposable setup and test current patched versions before describing it as an active bug.
  • Ask gateway operators which failure routes and log destinations they can safely inspect with synthetic data.
  • Compare a manual staging checklist with a local probe for setup effort, false alarms and accidental canary retention.
  • Check whether gateway-native tests or existing observability controls already cover both blocked and provider-rejected calls.

Reality check

The original reports concern particular LiteLLM configurations and versions, not a measured incidence across gateways. Both issues and their proposed fixes were open at observation, and the state can change. An audit needs privileged access to logs and could itself create sensitive data if canaries are not synthetic. Existing provider tests, configuration changes or a patched release may be sufficient; neither a buyer nor willingness to pay has been established.

An observation is not market validation. Check other reports and talk to the people who experience this before committing more than a tiny experiment.