> 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 full documentation content, see https://docs.nvidia.com/nemo/relay/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/relay/_mcp/server.

# Module request

> LLM request codec types and trait.

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

LLM request codec types and trait.

This module defines the [`AnnotatedLlmRequest`](/reference/api/rust-library-reference/nemo-relay/codec/request/struct-annotatedllmrequest) type system for structured LLM request representation and the [`crate::codec::traits::LlmCodec`](/reference/api/rust-library-reference/nemo-relay/codec/traits/trait-llmcodec) trait for bidirectional translation between opaque [`crate::api::llm::LlmRequest`](/reference/api/rust-library-reference/nemo-relay/api/llm/struct-llmrequest) payloads and typed form.

## Structs

* [AnnotatedLlmRequest](/reference/api/rust-library-reference/nemo-relay/codec/request/struct-annotatedllmrequest): Structured view of an LLM request, produced by a Codec from opaque [`LlmRequest`](/reference/api/rust-library-reference/nemo-relay/api/llm/struct-llmrequest) content.
* [FunctionCall](/reference/api/rust-library-reference/nemo-relay/codec/request/struct-functioncall): A function call within a tool call.
* [FunctionDefinition](/reference/api/rust-library-reference/nemo-relay/codec/request/struct-functiondefinition): A function definition within a tool definition.
* [GenerationParams](/reference/api/rust-library-reference/nemo-relay/codec/request/struct-generationparams): Normalized generation parameters across providers.
* [OpenAiImageUrl](/reference/api/rust-library-reference/nemo-relay/codec/request/struct-openaiimageurl): OpenAI image URL payload.
* [ToolCall](/reference/api/rust-library-reference/nemo-relay/codec/request/struct-toolcall): A tool call requested by the assistant.
* [ToolChoiceFunction](/reference/api/rust-library-reference/nemo-relay/codec/request/struct-toolchoicefunction): A specific tool choice that forces a named function.
* [ToolChoiceFunctionName](/reference/api/rust-library-reference/nemo-relay/codec/request/struct-toolchoicefunctionname): The name component of a specific tool choice.
* [ToolDefinition](/reference/api/rust-library-reference/nemo-relay/codec/request/struct-tooldefinition): A tool definition (function schema) available to the model.

## Enums

* [ContentPart](/reference/api/rust-library-reference/nemo-relay/codec/request/enum-contentpart): A single content part within a multimodal message.
* [Message](/reference/api/rust-library-reference/nemo-relay/codec/request/enum-message): A single message in a conversation, tagged by role.
* [MessageContent](/reference/api/rust-library-reference/nemo-relay/codec/request/enum-messagecontent): Message content: either a plain string or multimodal parts array.
* [ToolChoice](/reference/api/rust-library-reference/nemo-relay/codec/request/enum-toolchoice): Tool choice control: how the model should use available tools.