The four modes
The modes are ordered from least to most strict:
full → redacted → metadata → none.
Defaults and inheritance
The privacy mode is safe-by-default and resolved in this order:- The environment’s explicit
privacy_mode, if set. - Otherwise a name-based default: a
developmentenvironment inherits the project default (default_privacy_mode, itselffullunless you change it); any production-like environment defaults tometadata.
Tightening per request
A single request may only tighten the resolved mode viametadata.privacy — it can move
toward less retention (e.g. full → metadata), never toward more. You can never widen capture
beyond the environment’s configured mode from a request.
What redaction removes
Inredacted mode, every string leaf of the logged prompt and response is passed through a set
of patterns, and matches are replaced with typed placeholders ([redacted:email],
[redacted:phone], [redacted:card], [redacted:key]) so neither the value nor its exact shape
survives:
- API-key-shaped strings (Roadie keys, OpenAI keys, AWS access-key ids, bearer tokens)
- Email addresses
- Credit-card-shaped digit runs (13–16 digits)
- Phone numbers
metadata or none.
What is always true
- The usage record (tokens, cost, status) is always kept regardless of mode — it is what metering and billing run on. Privacy only governs prompt/response content.
- A streamed response is logged as its reassembled final content (subject to the mode), not as individual delta frames.
- Per-environment
log_retention_days(default 30) ages out old logs automatically.
Choosing a mode
Usefull in development and for debugging; use redacted when you need content for evaluation
but must strip common PII; use metadata or none in production when prompts are sensitive and
you only need operational metrics. For the compliance angle, see
Privacy & compliance; for where this sits per environment, see
Tenancy & isolation.