# `LLMProxy.Response`
[🔗](https://github.com/elixir-vibe/llm_proxy/blob/v0.3.1/lib/llm_proxy/response.ex#L1)

Internal non-stream LLMProxy response.

The generated model turn is stored as a canonical `ReqLLM.Response` struct.
HTTP routes render protocol wire maps at the boundary with `to_openai/1`.

# `t`

```elixir
@type t() :: %LLMProxy.Response{
  cache_hit: boolean(),
  cache_ttl_ms: pos_integer() | nil,
  cacheable: boolean(),
  message: ReqLLM.Response.t(),
  model: String.t(),
  provider: module(),
  provider_name: String.t() | nil,
  provider_response: term(),
  request: LLMProxy.Protocol.Request.t(),
  trace_id: String.t() | nil,
  usage: LLMProxy.Usage.t()
}
```

# `put_text`

```elixir
@spec put_text(t(), String.t()) :: t()
```

# `to_openai`

```elixir
@spec to_openai(t()) :: map()
```

# `to_openai_chat_completion`

```elixir
@spec to_openai_chat_completion(
  ReqLLM.Response.t(),
  String.t(),
  String.t(),
  LLMProxy.Usage.t() | map() | nil,
  String.t() | nil,
  pos_integer() | nil
) :: map()
```

# `to_responses`

```elixir
@spec to_responses(ReqLLM.Response.t(), String.t(), pos_integer() | nil) :: map()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
