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

# Function llm_call_end

> Finish a manual LLM lifecycle span.

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

<pre />

Finish a manual LLM lifecycle span.

This emits an LLM-end event for a handle previously returned by [`llm_call`](/reference/api/rust-library-reference/nemo-relay/api/llm/fn-llm-call).

## Parameters

* `handle`: LLM handle to close.
* `response`: Raw provider response associated with the end event.
* `data`: Optional application payload retained for compatibility. The emitted end event data is the sanitized `response` unless it sanitizes to JSON null, in which case this payload is used.
* `metadata`: Optional JSON metadata recorded on the end event.
* `annotated_response`: Optional normalized response annotation produced by a response codec. When omitted and `response_codec` is supplied, the annotation is decoded from the sanitized end-event payload.
* `response_codec`: Optional response codec used to produce a normalized response annotation from the sanitized end-event payload.
* `timestamp`: Optional timestamp recorded on the emitted end event. When `None`, the runtime uses the current UTC time, or one microsecond after the handle start time if the current time is not later.

## Returns

A [`Result`](/reference/api/rust-library-reference/nemo-relay/error/type-result) that is `Ok(())` when the end event has been emitted.

## Errors

Returns an error when the runtime owner check fails, internal state cannot be read safely, or response codec decoding fails.

## Notes

Sanitize-response guardrails affect only the emitted end-event payload, not the caller-owned `response` value.