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

Opaque, request-scoped routing policy for the Responses Provider.

Routing is resolved once from an already selected `ResponsesBackend` plus the
Provider's programmatic options. The value keeps the exact validated HTTP endpoint
private while exposing only redacted summaries and transport capabilities. It never
selects credentials and never activates a staged backend.

A legacy injected `:transport` is treated as an HTTP/SSE seam. The resolved policy
records both the requested and effective transports so Provider integration can pass
one frozen decision to `TransportPolicy` without rereading application config.

# `t`

```elixir
@opaque t()
```

Opaque Responses route and transport decision.

# `allowed_transports`

```elixir
@spec allowed_transports(t()) :: [:websocket | :http_sse]
```

Ordered transport capability set advertised by the selected backend.

# `apply_to_opts`

```elixir
@spec apply_to_opts(
  t(),
  keyword()
) :: keyword()
```

Attach the opaque route and its effective transport to Provider options.

# `effective_transport`

```elixir
@spec effective_transport(t()) :: :auto | :websocket | :http_sse
```

Transport policy to execute for this frozen route.

# `http_url`

```elixir
@spec http_url(t()) :: String.t()
```

Validated final HTTP(S) Responses URL. Keep this request-internal.

# `requested_transport`

```elixir
@spec requested_transport(t()) :: :auto | :websocket | :http_sse
```

Transport requested before capability and injected-seam resolution.

# `resolve`

```elixir
@spec resolve(
  Pixir.Providers.ResponsesBackend.t(),
  keyword()
) :: {:ok, t()} | {:error, map()}
```

Resolve one final Responses route and effective transport policy.

# `source`

```elixir
@spec source(t()) :: :default | :legacy_base_url | :base_url | :responses_url
```

Safe provenance of the final route.

# `summary`

```elixir
@spec summary(term()) :: map() | :invalid
```

Redacted, JSON-friendly routing projection.

# `validate_binding`

```elixir
@spec validate_binding(t(), Pixir.Providers.ResponsesBackend.t()) ::
  :ok | {:error, map()}
```

Verify that an opaque route remains bound to the selected backend.

# `websocket_url`

```elixir
@spec websocket_url(t()) :: String.t() | nil
```

Resolved ChatGPT WebSocket URL, or `nil` for an HTTP/SSE-only backend.

---

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