> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/relay/_mcp/server. # Module api > Top-level FFI API functions exported as `extern "C"`. 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`. Top-level FFI API functions exported as `extern "C"`. Each function clears the thread-local error before executing and returns an [`NemoRelayStatus`](/reference/api/rust-library-reference/nemo-relay-ffi/error/enum-nemorelaystatus). On failure, call \[`nemo_relay_last_error`] to retrieve the error message. ## Re-exports * `pub use crate::types::nemo_relay_otel_log_subscriber_free;` * `pub use crate::types::nemo_relay_otel_metric_subscriber_free;` * `pub use crate::types::nemo_relay_otel_subscriber_free;` ## Structs * [FfiStream](/reference/api/rust-library-reference/nemo-relay-ffi/api/struct-ffistream): Opaque stream handle for consuming LLM streaming responses chunk by chunk. Use `nemo_relay_stream_next` to poll and `nemo_relay_stream_free` to release. ## Functions * [nemo\_relay\_adaptive\_build\_cache\_telemetry\_event](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-build-cache-telemetry-event): Build one cache telemetry event as JSON. * [nemo\_relay\_adaptive\_runtime\_bind\_scope](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-runtime-bind-scope): Bind ACG request rewrites to a scope. * [nemo\_relay\_adaptive\_runtime\_build\_cache\_request\_facts](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-runtime-build-cache-request-facts): Build cache request facts as JSON. * [nemo\_relay\_adaptive\_runtime\_create](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-runtime-create): Create an owned adaptive runtime handle from config JSON. * [nemo\_relay\_adaptive\_runtime\_deregister](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-runtime-deregister): Deregister configured adaptive runtime features. * [nemo\_relay\_adaptive\_runtime\_register](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-runtime-register): Register configured adaptive runtime features. * [nemo\_relay\_adaptive\_runtime\_report\_json](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-runtime-report-json): Return the runtime construction report as JSON. * [nemo\_relay\_adaptive\_runtime\_shutdown](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-runtime-shutdown): Shut down the adaptive runtime and consume its Rust runtime state. * [nemo\_relay\_adaptive\_runtime\_wait\_for\_idle](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-runtime-wait-for-idle): Wait until the adaptive telemetry drain has processed pending events. * [nemo\_relay\_adaptive\_set\_latency\_sensitivity](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-set-latency-sensitivity): Set manual latency sensitivity on the current scope. * [nemo\_relay\_adaptive\_validate\_config](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-validate-config): Validate an adaptive config document and return the diagnostics report as JSON. * [nemo\_relay\_anthropic\_messages\_codec\_new](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-anthropic-messages-codec-new): Create a new Anthropic Messages API codec handle. * [nemo\_relay\_atif\_exporter\_clear](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atif-exporter-clear): Clears all collected events from the exporter. * [nemo\_relay\_atif\_exporter\_create](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atif-exporter-create): Creates a new ATIF exporter. * [nemo\_relay\_atif\_exporter\_deregister](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atif-exporter-deregister): Deregisters the exporter subscriber. * [nemo\_relay\_atif\_exporter\_export](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atif-exporter-export): Exports collected events as an ATIF trajectory JSON string. * [nemo\_relay\_atif\_exporter\_register](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atif-exporter-register): Registers the exporter as an event subscriber. * [nemo\_relay\_atof\_exporter\_create](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atof-exporter-create): Creates a new filesystem-backed ATOF JSONL exporter. * [nemo\_relay\_atof\_exporter\_create\_from\_json](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atof-exporter-create-from-json): Creates a new ATOF exporter from a JSON config object. * [nemo\_relay\_atof\_exporter\_deregister](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atof-exporter-deregister): Deregisters the ATOF exporter subscriber. * [nemo\_relay\_atof\_exporter\_force\_flush](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atof-exporter-force-flush): Outside a native subscriber callback, waits for queued subscriber delivery, then flushes the configured file sink or asks the configured stream sink to drain for up to its timeout. * [nemo\_relay\_atof\_exporter\_path](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atof-exporter-path): Returns the ATOF exporter output path as a string when its sink is a file. * [nemo\_relay\_atof\_exporter\_register](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atof-exporter-register): Registers the ATOF exporter as an event subscriber. * [nemo\_relay\_atof\_exporter\_shutdown](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atof-exporter-shutdown): Outside a native subscriber callback, waits for queued subscriber delivery, then flushes the configured file sink or asks the configured stream sink to drain and close up to its timeout. * [nemo\_relay\_capture\_propagation\_context\_json](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-capture-propagation-context-json): Serialize the current causal parent as a versioned propagation context. * [nemo\_relay\_capture\_propagation\_context\_with\_root\_json](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-capture-propagation-context-with-root-json): Serialize the current causal parent with an application-supplied root UUID. * [nemo\_relay\_capture\_rootless\_propagation\_context\_json](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-capture-rootless-propagation-context-json): Serialize the current causal parent without a propagation root. * [nemo\_relay\_capture\_traceparent](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-capture-traceparent): Capture the current Relay context as a W3C `traceparent` header value. * [nemo\_relay\_deregister\_conditional\_middleware\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-conditional-middleware-guardrail): Deregister a global conditional middleware guardrail. * [nemo\_relay\_deregister\_event\_metadata\_injector](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-event-metadata-injector): Deregister a global event metadata injector. * [nemo\_relay\_deregister\_llm\_conditional\_execution\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-llm-conditional-execution-guardrail): Deregister an LLM conditional execution guardrail by name. * [nemo\_relay\_deregister\_llm\_execution\_intercept](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-llm-execution-intercept): Deregister an LLM execution intercept by name. * [nemo\_relay\_deregister\_llm\_request\_intercept](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-llm-request-intercept): Deregister an LLM request intercept by name. * [nemo\_relay\_deregister\_llm\_sanitize\_request\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-llm-sanitize-request-guardrail): Deregister an LLM request sanitization guardrail by name. * [nemo\_relay\_deregister\_llm\_sanitize\_response\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-llm-sanitize-response-guardrail): Deregister an LLM response sanitization guardrail by name. * [nemo\_relay\_deregister\_llm\_stream\_execution\_intercept](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-llm-stream-execution-intercept): Deregister an LLM streaming execution intercept by name. * [nemo\_relay\_deregister\_mark\_sanitize\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-mark-sanitize-guardrail): Deregister a global mark event sanitizer. * [nemo\_relay\_deregister\_plugin](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-plugin): Deregister a plugin by kind. * [nemo\_relay\_deregister\_scope\_sanitize\_end\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-scope-sanitize-end-guardrail): Deregister a global scope-end event sanitizer. * [nemo\_relay\_deregister\_scope\_sanitize\_start\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-scope-sanitize-start-guardrail): Deregister a global scope-start event sanitizer. * [nemo\_relay\_deregister\_subscriber](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-subscriber): Deregister an event subscriber by name. * [nemo\_relay\_deregister\_tool\_conditional\_execution\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-tool-conditional-execution-guardrail): Deregister a tool conditional execution guardrail by name. * [nemo\_relay\_deregister\_tool\_execution\_intercept](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-tool-execution-intercept): Deregister a tool execution intercept by name. * [nemo\_relay\_deregister\_tool\_request\_intercept](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-tool-request-intercept): Deregister a tool request intercept by name. * [nemo\_relay\_deregister\_tool\_sanitize\_request\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-tool-sanitize-request-guardrail): Deregister a tool request sanitization guardrail by name. * [nemo\_relay\_deregister\_tool\_sanitize\_response\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-tool-sanitize-response-guardrail): Deregister a tool response sanitization guardrail by name. * [nemo\_relay\_event](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-event): Emit a named lifecycle event. * [nemo\_relay\_event\_v2](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-event-v2): Emit a named lifecycle event with optional data schema and log severity. * [nemo\_relay\_flush\_subscribers](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-flush-subscribers): Wait for subscriber callbacks queued before this call and events emitted transitively by those callbacks to finish. * [nemo\_relay\_gemini\_generate\_content\_codec\_new](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-gemini-generate-content-codec-new): Create a new Gemini generateContent API codec handle. * [nemo\_relay\_get\_handle](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-get-handle): Retrieve the current scope handle from the thread-local scope stack. * [nemo\_relay\_initialize\_default\_logging](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-initialize-default-logging): Initializes the Go binding runtime and installs default operational logging. * [nemo\_relay\_list\_plugin\_kinds\_json](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-list-plugin-kinds-json): Return the registered plugin kinds as JSON. * [nemo\_relay\_list\_runtime\_registrations](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-list-runtime-registrations): List global gateable runtime registrations as JSON. * [nemo\_relay\_llm\_call](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-call): Begin a manual LLM call lifecycle span. * [nemo\_relay\_llm\_call\_end](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-call-end): End a manual LLM call lifecycle span. * [nemo\_relay\_llm\_call\_execute](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-call-execute): Execute an LLM call end-to-end: run conditional-execution guardrails (on raw request), then request intercepts, sanitize-request guardrails, execution intercepts, the callback, and sanitize-response guardrails. On rejection, only a standalone Mark event is emitted (no Start/End pair) and `GuardrailRejected` is returned. Blocks the calling thread until completion. * [nemo\_relay\_llm\_conditional\_execution](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-conditional-execution): Run the registered LLM conditional execution guardrail chain. * [nemo\_relay\_llm\_request\_intercept\_outcome\_json\_new](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-request-intercept-outcome-json-new): Allocate canonical JSON for a C LLM request-intercept callback result. * [nemo\_relay\_llm\_request\_intercept\_outcome\_json\_new\_v2](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-request-intercept-outcome-json-new-v2): Allocate canonical JSON for a C LLM request-intercept callback result, including optional plugin-neutral optimization contributions. * [nemo\_relay\_llm\_request\_intercepts](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-request-intercepts): Run the registered LLM request intercept chain on the given request. * [nemo\_relay\_llm\_sanitize\_request\_codec\_decode](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-sanitize-request-codec-decode): Decode a request through a callback-scoped sanitizer codec capability. * [nemo\_relay\_llm\_sanitize\_request\_codec\_encode](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-sanitize-request-codec-encode): Encode normalized request changes through a callback-scoped codec capability. * [nemo\_relay\_llm\_sanitize\_response\_codec\_decode](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-sanitize-response-codec-decode): Decode a response through a callback-scoped sanitizer codec capability. * [nemo\_relay\_llm\_stream\_call\_execute](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-stream-call-execute): Execute a streaming LLM call end-to-end. Conditional-execution guardrails run first on the raw request. Returns a stream handle that can be polled with `nemo_relay_stream_next`. Blocks until the stream is set up. * [nemo\_relay\_log](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-log): Emits a structured operational log record for language bindings. * [nemo\_relay\_metric](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-metric): Emit an atomic metric measurement mark from typed C measurements. * [nemo\_relay\_metric\_json](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-metric-json): Emit an atomic metric measurement mark from canonical JSON. * [nemo\_relay\_observability\_component\_spec\_json](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-observability-component-spec-json): Wrap an observability config JSON object as a top-level plugin component. * [nemo\_relay\_observability\_default\_config\_json](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-observability-default-config-json): Return the default observability plugin config as JSON. * [nemo\_relay\_observability\_plugin\_kind](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-observability-plugin-kind): Return the built-in observability plugin kind. * [nemo\_relay\_openai\_chat\_codec\_new](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-openai-chat-codec-new): Create a new OpenAI Chat Completions codec handle. * [nemo\_relay\_openai\_responses\_codec\_new](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-openai-responses-codec-new): Create a new OpenAI Responses API codec handle. * [nemo\_relay\_otel\_log\_subscriber\_create](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-log-subscriber-create): Creates an independently managed OpenTelemetry log subscriber. * [nemo\_relay\_otel\_log\_subscriber\_create\_v2](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-log-subscriber-create-v2): Creates an independently managed OpenTelemetry log subscriber with `header_env` support. * [nemo\_relay\_otel\_log\_subscriber\_deregister](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-log-subscriber-deregister): Deregisters a subscriber by name from the shared subscriber registry. * [nemo\_relay\_otel\_log\_subscriber\_force\_flush](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-log-subscriber-force-flush): Flushes queued Relay events and OTLP log batches. * [nemo\_relay\_otel\_log\_subscriber\_register](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-log-subscriber-register): Registers an OpenTelemetry log subscriber globally. * [nemo\_relay\_otel\_log\_subscriber\_runtime\_diagnostics\_json](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-log-subscriber-runtime-diagnostics-json): Return a bounded JSON snapshot of runtime diagnostics for this subscriber. * [nemo\_relay\_otel\_log\_subscriber\_shutdown](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-log-subscriber-shutdown): Shuts down the OpenTelemetry logger provider. * [nemo\_relay\_otel\_metric\_subscriber\_create](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-metric-subscriber-create): Creates an independently managed OpenTelemetry metric subscriber. * [nemo\_relay\_otel\_metric\_subscriber\_create\_v2](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-metric-subscriber-create-v2): Creates an independently managed OpenTelemetry metric subscriber with `header_env` support. * [nemo\_relay\_otel\_metric\_subscriber\_deregister](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-metric-subscriber-deregister): Deregisters a subscriber by name from the shared subscriber registry. * [nemo\_relay\_otel\_metric\_subscriber\_force\_flush](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-metric-subscriber-force-flush): Flushes queued Relay events and collects current metric aggregates. * [nemo\_relay\_otel\_metric\_subscriber\_register](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-metric-subscriber-register): Registers an OpenTelemetry metric subscriber globally. * [nemo\_relay\_otel\_metric\_subscriber\_runtime\_diagnostics\_json](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-metric-subscriber-runtime-diagnostics-json): Return a bounded JSON snapshot of runtime diagnostics for this subscriber. * [nemo\_relay\_otel\_metric\_subscriber\_shutdown](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-metric-subscriber-shutdown): Shuts down the OpenTelemetry meter provider and performs final collection. * [nemo\_relay\_otel\_subscriber\_create](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-create): Creates one typed OpenTelemetry exporter subscriber. * [nemo\_relay\_otel\_subscriber\_create\_file\_sink](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-create-file-sink): Creates one typed OpenTelemetry exporter subscriber that writes OTLP to a file. * [nemo\_relay\_otel\_subscriber\_create\_with\_projection\_options](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-create-with-projection-options): Creates one typed OpenTelemetry exporter subscriber with projection controls. * [nemo\_relay\_otel\_subscriber\_create\_with\_projection\_options\_v2](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-create-with-projection-options-v2): Creates one typed OpenTelemetry exporter subscriber with projection, metadata, and lineage controls. * [nemo\_relay\_otel\_subscriber\_create\_with\_projection\_options\_v3](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-create-with-projection-options-v3): Creates one typed OpenTelemetry exporter subscriber with projection, metadata, and lineage controls. * [nemo\_relay\_otel\_subscriber\_create\_with\_projection\_options\_v4](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-create-with-projection-options-v4): Creates one typed OpenTelemetry exporter subscriber with projection and metadata controls. * [nemo\_relay\_otel\_subscriber\_create\_with\_projection\_options\_v5](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-create-with-projection-options-v5): Creates one typed OpenTelemetry exporter subscriber with projection, metadata, resource-promotion, and lineage controls. * [nemo\_relay\_otel\_subscriber\_deregister](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-deregister): Deregisters the OpenTelemetry subscriber by name. * [nemo\_relay\_otel\_subscriber\_force\_flush](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-force-flush): Forces a flush of finished spans through the exporter. * [nemo\_relay\_otel\_subscriber\_register](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-register): Registers the OpenTelemetry subscriber as an event subscriber. * [nemo\_relay\_otel\_subscriber\_runtime\_diagnostics\_json](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-runtime-diagnostics-json): Return a bounded JSON snapshot of runtime diagnostics for this subscriber. * [nemo\_relay\_otel\_subscriber\_shutdown](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-shutdown): Shuts down the underlying tracer provider. * [nemo\_relay\_plugin\_context\_register\_event\_metadata\_injector](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-event-metadata-injector): Register an event metadata injector into a plugin context. * [nemo\_relay\_plugin\_context\_register\_llm\_conditional\_execution\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-llm-conditional-execution-guardrail): Register an LLM conditional-execution guardrail into the plugin registration context. * [nemo\_relay\_plugin\_context\_register\_llm\_execution\_intercept](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-llm-execution-intercept): Register an LLM execution intercept into the plugin registration context. * [nemo\_relay\_plugin\_context\_register\_llm\_request\_intercept](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-llm-request-intercept): Register an LLM request intercept into the plugin registration context. * [nemo\_relay\_plugin\_context\_register\_llm\_sanitize\_request\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-llm-sanitize-request-guardrail): Register an LLM sanitize-request guardrail into the plugin registration context. * [nemo\_relay\_plugin\_context\_register\_llm\_sanitize\_response\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-llm-sanitize-response-guardrail): Register an LLM sanitize-response guardrail into the plugin registration context. * [nemo\_relay\_plugin\_context\_register\_llm\_stream\_execution\_intercept](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-llm-stream-execution-intercept): Register an LLM stream execution intercept into the plugin registration context. * [nemo\_relay\_plugin\_context\_register\_mark\_sanitize\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-mark-sanitize-guardrail): Register a mark event sanitizer into a plugin context. * [nemo\_relay\_plugin\_context\_register\_scope\_sanitize\_end\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-scope-sanitize-end-guardrail): Register a scope-end event sanitizer into a plugin context. * [nemo\_relay\_plugin\_context\_register\_scope\_sanitize\_start\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-scope-sanitize-start-guardrail): Register a scope-start event sanitizer into a plugin context. * [nemo\_relay\_plugin\_context\_register\_subscriber](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-subscriber): Register an event subscriber into the plugin registration context. * [nemo\_relay\_plugin\_context\_register\_tool\_conditional\_execution\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-tool-conditional-execution-guardrail): Register a tool conditional-execution guardrail into the plugin registration context. * [nemo\_relay\_plugin\_context\_register\_tool\_execution\_intercept](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-tool-execution-intercept): Register a tool execution intercept into the plugin registration context. * [nemo\_relay\_plugin\_context\_register\_tool\_request\_intercept](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-tool-request-intercept): Register a tool request intercept into the plugin registration context. * [nemo\_relay\_plugin\_context\_register\_tool\_sanitize\_request\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-tool-sanitize-request-guardrail): Register a tool sanitize-request guardrail into the plugin registration context. * [nemo\_relay\_plugin\_context\_register\_tool\_sanitize\_response\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-tool-sanitize-response-guardrail): Register a tool sanitize-response guardrail into the plugin registration context. * [nemo\_relay\_plugin\_host\_activation\_close](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-host-activation-close): Close one owned plugin-host activation. * [nemo\_relay\_plugin\_host\_activation\_is\_active](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-host-activation-is-active): Report whether an owned plugin-host activation is still active. * [nemo\_relay\_plugin\_host\_activation\_report\_json](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-host-activation-report-json): Return the current report retained by an owned plugin-host activation. * [nemo\_relay\_plugin\_initialize](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-initialize): Initialize the unified static and dynamic plugin host from core-owned `plugins.toml` discovery. * [nemo\_relay\_plugin\_validate](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-validate): Validate dynamic plugins without loading plugin code or acquiring the host lease. * [nemo\_relay\_plugin\_validate\_exact](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-validate-exact): Validate only the supplied static plugin configuration. * [nemo\_relay\_pop\_scope](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-pop-scope): Pop a scope from the scope stack by its handle. * [nemo\_relay\_propagation\_context\_normalize\_json](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-propagation-context-normalize-json): Validate and canonicalize propagation-context JSON for transport. * [nemo\_relay\_propagation\_context\_to\_traceparent](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-propagation-context-to-traceparent): Convert a rooted propagation-context JSON value to a W3C `traceparent`. * [nemo\_relay\_push\_scope](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-push-scope): Push a new scope onto the scope stack. * [nemo\_relay\_register\_conditional\_middleware\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-conditional-middleware-guardrail): Register a global conditional middleware guardrail. * [nemo\_relay\_register\_event\_metadata\_injector](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-event-metadata-injector): Register a global event metadata injector. * [nemo\_relay\_register\_llm\_conditional\_execution\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-llm-conditional-execution-guardrail): Register an LLM conditional execution guardrail. The callback decides whether an LLM call should proceed. * [nemo\_relay\_register\_llm\_execution\_intercept](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-llm-execution-intercept): Register an LLM execution intercept following the middleware chain pattern. The callback receives `(name, request, context, next_fn, next_ctx)` - call `next_fn(request, next_ctx)` to invoke the next intercept or the original LLM call, or skip calling it to short-circuit. * [nemo\_relay\_register\_llm\_request\_intercept](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-llm-request-intercept): Register an LLM request intercept. The callback can transform the `LlmRequest` before it reaches the LLM provider. * [nemo\_relay\_register\_llm\_sanitize\_request\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-llm-sanitize-request-guardrail): Register an LLM request sanitizer. The callback receives the emitted request first and per-call codec context second; null omits observability. * [nemo\_relay\_register\_llm\_sanitize\_response\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-llm-sanitize-response-guardrail): Register an LLM response sanitization guardrail. The callback can inspect and modify the LLM response after it is received. * [nemo\_relay\_register\_llm\_stream\_execution\_intercept](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-llm-stream-execution-intercept): Register an LLM streaming execution intercept following the middleware chain pattern. The callback receives `(name, request, context, next_fn, next_ctx)` - call `next_fn(request, next_ctx)` to invoke the next intercept or the original streaming LLM call, or skip calling it to short-circuit. The response codec in `context` is null because chunks are not complete provider responses. * [nemo\_relay\_register\_mark\_sanitize\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-mark-sanitize-guardrail): Register a global mark event sanitizer. * [nemo\_relay\_register\_plugin](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-plugin): Register a plugin backed by foreign callbacks. * [nemo\_relay\_register\_scope\_sanitize\_end\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-scope-sanitize-end-guardrail): Register a global scope-end event sanitizer. * [nemo\_relay\_register\_scope\_sanitize\_start\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-scope-sanitize-start-guardrail): Register a global scope-start event sanitizer. * [nemo\_relay\_register\_subscriber](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-subscriber): Register an event subscriber. The callback is invoked for every lifecycle event emitted by the runtime. * [nemo\_relay\_register\_tool\_conditional\_execution\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-tool-conditional-execution-guardrail): Register a tool conditional execution guardrail. The callback decides whether a tool call should proceed. Returns an error message to reject, or null to allow. * [nemo\_relay\_register\_tool\_execution\_intercept](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-tool-execution-intercept): Register a tool execution intercept following the middleware chain pattern. The callback receives `(context_json, next_fn, next_ctx)`, where `context_json` contains `tool_name`, `args`, and `tool_call_id`. * [nemo\_relay\_register\_tool\_request\_intercept](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-tool-request-intercept): Register a tool request intercept. The callback can transform tool arguments before execution. Runs after request guardrails in the middleware pipeline. * [nemo\_relay\_register\_tool\_sanitize\_request\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-tool-sanitize-request-guardrail): Register a tool request sanitization guardrail. The callback can inspect and modify tool arguments before the tool executes. * [nemo\_relay\_register\_tool\_sanitize\_response\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-tool-sanitize-response-guardrail): Register a tool response sanitization guardrail. The callback can inspect and modify tool results after the tool executes. * [nemo\_relay\_resource\_metrics\_collect\_free](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-resource-metrics-collect-free): Release a collection handle and cancel its pending wait. * [nemo\_relay\_resource\_metrics\_collect\_poll](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-resource-metrics-collect-poll): Check a collection without blocking. `out_done` is false while pending. * [nemo\_relay\_resource\_metrics\_collect\_start](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-resource-metrics-collect-start): Start an asynchronous resource metrics collection using the active plugin. * [nemo\_relay\_scope\_deregister\_event\_metadata\_injector](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-event-metadata-injector): Deregister an event metadata injector owned by an active scope. * [nemo\_relay\_scope\_deregister\_llm\_conditional\_execution\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-llm-conditional-execution-guardrail): Deregister a scope-local LLM conditional execution guardrail by name. * [nemo\_relay\_scope\_deregister\_llm\_execution\_intercept](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-llm-execution-intercept): Deregister a scope-local LLM execution intercept by name. * [nemo\_relay\_scope\_deregister\_llm\_request\_intercept](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-llm-request-intercept): Deregister a scope-local LLM request intercept by name. * [nemo\_relay\_scope\_deregister\_llm\_sanitize\_request\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-llm-sanitize-request-guardrail): Deregister a scope-local LLM request sanitization guardrail by name. * [nemo\_relay\_scope\_deregister\_llm\_sanitize\_response\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-llm-sanitize-response-guardrail): Deregister a scope-local LLM response sanitization guardrail by name. * [nemo\_relay\_scope\_deregister\_llm\_stream\_execution\_intercept](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-llm-stream-execution-intercept): Deregister a scope-local LLM streaming execution intercept by name. * [nemo\_relay\_scope\_deregister\_mark\_sanitize\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-mark-sanitize-guardrail): Deregister a scope-local mark event sanitizer. * [nemo\_relay\_scope\_deregister\_scope\_sanitize\_end\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-scope-sanitize-end-guardrail): Deregister a scope-local scope-end event sanitizer. * [nemo\_relay\_scope\_deregister\_scope\_sanitize\_start\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-scope-sanitize-start-guardrail): Deregister a scope-local scope-start event sanitizer. * [nemo\_relay\_scope\_deregister\_subscriber](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-subscriber): Deregister a scope-local event subscriber by name. * [nemo\_relay\_scope\_deregister\_tool\_conditional\_execution\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-tool-conditional-execution-guardrail): Deregister a scope-local tool conditional execution guardrail by name. * [nemo\_relay\_scope\_deregister\_tool\_execution\_intercept](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-tool-execution-intercept): Deregister a scope-local tool execution intercept by name. * [nemo\_relay\_scope\_deregister\_tool\_request\_intercept](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-tool-request-intercept): Deregister a scope-local tool request intercept by name. * [nemo\_relay\_scope\_deregister\_tool\_sanitize\_request\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-tool-sanitize-request-guardrail): Deregister a scope-local tool request sanitization guardrail by name. * [nemo\_relay\_scope\_deregister\_tool\_sanitize\_response\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-tool-sanitize-response-guardrail): Deregister a scope-local tool response sanitization guardrail by name. * [nemo\_relay\_scope\_register\_event\_metadata\_injector](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-event-metadata-injector): Register an event metadata injector owned by an active scope. * [nemo\_relay\_scope\_register\_llm\_conditional\_execution\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-llm-conditional-execution-guardrail): Register a scope-local LLM conditional execution guardrail. * [nemo\_relay\_scope\_register\_llm\_execution\_intercept](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-llm-execution-intercept): Register a scope-local LLM execution intercept following the middleware chain pattern. The callback receives `(name, request, context, next_fn, next_ctx)`. * [nemo\_relay\_scope\_register\_llm\_request\_intercept](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-llm-request-intercept): Register a scope-local LLM request intercept. * [nemo\_relay\_scope\_register\_llm\_sanitize\_request\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-llm-sanitize-request-guardrail): Register a scope-local LLM request sanitization guardrail. * [nemo\_relay\_scope\_register\_llm\_sanitize\_response\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-llm-sanitize-response-guardrail): Register a scope-local LLM response sanitization guardrail. * [nemo\_relay\_scope\_register\_llm\_stream\_execution\_intercept](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-llm-stream-execution-intercept): Register a scope-local LLM streaming execution intercept following the middleware chain pattern. The callback receives `(name, request, context, next_fn, next_ctx)`. The response codec in `context` is null. * [nemo\_relay\_scope\_register\_mark\_sanitize\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-mark-sanitize-guardrail): Register a scope-local mark event sanitizer. * [nemo\_relay\_scope\_register\_scope\_sanitize\_end\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-scope-sanitize-end-guardrail): Register a scope-local scope-end event sanitizer. * [nemo\_relay\_scope\_register\_scope\_sanitize\_start\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-scope-sanitize-start-guardrail): Register a scope-local scope-start event sanitizer. * [nemo\_relay\_scope\_register\_subscriber](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-subscriber): Register a scope-local event subscriber. * [nemo\_relay\_scope\_register\_tool\_conditional\_execution\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-tool-conditional-execution-guardrail): Register a scope-local tool conditional execution guardrail. * [nemo\_relay\_scope\_register\_tool\_execution\_intercept](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-tool-execution-intercept): Register a scope-local tool execution intercept following the middleware chain pattern. * [nemo\_relay\_scope\_register\_tool\_request\_intercept](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-tool-request-intercept): Register a scope-local tool request intercept. * [nemo\_relay\_scope\_register\_tool\_sanitize\_request\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-tool-sanitize-request-guardrail): Register a scope-local tool request sanitization guardrail. * [nemo\_relay\_scope\_register\_tool\_sanitize\_response\_guardrail](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-tool-sanitize-response-guardrail): Register a scope-local tool response sanitization guardrail. * [nemo\_relay\_scope\_stack\_active](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-stack-active): Returns whether the current execution context has an explicitly-initialized scope stack. * [nemo\_relay\_scope\_stack\_capture\_thread](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-stack-capture-thread): Capture the current thread-local scope stack binding. * [nemo\_relay\_scope\_stack\_create](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-stack-create): Create a new isolated scope stack with its own root scope. * [nemo\_relay\_scope\_stack\_create\_from\_propagation\_json](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-stack-create-from-propagation-json): Create an isolated scope stack from propagation-context JSON. * [nemo\_relay\_scope\_stack\_restore\_thread](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-stack-restore-thread): Restore and free a captured thread-local scope stack binding. * [nemo\_relay\_scope\_stack\_set\_thread](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-stack-set-thread): Bind an isolated scope stack to the current OS thread. * [nemo\_relay\_shutdown\_default\_logging](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-shutdown-default-logging): Shuts down and releases the default operational logging runtime. * [nemo\_relay\_stream\_close](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-stream-close): Stop a stream producer and wait for cleanup to complete. * [nemo\_relay\_stream\_free](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-stream-free): Free a stream handle and release its resources. * [nemo\_relay\_stream\_next](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-stream-next): Poll the next chunk from a streaming LLM response. Blocks until a chunk is available. * [nemo\_relay\_tool\_call](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-tool-call): Begin a manual tool call lifecycle span. * [nemo\_relay\_tool\_call\_end](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-tool-call-end): End a manual tool call lifecycle span. * [nemo\_relay\_tool\_call\_execute](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-tool-call-execute): Execute a tool call end-to-end: run conditional-execution guardrails (on raw args), then request intercepts, sanitize-request guardrails, execution intercepts, the callback, and sanitize-response guardrails. On rejection, only a standalone Mark event is emitted (no Start/End pair) and `GuardrailRejected` is returned. Blocks the calling thread until completion. * [nemo\_relay\_tool\_call\_execute\_v2](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-tool-call-execute-v2): Execute a tool call end-to-end with an optional external tool call ID. * [nemo\_relay\_tool\_conditional\_execution](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-tool-conditional-execution): Run the registered tool conditional execution guardrail chain. * [nemo\_relay\_tool\_request\_intercepts](/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-tool-request-intercepts): Run the registered tool request intercept chain on the given arguments. > Top-level FFI API functions exported as `extern "C"`. ## Docs - [Struct FfiStream](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/struct-ffistream.md): Opaque stream handle for consuming LLM streaming responses chunk by chunk. Use `nemo_relay_stream_next` to poll and `nemo_relay_stream_free` to release. - [Function nemo_relay_adaptive_build_cache_telemetry_event](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-build-cache-telemetry-event.md): Build one cache telemetry event as JSON. - [Function nemo_relay_adaptive_runtime_bind_scope](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-runtime-bind-scope.md): Bind ACG request rewrites to a scope. - [Function nemo_relay_adaptive_runtime_build_cache_request_facts](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-runtime-build-cache-request-facts.md): Build cache request facts as JSON. - [Function nemo_relay_adaptive_runtime_create](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-runtime-create.md): Create an owned adaptive runtime handle from config JSON. - [Function nemo_relay_adaptive_runtime_deregister](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-runtime-deregister.md): Deregister configured adaptive runtime features. - [Function nemo_relay_adaptive_runtime_register](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-runtime-register.md): Register configured adaptive runtime features. - [Function nemo_relay_adaptive_runtime_report_json](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-runtime-report-json.md): Return the runtime construction report as JSON. - [Function nemo_relay_adaptive_runtime_shutdown](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-runtime-shutdown.md): Shut down the adaptive runtime and consume its Rust runtime state. - [Function nemo_relay_adaptive_runtime_wait_for_idle](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-runtime-wait-for-idle.md): Wait until the adaptive telemetry drain has processed pending events. - [Function nemo_relay_adaptive_set_latency_sensitivity](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-set-latency-sensitivity.md): Set manual latency sensitivity on the current scope. - [Function nemo_relay_adaptive_validate_config](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-adaptive-validate-config.md): Validate an adaptive config document and return the diagnostics report as JSON. - [Function nemo_relay_anthropic_messages_codec_new](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-anthropic-messages-codec-new.md): Create a new Anthropic Messages API codec handle. - [Function nemo_relay_atif_exporter_clear](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atif-exporter-clear.md): Clears all collected events from the exporter. - [Function nemo_relay_atif_exporter_create](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atif-exporter-create.md): Creates a new ATIF exporter. - [Function nemo_relay_atif_exporter_deregister](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atif-exporter-deregister.md): Deregisters the exporter subscriber. - [Function nemo_relay_atif_exporter_export](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atif-exporter-export.md): Exports collected events as an ATIF trajectory JSON string. - [Function nemo_relay_atif_exporter_register](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atif-exporter-register.md): Registers the exporter as an event subscriber. - [Function nemo_relay_atof_exporter_create](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atof-exporter-create.md): Creates a new filesystem-backed ATOF JSONL exporter. - [Function nemo_relay_atof_exporter_create_from_json](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atof-exporter-create-from-json.md): Creates a new ATOF exporter from a JSON config object. - [Function nemo_relay_atof_exporter_deregister](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atof-exporter-deregister.md): Deregisters the ATOF exporter subscriber. - [Function nemo_relay_atof_exporter_force_flush](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atof-exporter-force-flush.md): Outside a native subscriber callback, waits for queued subscriber delivery, then flushes the configured file sink or asks the configured stream sink to drain for up to its timeout. - [Function nemo_relay_atof_exporter_path](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atof-exporter-path.md): Returns the ATOF exporter output path as a string when its sink is a file. - [Function nemo_relay_atof_exporter_register](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atof-exporter-register.md): Registers the ATOF exporter as an event subscriber. - [Function nemo_relay_atof_exporter_shutdown](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-atof-exporter-shutdown.md): Outside a native subscriber callback, waits for queued subscriber delivery, then flushes the configured file sink or asks the configured stream sink to drain and close up to its timeout. - [Function nemo_relay_capture_propagation_context_json](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-capture-propagation-context-json.md): Serialize the current causal parent as a versioned propagation context. - [Function nemo_relay_capture_propagation_context_with_root_json](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-capture-propagation-context-with-root-json.md): Serialize the current causal parent with an application-supplied root UUID. - [Function nemo_relay_capture_rootless_propagation_context_json](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-capture-rootless-propagation-context-json.md): Serialize the current causal parent without a propagation root. - [Function nemo_relay_capture_traceparent](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-capture-traceparent.md): Capture the current Relay context as a W3C `traceparent` header value. - [Function nemo_relay_deregister_conditional_middleware_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-conditional-middleware-guardrail.md): Deregister a global conditional middleware guardrail. - [Function nemo_relay_deregister_event_metadata_injector](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-event-metadata-injector.md): Deregister a global event metadata injector. - [Function nemo_relay_deregister_llm_conditional_execution_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-llm-conditional-execution-guardrail.md): Deregister an LLM conditional execution guardrail by name. - [Function nemo_relay_deregister_llm_execution_intercept](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-llm-execution-intercept.md): Deregister an LLM execution intercept by name. - [Function nemo_relay_deregister_llm_request_intercept](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-llm-request-intercept.md): Deregister an LLM request intercept by name. - [Function nemo_relay_deregister_llm_sanitize_request_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-llm-sanitize-request-guardrail.md): Deregister an LLM request sanitization guardrail by name. - [Function nemo_relay_deregister_llm_sanitize_response_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-llm-sanitize-response-guardrail.md): Deregister an LLM response sanitization guardrail by name. - [Function nemo_relay_deregister_llm_stream_execution_intercept](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-llm-stream-execution-intercept.md): Deregister an LLM streaming execution intercept by name. - [Function nemo_relay_deregister_mark_sanitize_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-mark-sanitize-guardrail.md): Deregister a global mark event sanitizer. - [Function nemo_relay_deregister_plugin](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-plugin.md): Deregister a plugin by kind. - [Function nemo_relay_deregister_scope_sanitize_end_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-scope-sanitize-end-guardrail.md): Deregister a global scope-end event sanitizer. - [Function nemo_relay_deregister_scope_sanitize_start_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-scope-sanitize-start-guardrail.md): Deregister a global scope-start event sanitizer. - [Function nemo_relay_deregister_subscriber](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-subscriber.md): Deregister an event subscriber by name. - [Function nemo_relay_deregister_tool_conditional_execution_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-tool-conditional-execution-guardrail.md): Deregister a tool conditional execution guardrail by name. - [Function nemo_relay_deregister_tool_execution_intercept](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-tool-execution-intercept.md): Deregister a tool execution intercept by name. - [Function nemo_relay_deregister_tool_request_intercept](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-tool-request-intercept.md): Deregister a tool request intercept by name. - [Function nemo_relay_deregister_tool_sanitize_request_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-tool-sanitize-request-guardrail.md): Deregister a tool request sanitization guardrail by name. - [Function nemo_relay_deregister_tool_sanitize_response_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-deregister-tool-sanitize-response-guardrail.md): Deregister a tool response sanitization guardrail by name. - [Function nemo_relay_event](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-event.md): Emit a named lifecycle event. - [Function nemo_relay_event_v2](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-event-v2.md): Emit a named lifecycle event with optional data schema and log severity. - [Function nemo_relay_flush_subscribers](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-flush-subscribers.md): Wait for subscriber callbacks queued before this call and events emitted transitively by those callbacks to finish. - [Function nemo_relay_gemini_generate_content_codec_new](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-gemini-generate-content-codec-new.md): Create a new Gemini generateContent API codec handle. - [Function nemo_relay_get_handle](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-get-handle.md): Retrieve the current scope handle from the thread-local scope stack. - [Function nemo_relay_initialize_default_logging](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-initialize-default-logging.md): Initializes the Go binding runtime and installs default operational logging. - [Function nemo_relay_list_plugin_kinds_json](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-list-plugin-kinds-json.md): Return the registered plugin kinds as JSON. - [Function nemo_relay_list_runtime_registrations](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-list-runtime-registrations.md): List global gateable runtime registrations as JSON. - [Function nemo_relay_llm_call](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-call.md): Begin a manual LLM call lifecycle span. - [Function nemo_relay_llm_call_end](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-call-end.md): End a manual LLM call lifecycle span. - [Function nemo_relay_llm_call_execute](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-call-execute.md): Execute an LLM call end-to-end: run conditional-execution guardrails (on raw request), then request intercepts, sanitize-request guardrails, execution intercepts, the callback, and sanitize-response guardrails. On rejection, only a standalone Mark event is emitted (no Start/End pair) and `GuardrailRejected` is returned. Blocks the calling thread until completion. - [Function nemo_relay_llm_conditional_execution](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-conditional-execution.md): Run the registered LLM conditional execution guardrail chain. - [Function nemo_relay_llm_request_intercept_outcome_json_new](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-request-intercept-outcome-json-new.md): Allocate canonical JSON for a C LLM request-intercept callback result. - [Function nemo_relay_llm_request_intercept_outcome_json_new_v2](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-request-intercept-outcome-json-new-v2.md): Allocate canonical JSON for a C LLM request-intercept callback result, including optional plugin-neutral optimization contributions. - [Function nemo_relay_llm_request_intercepts](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-request-intercepts.md): Run the registered LLM request intercept chain on the given request. - [Function nemo_relay_llm_sanitize_request_codec_decode](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-sanitize-request-codec-decode.md): Decode a request through a callback-scoped sanitizer codec capability. - [Function nemo_relay_llm_sanitize_request_codec_encode](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-sanitize-request-codec-encode.md): Encode normalized request changes through a callback-scoped codec capability. - [Function nemo_relay_llm_sanitize_response_codec_decode](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-sanitize-response-codec-decode.md): Decode a response through a callback-scoped sanitizer codec capability. - [Function nemo_relay_llm_stream_call_execute](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-llm-stream-call-execute.md): Execute a streaming LLM call end-to-end. Conditional-execution guardrails run first on the raw request. Returns a stream handle that can be polled with `nemo_relay_stream_next`. Blocks until the stream is set up. - [Function nemo_relay_log](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-log.md): Emits a structured operational log record for language bindings. - [Function nemo_relay_metric](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-metric.md): Emit an atomic metric measurement mark from typed C measurements. - [Function nemo_relay_metric_json](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-metric-json.md): Emit an atomic metric measurement mark from canonical JSON. - [Function nemo_relay_observability_component_spec_json](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-observability-component-spec-json.md): Wrap an observability config JSON object as a top-level plugin component. - [Function nemo_relay_observability_default_config_json](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-observability-default-config-json.md): Return the default observability plugin config as JSON. - [Function nemo_relay_observability_plugin_kind](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-observability-plugin-kind.md): Return the built-in observability plugin kind. - [Function nemo_relay_openai_chat_codec_new](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-openai-chat-codec-new.md): Create a new OpenAI Chat Completions codec handle. - [Function nemo_relay_openai_responses_codec_new](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-openai-responses-codec-new.md): Create a new OpenAI Responses API codec handle. - [Function nemo_relay_otel_log_subscriber_create](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-log-subscriber-create.md): Creates an independently managed OpenTelemetry log subscriber. - [Function nemo_relay_otel_log_subscriber_create_v2](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-log-subscriber-create-v2.md): Creates an independently managed OpenTelemetry log subscriber with `header_env` support. - [Function nemo_relay_otel_log_subscriber_deregister](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-log-subscriber-deregister.md): Deregisters a subscriber by name from the shared subscriber registry. - [Function nemo_relay_otel_log_subscriber_force_flush](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-log-subscriber-force-flush.md): Flushes queued Relay events and OTLP log batches. - [Function nemo_relay_otel_log_subscriber_register](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-log-subscriber-register.md): Registers an OpenTelemetry log subscriber globally. - [Function nemo_relay_otel_log_subscriber_runtime_diagnostics_json](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-log-subscriber-runtime-diagnostics-json.md): Return a bounded JSON snapshot of runtime diagnostics for this subscriber. - [Function nemo_relay_otel_log_subscriber_shutdown](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-log-subscriber-shutdown.md): Shuts down the OpenTelemetry logger provider. - [Function nemo_relay_otel_metric_subscriber_create](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-metric-subscriber-create.md): Creates an independently managed OpenTelemetry metric subscriber. - [Function nemo_relay_otel_metric_subscriber_create_v2](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-metric-subscriber-create-v2.md): Creates an independently managed OpenTelemetry metric subscriber with `header_env` support. - [Function nemo_relay_otel_metric_subscriber_deregister](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-metric-subscriber-deregister.md): Deregisters a subscriber by name from the shared subscriber registry. - [Function nemo_relay_otel_metric_subscriber_force_flush](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-metric-subscriber-force-flush.md): Flushes queued Relay events and collects current metric aggregates. - [Function nemo_relay_otel_metric_subscriber_register](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-metric-subscriber-register.md): Registers an OpenTelemetry metric subscriber globally. - [Function nemo_relay_otel_metric_subscriber_runtime_diagnostics_json](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-metric-subscriber-runtime-diagnostics-json.md): Return a bounded JSON snapshot of runtime diagnostics for this subscriber. - [Function nemo_relay_otel_metric_subscriber_shutdown](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-metric-subscriber-shutdown.md): Shuts down the OpenTelemetry meter provider and performs final collection. - [Function nemo_relay_otel_subscriber_create](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-create.md): Creates one typed OpenTelemetry exporter subscriber. - [Function nemo_relay_otel_subscriber_create_file_sink](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-create-file-sink.md): Creates one typed OpenTelemetry exporter subscriber that writes OTLP to a file. - [Function nemo_relay_otel_subscriber_create_with_projection_options](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-create-with-projection-options.md): Creates one typed OpenTelemetry exporter subscriber with projection controls. - [Function nemo_relay_otel_subscriber_create_with_projection_options_v2](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-create-with-projection-options-v2.md): Creates one typed OpenTelemetry exporter subscriber with projection, metadata, and lineage controls. - [Function nemo_relay_otel_subscriber_create_with_projection_options_v3](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-create-with-projection-options-v3.md): Creates one typed OpenTelemetry exporter subscriber with projection, metadata, and lineage controls. - [Function nemo_relay_otel_subscriber_create_with_projection_options_v4](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-create-with-projection-options-v4.md): Creates one typed OpenTelemetry exporter subscriber with projection and metadata controls. - [Function nemo_relay_otel_subscriber_create_with_projection_options_v5](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-create-with-projection-options-v5.md): Creates one typed OpenTelemetry exporter subscriber with projection, metadata, resource-promotion, and lineage controls. - [Function nemo_relay_otel_subscriber_deregister](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-deregister.md): Deregisters the OpenTelemetry subscriber by name. - [Function nemo_relay_otel_subscriber_force_flush](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-force-flush.md): Forces a flush of finished spans through the exporter. - [Function nemo_relay_otel_subscriber_register](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-register.md): Registers the OpenTelemetry subscriber as an event subscriber. - [Function nemo_relay_otel_subscriber_runtime_diagnostics_json](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-runtime-diagnostics-json.md): Return a bounded JSON snapshot of runtime diagnostics for this subscriber. - [Function nemo_relay_otel_subscriber_shutdown](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-otel-subscriber-shutdown.md): Shuts down the underlying tracer provider. - [Function nemo_relay_plugin_context_register_event_metadata_injector](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-event-metadata-injector.md): Register an event metadata injector into a plugin context. - [Function nemo_relay_plugin_context_register_llm_conditional_execution_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-llm-conditional-execution-guardrail.md): Register an LLM conditional-execution guardrail into the plugin registration context. - [Function nemo_relay_plugin_context_register_llm_execution_intercept](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-llm-execution-intercept.md): Register an LLM execution intercept into the plugin registration context. - [Function nemo_relay_plugin_context_register_llm_request_intercept](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-llm-request-intercept.md): Register an LLM request intercept into the plugin registration context. - [Function nemo_relay_plugin_context_register_llm_sanitize_request_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-llm-sanitize-request-guardrail.md): Register an LLM sanitize-request guardrail into the plugin registration context. - [Function nemo_relay_plugin_context_register_llm_sanitize_response_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-llm-sanitize-response-guardrail.md): Register an LLM sanitize-response guardrail into the plugin registration context. - [Function nemo_relay_plugin_context_register_llm_stream_execution_intercept](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-llm-stream-execution-intercept.md): Register an LLM stream execution intercept into the plugin registration context. - [Function nemo_relay_plugin_context_register_mark_sanitize_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-mark-sanitize-guardrail.md): Register a mark event sanitizer into a plugin context. - [Function nemo_relay_plugin_context_register_scope_sanitize_end_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-scope-sanitize-end-guardrail.md): Register a scope-end event sanitizer into a plugin context. - [Function nemo_relay_plugin_context_register_scope_sanitize_start_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-scope-sanitize-start-guardrail.md): Register a scope-start event sanitizer into a plugin context. - [Function nemo_relay_plugin_context_register_subscriber](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-subscriber.md): Register an event subscriber into the plugin registration context. - [Function nemo_relay_plugin_context_register_tool_conditional_execution_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-tool-conditional-execution-guardrail.md): Register a tool conditional-execution guardrail into the plugin registration context. - [Function nemo_relay_plugin_context_register_tool_execution_intercept](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-tool-execution-intercept.md): Register a tool execution intercept into the plugin registration context. - [Function nemo_relay_plugin_context_register_tool_request_intercept](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-tool-request-intercept.md): Register a tool request intercept into the plugin registration context. - [Function nemo_relay_plugin_context_register_tool_sanitize_request_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-tool-sanitize-request-guardrail.md): Register a tool sanitize-request guardrail into the plugin registration context. - [Function nemo_relay_plugin_context_register_tool_sanitize_response_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-context-register-tool-sanitize-response-guardrail.md): Register a tool sanitize-response guardrail into the plugin registration context. - [Function nemo_relay_plugin_host_activation_close](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-host-activation-close.md): Close one owned plugin-host activation. - [Function nemo_relay_plugin_host_activation_is_active](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-host-activation-is-active.md): Report whether an owned plugin-host activation is still active. - [Function nemo_relay_plugin_host_activation_report_json](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-host-activation-report-json.md): Return the current report retained by an owned plugin-host activation. - [Function nemo_relay_plugin_initialize](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-initialize.md): Initialize the unified static and dynamic plugin host from core-owned `plugins.toml` discovery. - [Function nemo_relay_plugin_validate](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-validate.md): Validate dynamic plugins without loading plugin code or acquiring the host lease. - [Function nemo_relay_plugin_validate_exact](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-plugin-validate-exact.md): Validate only the supplied static plugin configuration. - [Function nemo_relay_pop_scope](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-pop-scope.md): Pop a scope from the scope stack by its handle. - [Function nemo_relay_propagation_context_normalize_json](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-propagation-context-normalize-json.md): Validate and canonicalize propagation-context JSON for transport. - [Function nemo_relay_propagation_context_to_traceparent](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-propagation-context-to-traceparent.md): Convert a rooted propagation-context JSON value to a W3C `traceparent`. - [Function nemo_relay_push_scope](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-push-scope.md): Push a new scope onto the scope stack. - [Function nemo_relay_register_conditional_middleware_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-conditional-middleware-guardrail.md): Register a global conditional middleware guardrail. - [Function nemo_relay_register_event_metadata_injector](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-event-metadata-injector.md): Register a global event metadata injector. - [Function nemo_relay_register_llm_conditional_execution_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-llm-conditional-execution-guardrail.md): Register an LLM conditional execution guardrail. The callback decides whether an LLM call should proceed. - [Function nemo_relay_register_llm_execution_intercept](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-llm-execution-intercept.md): Register an LLM execution intercept following the middleware chain pattern. The callback receives `(name, request, context, next_fn, next_ctx)` - call `next_fn(request, next_ctx)` to invoke the next intercept or the original LLM call, or skip calling it to short-circuit. - [Function nemo_relay_register_llm_request_intercept](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-llm-request-intercept.md): Register an LLM request intercept. The callback can transform the `LlmRequest` before it reaches the LLM provider. - [Function nemo_relay_register_llm_sanitize_request_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-llm-sanitize-request-guardrail.md): Register an LLM request sanitizer. The callback receives the emitted request first and per-call codec context second; null omits observability. - [Function nemo_relay_register_llm_sanitize_response_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-llm-sanitize-response-guardrail.md): Register an LLM response sanitization guardrail. The callback can inspect and modify the LLM response after it is received. - [Function nemo_relay_register_llm_stream_execution_intercept](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-llm-stream-execution-intercept.md): Register an LLM streaming execution intercept following the middleware chain pattern. The callback receives `(name, request, context, next_fn, next_ctx)` - call `next_fn(request, next_ctx)` to invoke the next intercept or the original streaming LLM call, or skip calling it to short-circuit. The response codec in `context` is null because chunks are not complete provider responses. - [Function nemo_relay_register_mark_sanitize_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-mark-sanitize-guardrail.md): Register a global mark event sanitizer. - [Function nemo_relay_register_plugin](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-plugin.md): Register a plugin backed by foreign callbacks. - [Function nemo_relay_register_scope_sanitize_end_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-scope-sanitize-end-guardrail.md): Register a global scope-end event sanitizer. - [Function nemo_relay_register_scope_sanitize_start_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-scope-sanitize-start-guardrail.md): Register a global scope-start event sanitizer. - [Function nemo_relay_register_subscriber](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-subscriber.md): Register an event subscriber. The callback is invoked for every lifecycle event emitted by the runtime. - [Function nemo_relay_register_tool_conditional_execution_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-tool-conditional-execution-guardrail.md): Register a tool conditional execution guardrail. The callback decides whether a tool call should proceed. Returns an error message to reject, or null to allow. - [Function nemo_relay_register_tool_execution_intercept](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-tool-execution-intercept.md): Register a tool execution intercept following the middleware chain pattern. The callback receives `(context_json, next_fn, next_ctx)`, where `context_json` contains `tool_name`, `args`, and `tool_call_id`. - [Function nemo_relay_register_tool_request_intercept](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-tool-request-intercept.md): Register a tool request intercept. The callback can transform tool arguments before execution. Runs after request guardrails in the middleware pipeline. - [Function nemo_relay_register_tool_sanitize_request_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-tool-sanitize-request-guardrail.md): Register a tool request sanitization guardrail. The callback can inspect and modify tool arguments before the tool executes. - [Function nemo_relay_register_tool_sanitize_response_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-register-tool-sanitize-response-guardrail.md): Register a tool response sanitization guardrail. The callback can inspect and modify tool results after the tool executes. - [Function nemo_relay_resource_metrics_collect_free](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-resource-metrics-collect-free.md): Release a collection handle and cancel its pending wait. - [Function nemo_relay_resource_metrics_collect_poll](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-resource-metrics-collect-poll.md): Check a collection without blocking. `out_done` is false while pending. - [Function nemo_relay_resource_metrics_collect_start](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-resource-metrics-collect-start.md): Start an asynchronous resource metrics collection using the active plugin. - [Function nemo_relay_scope_deregister_event_metadata_injector](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-event-metadata-injector.md): Deregister an event metadata injector owned by an active scope. - [Function nemo_relay_scope_deregister_llm_conditional_execution_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-llm-conditional-execution-guardrail.md): Deregister a scope-local LLM conditional execution guardrail by name. - [Function nemo_relay_scope_deregister_llm_execution_intercept](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-llm-execution-intercept.md): Deregister a scope-local LLM execution intercept by name. - [Function nemo_relay_scope_deregister_llm_request_intercept](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-llm-request-intercept.md): Deregister a scope-local LLM request intercept by name. - [Function nemo_relay_scope_deregister_llm_sanitize_request_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-llm-sanitize-request-guardrail.md): Deregister a scope-local LLM request sanitization guardrail by name. - [Function nemo_relay_scope_deregister_llm_sanitize_response_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-llm-sanitize-response-guardrail.md): Deregister a scope-local LLM response sanitization guardrail by name. - [Function nemo_relay_scope_deregister_llm_stream_execution_intercept](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-llm-stream-execution-intercept.md): Deregister a scope-local LLM streaming execution intercept by name. - [Function nemo_relay_scope_deregister_mark_sanitize_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-mark-sanitize-guardrail.md): Deregister a scope-local mark event sanitizer. - [Function nemo_relay_scope_deregister_scope_sanitize_end_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-scope-sanitize-end-guardrail.md): Deregister a scope-local scope-end event sanitizer. - [Function nemo_relay_scope_deregister_scope_sanitize_start_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-scope-sanitize-start-guardrail.md): Deregister a scope-local scope-start event sanitizer. - [Function nemo_relay_scope_deregister_subscriber](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-subscriber.md): Deregister a scope-local event subscriber by name. - [Function nemo_relay_scope_deregister_tool_conditional_execution_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-tool-conditional-execution-guardrail.md): Deregister a scope-local tool conditional execution guardrail by name. - [Function nemo_relay_scope_deregister_tool_execution_intercept](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-tool-execution-intercept.md): Deregister a scope-local tool execution intercept by name. - [Function nemo_relay_scope_deregister_tool_request_intercept](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-tool-request-intercept.md): Deregister a scope-local tool request intercept by name. - [Function nemo_relay_scope_deregister_tool_sanitize_request_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-tool-sanitize-request-guardrail.md): Deregister a scope-local tool request sanitization guardrail by name. - [Function nemo_relay_scope_deregister_tool_sanitize_response_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-deregister-tool-sanitize-response-guardrail.md): Deregister a scope-local tool response sanitization guardrail by name. - [Function nemo_relay_scope_register_event_metadata_injector](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-event-metadata-injector.md): Register an event metadata injector owned by an active scope. - [Function nemo_relay_scope_register_llm_conditional_execution_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-llm-conditional-execution-guardrail.md): Register a scope-local LLM conditional execution guardrail. - [Function nemo_relay_scope_register_llm_execution_intercept](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-llm-execution-intercept.md): Register a scope-local LLM execution intercept following the middleware chain pattern. The callback receives `(name, request, context, next_fn, next_ctx)`. - [Function nemo_relay_scope_register_llm_request_intercept](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-llm-request-intercept.md): Register a scope-local LLM request intercept. - [Function nemo_relay_scope_register_llm_sanitize_request_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-llm-sanitize-request-guardrail.md): Register a scope-local LLM request sanitization guardrail. - [Function nemo_relay_scope_register_llm_sanitize_response_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-llm-sanitize-response-guardrail.md): Register a scope-local LLM response sanitization guardrail. - [Function nemo_relay_scope_register_llm_stream_execution_intercept](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-llm-stream-execution-intercept.md): Register a scope-local LLM streaming execution intercept following the middleware chain pattern. The callback receives `(name, request, context, next_fn, next_ctx)`. The response codec in `context` is null. - [Function nemo_relay_scope_register_mark_sanitize_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-mark-sanitize-guardrail.md): Register a scope-local mark event sanitizer. - [Function nemo_relay_scope_register_scope_sanitize_end_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-scope-sanitize-end-guardrail.md): Register a scope-local scope-end event sanitizer. - [Function nemo_relay_scope_register_scope_sanitize_start_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-scope-sanitize-start-guardrail.md): Register a scope-local scope-start event sanitizer. - [Function nemo_relay_scope_register_subscriber](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-subscriber.md): Register a scope-local event subscriber. - [Function nemo_relay_scope_register_tool_conditional_execution_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-tool-conditional-execution-guardrail.md): Register a scope-local tool conditional execution guardrail. - [Function nemo_relay_scope_register_tool_execution_intercept](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-tool-execution-intercept.md): Register a scope-local tool execution intercept following the middleware chain pattern. - [Function nemo_relay_scope_register_tool_request_intercept](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-tool-request-intercept.md): Register a scope-local tool request intercept. - [Function nemo_relay_scope_register_tool_sanitize_request_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-tool-sanitize-request-guardrail.md): Register a scope-local tool request sanitization guardrail. - [Function nemo_relay_scope_register_tool_sanitize_response_guardrail](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-register-tool-sanitize-response-guardrail.md): Register a scope-local tool response sanitization guardrail. - [Function nemo_relay_scope_stack_active](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-stack-active.md): Returns whether the current execution context has an explicitly-initialized scope stack. - [Function nemo_relay_scope_stack_capture_thread](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-stack-capture-thread.md): Capture the current thread-local scope stack binding. - [Function nemo_relay_scope_stack_create](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-stack-create.md): Create a new isolated scope stack with its own root scope. - [Function nemo_relay_scope_stack_create_from_propagation_json](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-stack-create-from-propagation-json.md): Create an isolated scope stack from propagation-context JSON. - [Function nemo_relay_scope_stack_restore_thread](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-stack-restore-thread.md): Restore and free a captured thread-local scope stack binding. - [Function nemo_relay_scope_stack_set_thread](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-scope-stack-set-thread.md): Bind an isolated scope stack to the current OS thread. - [Function nemo_relay_shutdown_default_logging](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-shutdown-default-logging.md): Shuts down and releases the default operational logging runtime. - [Function nemo_relay_stream_close](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-stream-close.md): Stop a stream producer and wait for cleanup to complete. - [Function nemo_relay_stream_free](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-stream-free.md): Free a stream handle and release its resources. - [Function nemo_relay_stream_next](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-stream-next.md): Poll the next chunk from a streaming LLM response. Blocks until a chunk is available. - [Function nemo_relay_tool_call](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-tool-call.md): Begin a manual tool call lifecycle span. - [Function nemo_relay_tool_call_end](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-tool-call-end.md): End a manual tool call lifecycle span. - [Function nemo_relay_tool_call_execute](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-tool-call-execute.md): Execute a tool call end-to-end: run conditional-execution guardrails (on raw args), then request intercepts, sanitize-request guardrails, execution intercepts, the callback, and sanitize-response guardrails. On rejection, only a standalone Mark event is emitted (no Start/End pair) and `GuardrailRejected` is returned. Blocks the calling thread until completion. - [Function nemo_relay_tool_call_execute_v2](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-tool-call-execute-v2.md): Execute a tool call end-to-end with an optional external tool call ID. - [Function nemo_relay_tool_conditional_execution](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-tool-conditional-execution.md): Run the registered tool conditional execution guardrail chain. - [Function nemo_relay_tool_request_intercepts](https://docs.nvidia.com/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-ffi/api/fn-nemo-relay-tool-request-intercepts.md): Run the registered tool request intercept chain on the given arguments.