Skip to content

Function: sanitizeOpenResponsesRequest()

sanitizeOpenResponsesRequest(body): Record<string, unknown>

Full Open Responses request sanitizer: strip non-function tools, rewrite output_* content parts, drop thinking / reasoning blocks, and drop a trailing assistant turn the provider would read as a prefill. Safe no-op when nothing needs changing.

Record<string, unknown>

Record<string, unknown>