ai.wire.redact_request_headers

Replace credential-bearing request headers with "REDACTED" before a request snapshot rides an `ai.events.LLMCall`. Unlike previews, the request `invoke` actually sends DOES carry auth headers (`x-api-key`, `authorization`, Azure's `api-key`, ...), so captured requests must be scrubbed. Matching is case-insensitive; values are replaced, names kept.

Reference version

Signature

function ai.wire.redact_request_headers(headers: map<string, string>) -> map<string, string>

Replace credential-bearing request headers with "REDACTED" before a request snapshot rides an ai.events.LLMCall. Unlike previews, the request invoke actually sends DOES carry auth headers (x-api-key, authorization, Azure's api-key, ...), so captured requests must be scrubbed. Matching is case-insensitive; values are replaced, names kept.

Source:<builtin>/ai/ns_wire/wire.bamlbytes 31853908