Overview
Guardrail redaction lets Bifrost rewrite sensitive text detected by supported guardrail providers instead of only detecting or blocking it. Bifrost-managed redaction is supported by: Each provider can produce findings with byte ranges and entity types such asEMAIL, PHONE_NUMBER, AWS_ACCESS_TOKEN, or a custom regex entity_type. Bifrost then applies the configured redaction action, strategy, and mode.
Redaction only applies to text that a guardrail provider detects. If a provider does not detect a value, Bifrost cannot redact that value in runtime payloads, logs, or connector exports.
Bifrost-Managed vs Provider-Managed Rewrites
Bifrost-managed redaction is different from provider-managed transformation.- Bifrost-managed redaction means the guardrail provider returns findings, and Bifrost applies the replacement using
redaction_strategyandredaction_mode. - Provider-managed transformation means an external guardrail provider returns already-transformed text for Bifrost to apply.
Actions
Theaction field controls what happens when the provider finds sensitive text.
redaction_strategy and redaction_mode only change request, response, log, or trace content when action is redact.
Redaction Strategies
Strategies control the replacement value used by the non-reversibleruntime mode.
Reversible modes use numbered placeholders such as
[EMAIL-1] so a permitted user can reveal the original values in Bifrost logs.
Redaction Modes
Redaction mode decides where Bifrost applies the rewrite.
Runtime (runtime)
Use runtime when sensitive text should not reach the model provider or the caller. Bifrost rewrites detected text in the live request or response and stores the already-redacted value in Bifrost logs.
Example with redaction_strategy: "replace":
Logs only (logs_only)
Use logs_only when the model should receive the original text, but Bifrost logs and trace exports should not store raw sensitive values.
Runtime content stays unchanged. Bifrost logs and trace-export connectors receive placeholders:
Runtime + reversible logs (runtime_reversible)
Use runtime_reversible when runtime content should be redacted, but authorized users still need a controlled way to view the original values in Bifrost logs.
Runtime content, Bifrost logs, and trace-export connectors use the same placeholder style:
Reveal
Reveal is Enterprise-only and applies only to Bifrost logs. Users need theLogs:Reveal permission to reveal original values for a log that has reversible redaction data. When the caller has that permission, the log detail response can include the placeholder mapping for that log, for example:
- Reveal is scoped to Bifrost logs, not external destinations.
- The mapping is stored with the log row and is deleted when the log row is deleted.
- When an encryption key is configured, the mapping is encrypted before storage.
- The reveal response is marked
Cache-Control: no-store. - Data Access Control still applies when fetching or revealing a log.
Connector Exports
For trace-export connectors, Bifrost applies raw-to-placeholder replacements before the completed trace is exported. This keeps exported span content aligned with Bifrost log redaction for reversible modes, while keeping the reversible mapping inside Bifrost.This section describes Bifrost’s completed-trace export path. Integrations that do not consume completed Bifrost traces should not be assumed to receive the same connector redaction behavior.
Provider Defaults
For redaction, set
action: "redact" explicitly. Relying on defaults is usually the wrong move here, especially for Presidio and Azure AI Language PII.
Edge Cases
- Redaction is text-based. It does not inspect image pixels, audio, or arbitrary binary content.
- Custom Regex uses Go’s RE2-compatible regexp engine.
- Overlapping findings are resolved into a non-overlapping set before replacement.
- Bifrost-managed redaction cannot be combined with provider-managed transformed output for the same request or response phase.
- Input redaction cannot safely run together with raw-body passthrough transformations; Bifrost fails closed rather than forwarding an inconsistent payload.
- If a request uses both input and output redaction, Bifrost carries replacements forward so raw log fields and exported trace content are redacted consistently.

