> 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.

# Type Alias LlmConditional Fn

> Decide whether an LLM call is allowed to continue.

Generated from `cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker`.

<pre />

Decide whether an LLM call is allowed to continue.

The callback receives the current [`LlmRequest`](/reference/api/rust-library-reference/nemo-relay/api/llm/struct-llmrequest) and can allow execution, reject it with a guardrail reason, or return an error.

This alias is [`Arc`](https://doc.rust-lang.org/1.93.0/alloc/sync/struct.Arc.html)-backed so the runtime can clone conditional guardrails into an evaluation snapshot and invoke them after registry locks are released.

## Parameters

* First argument: Current [`LlmRequest`](/reference/api/rust-library-reference/nemo-relay/api/llm/struct-llmrequest) being evaluated.

## Returns

A [`Result`](/reference/api/rust-library-reference/nemo-relay/error/type-result) containing `Ok(None)` when execution is allowed or `Ok(Some(reason))` when the guardrail rejects the call.

## Errors

The callback can return any [`FlowError`](/reference/api/rust-library-reference/nemo-relay/error/enum-flowerror) to abort guardrail evaluation.

## Aliased Type

```rust
pub struct LlmConditionalFn { /* private fields */ }
```