Function: renderOpenAIResponsesReasoningItem()
function renderOpenAIResponsesReasoningItem(input: {
prefixFingerprint: string;
reasoningReplay: ReasoningReplayMode;
replayCompatibility: readonly string[];
thought: Thought;
warn?: (msg: string) => void;
}): OpenAIResponsesReasoningItem | undefined;Defined in: src/batteries/llm/openai_responses/helpers.ts:643
Implements OpenAIResponsesHelpers.renderOpenAIResponsesReasoningItem.
Parameters
| Parameter | Type |
|---|---|
input | { prefixFingerprint: string; reasoningReplay: ReasoningReplayMode; replayCompatibility: readonly string[]; thought: Thought; warn?: (msg: string) => void; } |
input.prefixFingerprint | string |
input.reasoningReplay | ReasoningReplayMode |
input.replayCompatibility | readonly string[] |
input.thought | Thought |
input.warn? | (msg: string) => void |
Returns
| OpenAIResponsesReasoningItem | undefined
Remarks
Converts an eligible stored OpenAIResponsesReasoningReplayPayload into a wire reasoning item, or undefined if ineligible (no payload, wrong variant, or a stale fingerprint). The adjacency-sweep pass in buildOpenAIResponsesInput is what actually enforces the reasoning/output-item pairing constraint (Known Gotcha #1) — this function only validates the signature/fingerprint half of eligibility.
Under reasoningReplay: 'summary-only', the returned item strips content (full reasoning text) and encrypted_content — only summary is replayed. 'encrypted' (or any other non-'off' mode) returns the stored item verbatim.