Skip to main content

Module context

Module context 

Source
Expand description

Request-level context shared between conversion paths.

ResponseRequestContext captures the original Responses API request fields needed to reconstruct a spec-compliant response (instructions, tools, sampling params, etc.). It is consumed by both streaming and non-streaming flows, so it lives at the convert root rather than under streaming::state.

Structsยง

ResponseRequestContext
Fields from the originating Responses API request that the proxy must echo back on the synthesized Response payload (and intermediate stream stubs). Kept separate from StreamState so non-streaming flows can use it without dragging streaming-specific bookkeeping.