# `Pixir.Provider.Connection`
[🔗](https://github.com/Ranvier-Technologies/pixir/blob/main/lib/pixir/provider/connection.ex#L1)

Per-key WebSocket connection process for the Responses Provider.

The process owns connection-local optimization state: socket, latest
`previous_response_id`, prompt input prefix, keepalive timers, and temporary
degraded/backoff state. It does not own Session History. If continuation state is
missing or invalid, the caller can still replay from Pixir's Log over HTTP/SSE or a
fresh WebSocket. The default idle window is deliberately agent-scale so ordinary
pauses between Turns do not erase same-socket continuation evidence. Long provider
streams are governed by stream watchdogs, not by a short caller-side
`GenServer.call` deadline.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `start_link`

# `stream`

```elixir
@spec stream(term(), map(), acc, (term(), acc -&gt; acc), keyword()) ::
  {:ok, acc} | {:error, map(), acc}
when acc: term()
```

# `via`

---

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