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.
Parameters
Section titled “Parameters”Record<string, unknown>
Returns
Section titled “Returns”Record<string, unknown>