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

# Struct LlmOptimization Kind

> Open, forward-compatible optimization classification.

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

```rust
pub struct LlmOptimizationKind(/* private fields */);
```

Open, forward-compatible optimization classification.

This is intentionally a string-backed newtype rather than a closed enum: third-party optimization kinds must deserialize and round-trip losslessly before Relay knows about them. Standard constants and constructors provide enum-like ergonomics without making new producers wait for a core release.

## Implementations

### `impl LlmOptimizationKind`

<pre />

#### `INPUT_COMPRESSION`

<pre />

A request transformation that reduces input tokens.

#### `MODEL_ROUTING`

<pre />

A routing decision that changes the model serving a request.

#### `new`

<pre />

Preserve an arbitrary producer-defined kind on the wire.

#### `as_str`

<pre />

Return the exact wire value.

#### `input_compression`

<pre />

Construct the standard input-compression kind.

#### `model_routing`

<pre />

Construct the standard model-routing kind.

## Trait Implementations

### `impl Clone for LlmOptimizationKind`

<pre />

#### `clone`

<pre />

#### `clone_from`

<pre />

### `impl Debug for LlmOptimizationKind`

<pre />

#### `fmt`

<pre />

### `impl<'de> Deserialize<'de> for LlmOptimizationKind`

<pre />

#### `deserialize`

<pre />

### `impl From<&str> for LlmOptimizationKind`

<pre />

#### `from`

<pre />

### `impl From<String> for LlmOptimizationKind`

<pre />

#### `from`

<pre />

### `impl Hash for LlmOptimizationKind`

<pre />

#### `hash`

<pre />

#### `hash_slice`

<pre />

### `impl Ord for LlmOptimizationKind`

<pre />

#### `cmp`

<pre />

#### `max`

<pre />

#### `min`

<pre />

#### `clamp`

<pre />

### `impl PartialEq for LlmOptimizationKind`

<pre />

#### `eq`

<pre />

#### `ne`

<pre />

### `impl PartialOrd for LlmOptimizationKind`

<pre />

#### `partial_cmp`

<pre />

#### `lt`

<pre />

#### `le`

<pre />

#### `gt`

<pre />

#### `ge`

<pre />

### `impl Serialize for LlmOptimizationKind`

<pre />

#### `serialize`

<pre />

### `impl Eq for LlmOptimizationKind`

<pre />

### `impl StructuralPartialEq for LlmOptimizationKind`

<pre />