> This page is for NeMo Relay, version dev.
> For other versions, use one of these documentation indexes:
> - Latest (v0.11.1) (default): https://docs.nvidia.com/nemo/relay/latest/llms.txt
> - dev: https://docs.nvidia.com/nemo/relay/dev/llms.txt
> - v0.11.1: https://docs.nvidia.com/nemo/relay/v0.11.1/llms.txt
> - v0.10.4: https://docs.nvidia.com/nemo/relay/v0.10.4/llms.txt
> - v0.9.4: https://docs.nvidia.com/nemo/relay/v0.9.4/llms.txt
> - v0.8.4: https://docs.nvidia.com/nemo/relay/v0.8.4/llms.txt
> - v0.7.3: https://docs.nvidia.com/nemo/relay/v0.7.3/llms.txt

> 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 Cost Estimate

> Normalized monetary cost with provenance for estimates and provider-reported values.

Generated from `cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker`.

<pre />

Normalized monetary cost with provenance for estimates and provider-reported values.

## Fields

### `total: Option<f64>`

Total cost in `currency`.

### `currency: String`

ISO 4217 currency code for the cost fields.

### `input: Option<f64>`

Uncached prompt/input token cost in `currency`.

### `output: Option<f64>`

Completion/output token cost in `currency`.

### `cache_read: Option<f64>`

Prompt cache read cost in `currency`.

### `cache_write: Option<f64>`

Prompt cache write cost in `currency`.

### `source: i32`

Origin of this cost value.

### `pricing_provider: Option<String>`

Provider associated with the cost or pricing estimate, if known.

### `pricing_model: Option<String>`

Model ID associated with the cost or pricing estimate, if known.

### `pricing_as_of: Option<String>`

Date the pricing value was last verified, if known.

### `pricing_source: Option<String>`

Source URL or label for the pricing value, if known.

## Implementations

### `impl CostEstimate`

<pre />

#### `total`

<pre />

Returns the value of `total`, or the default value if `total` is unset.

#### `input`

<pre />

Returns the value of `input`, or the default value if `input` is unset.

#### `output`

<pre />

Returns the value of `output`, or the default value if `output` is unset.

#### `cache_read`

<pre />

Returns the value of `cache_read`, or the default value if `cache_read` is unset.

#### `cache_write`

<pre />

Returns the value of `cache_write`, or the default value if `cache_write` is unset.

#### `source`

<pre />

Returns the enum value of `source`, or the default if the field is set to an invalid enum value.

#### `set_source`

<pre />

Sets `source` to the provided enum value.

#### `pricing_provider`

<pre />

Returns the value of `pricing_provider`, or the default value if `pricing_provider` is unset.

#### `pricing_model`

<pre />

Returns the value of `pricing_model`, or the default value if `pricing_model` is unset.

#### `pricing_as_of`

<pre />

Returns the value of `pricing_as_of`, or the default value if `pricing_as_of` is unset.

#### `pricing_source`

<pre />

Returns the value of `pricing_source`, or the default value if `pricing_source` is unset.

## Trait Implementations

### `impl Clone for CostEstimate`

<pre />

#### `clone`

<pre />

#### `clone_from`

<pre />

### `impl Debug for CostEstimate`

<pre />

#### `fmt`

<pre />

### `impl Default for CostEstimate`

<pre />

#### `default`

<pre />

### `impl Message for CostEstimate`

<pre />

#### `encoded_len`

<pre />

#### `clear`

<pre />

#### `encode`

<pre />

#### `encode_to_vec`

<pre />

#### `encode_length_delimited`

<pre />

#### `encode_length_delimited_to_vec`

<pre />

#### `decode`

<pre />

#### `decode_length_delimited`

<pre />

#### `merge`

<pre />

#### `merge_length_delimited`

<pre />

### `impl Name for CostEstimate`

<pre />

#### `NAME`

<pre />

#### `PACKAGE`

<pre />

#### `full_name`

<pre />

#### `type_url`

<pre />

### `impl PartialEq for CostEstimate`

<pre />

#### `eq`

<pre />

#### `ne`

<pre />

### `impl WireValue<CostEstimate> for CostEstimate`

<pre />

#### `to_wire`

<pre />

#### `from_wire`

<pre />

### `impl StructuralPartialEq for CostEstimate`

<pre />