# Class LittleGhost::ModelResponse

Documentation version: Edge

Canonical HTML: https://littleghostai.org/docs/LittleGhost/ModelResponse.html

Represents the final result shared by every provider stream. It keeps
provider-specific response shapes out of the agent loop.

## Inheritance

`LittleGhost::ModelResponse < Data`

## Attributes

<a id="attribute-i-message"></a>
### `message` (R)

The normalized assistant Message.

<a id="attribute-i-metadata"></a>
### `metadata` (R)

Provider-specific response metadata with a frozen outer Hash. Nested values
are retained and must not be mutated by callers.

<a id="attribute-i-stop_reason"></a>
### `stop_reason` (R)

The normalized reason the model stopped.

<a id="attribute-i-usage"></a>
### `usage` (R)

Provider-independent token usage for this response.

## Class methods

<a id="method-c-new"></a>
### `.new`

```ruby
new(message:, stop_reason:, usage: Usage.new, metadata: {}) -> ModelResponse
```

Coerces `message` to Message, normalizes `stop_reason` to a Symbol, and
freezes the outer `metadata` Hash.
