Pixir.Provider.ResponsesExtensions (pixir v0.1.12)

Copy Markdown View Source

Responses wire and strict-open runtime policy.

Request shaping is derived only from the frozen ResponsesBackend snapshot; it never consults a model, endpoint, Registry, or prior request. The strict-open path validates every known event against the generated pinned schema before applying the exact event-family-owned local correlation limits and portable output policy; same-named additional properties outside those owners remain ignored, and neither layer retains remote payload values. The first open_responses profile has an empty extension set and fixed reasoning/nonportable-content boundaries, while the default ChatGPT/Codex wire keeps its ordered policy and reducer.

Summary

Functions

Whether the immutable snapshot permits a typed request extension.

Safe sorted extension ids applied by this backend snapshot.

Return the fixed ordered non-auth headers for a backend mode.

Safe sorted extension ids omitted by this backend snapshot.

Project the folded input without changing content bytes or non-message items.

Validate requested capabilities before routing, body construction, Auth, or transport.

Validate pinned schema, local limits, and portability for one strict-open event.

Functions

allowed?(backend, extension)

@spec allowed?(Pixir.Providers.ResponsesBackend.t(), atom()) :: boolean()

Whether the immutable snapshot permits a typed request extension.

applied_ids(backend)

@spec applied_ids(Pixir.Providers.ResponsesBackend.t()) :: [String.t()]

Safe sorted extension ids applied by this backend snapshot.

headers(backend)

Return the fixed ordered non-auth headers for a backend mode.

omitted_ids(backend)

@spec omitted_ids(Pixir.Providers.ResponsesBackend.t()) :: [String.t()]

Safe sorted extension ids omitted by this backend snapshot.

project_input(backend, items)

@spec project_input(Pixir.Providers.ResponsesBackend.t(), [map()]) :: [map()]

Project the folded input without changing content bytes or non-message items.

validate_request(backend, request, reasoning_effort)

@spec validate_request(Pixir.Providers.ResponsesBackend.t(), map(), term()) ::
  :ok | {:error, map()}

Validate requested capabilities before routing, body construction, Auth, or transport.

validate_stream_event(event)

@spec validate_stream_event(map()) ::
  {:ok, :known | :unknown}
  | {:error, atom()}
  | {:unsupported, :reasoning | :nonportable_output_item | :nonportable_content}

Validate pinned schema, local limits, and portability for one strict-open event.