Dashboard › opencode-lore › Distillation
9dfb94e7-956e-442b-8bf5-54126844154d["lore_tm_v1___iLHI861O86dn6KN33jNibWAtDYOIWiTpFid9eSIm0","lore_tm_v1_ocvbPaj8gHFguXyIRYtIflTmgyrfRNIqY1IxZdiaJc0","lore_tm_v1_T6ZGiFqvCKlZ-lIIP7vZBpVB92L0p5qdP_wVxTGTOK0","lore_tm_v1_e2dmDTgE8H7vetEICtDHHLGG74tM2VAZwpqIwT3m8Ok","lore_tm_v1_zJWi_jCNiRxuxHxP9yj-qEO0f6EW9888s50IYfCz03g","lore_tm_v1_FcH3u9XqBLVEIFY7e7WTKyDDkTiTPZibG50EzMll1Wo"]
Date: Sep 16, 2026
/home/byk/Code/opencode-lore-responses-reference-v2/packages/gateway/src/stream/openai-responses.ts. ResponsesAccState tracks response identity/model/stop reason/usage, terminal event and response snapshot, Codex rate limits, raw output items, strict-mode identity indexes (itemIndexById, callIndexById, effectiveToolIndexById), active/unbound/done item sets, and accumulated text or tool-use items indexed by output_index.SUPPORTED_RESPONSES_OUTPUT_ITEM_TYPES in packages/gateway/src/stream/openai-responses.ts contains, in order: 1. message, 2. function_call, 3. function_call_output, 4. reasoning, 5. item_reference, 6. web_search_call, 7. file_search_call, 8. computer_call, 9. computer_call_output, 10. computer_tool_call, 11. computer_tool_call_output, 12. code_interpreter_call, 13. image_generation_call, 14. local_shell_call, 15. local_shell_call_output, 16. shell_call, 17. shell_call_output, 18. mcp_call, 19. mcp_list_tools, 20. mcp_approval_request, 21. mcp_approval_response, 22. custom_tool_call, 23. custom_tool_call_output, 24. apply_patch_call, 25. apply_patch_call_output, 26. program, 27. program_output, 28. tool_search_call, 29. tool_search_output, 30. additional_tools, 31. compaction.packages/gateway/src/stream/openai-responses.ts found 8 relevant matches: line 100 ("item_reference"), line 556 (makeResponsesAccState()), line 582 (applyResponsesEvent()), line 894 (filters terminal output with .filter((item) => item.type !== "item_reference")), line 1895 (uses opts.state ?? makeResponsesAccState()), lines 2212 and 2218 (special handling around snapshot.type === "item_reference"), and line 2417 (makeResponsesAccState()).packages/gateway/src/stream/openai-responses.ts, the final text event replaces previously accumulated delta text rather than trusting concatenated deltas as authoritative.never forwards response-side item_reference lifecycle events in packages/gateway/test/openai-responses-recall-aware-stream.test.ts.packages/gateway/test/openai-responses-recall-aware-stream.test.ts:2702-2773, test redacts a sparse terminal recall that changes item identity streams private arguments {"query":"private changed identity query"} under fc_streamed_changed_recall, then supplies terminal recall identity fc_terminal_changed_recall / call_terminal_changed_recall. Expected behavior: emit PUBLIC_RECALL_ERROR, not PUBLIC_GATEWAY_ERROR; redact the private query and all streamed/terminal IDs from both wire output and completedResponse; do not invoke recall (recallCalls === 0); and never run runFollowUp.packages/gateway/test/openai-responses-recall-aware-stream.test.ts:2775-2838, test redacts a sparse call replaced by a terminal item reference streams a sparse function_call with private arguments {"query":"private referenced query"}, then replaces terminal output with { type: "item_reference", id: "fc_terminal_sparse_reference" }. Expected behavior: emit PUBLIC_GATEWAY_ERROR, not PUBLIC_RECALL_ERROR; redact the private query and item ID from wire output and completedResponse; do not invoke recall (recallCalls === 0); and never run runFollowUp.packages/gateway/test/openai-responses-recall-aware-stream.test.ts:2840-2905, test redacts a sparse call whose terminal item changes type streams a sparse function_call containing {"query":"private changed type query"}, while terminal output changes the same ID fc_terminal_sparse_changed_type to a completed assistant message. Expected behavior: emit PUBLIC_GATEWAY_ERROR, not PUBLIC_RECALL_ERROR; redact the private query and ID from wire output and completedResponse; do not invoke recall (recallCalls === 0); and never run runFollowUp.packages/gateway/test/openai-responses-recall-aware-stream.test.ts:2908 is named redacts a sparse call omitted from the terminal output, covering the case where a streamed sparse call does not appear in the terminal response output.