> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/relay/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/relay/_mcp/server.

# Function register_llm_sanitize_response_guardrail

> Register a global LLM sanitize-response guardrail. The guardrail rewrites only the response payload recorded on emitted end events.

Generated from `cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi`.

<pre />

Register a global LLM sanitize-response guardrail. The guardrail rewrites only the response payload recorded on emitted end events.

## Parameters

* `name`: Unique middleware name in the global registry.
* `priority`: Lower values run earlier in the chain.
* `guardrail`: Guardrail callback stored under `name`.

## Returns

A [`Result`](/reference/api/rust-library-reference/nemo-relay/error/type-result) that is `Ok(())` when the guardrail was registered.

## Errors

Returns [`FlowError::AlreadyExists`](/reference/api/rust-library-reference/nemo-relay/error/enum-flowerror) when the name is already in use or an internal error if the runtime state cannot be updated.