Dashboard › opencode-lore › Distillation
43f0349c-fe6c-4be1-9732-18ad1f8170bd["lore_tm_v1_K6o0F-IPoWbzM1OehJPfLkGhqsjA--hHa4Hp_HaxqmE","lore_tm_v1_YYu57G4oX3y6no1Hu0-moGRCC3dNY4dvT5UtXHw4Om4","lore_tm_v1_of03sJAGDkVJ1u7P0_2DJs8r0VaYmTdsJysBIap3L08","lore_tm_v1_QUHerG7Iv3sP9xwsqkvHyW-3Sm1PKWaaKrrtVNRbbOA","lore_tm_v1_0IPp9-MpIDSnYdHHfXAWiQFHiqD6a-MGiBE-L3HLpIk"]
Date: Sep 16, 2026
response.output_text.done replace accumulated text with the final parsed.text value because the final version is more reliable; implemented as item.text = text in packages/gateway/src/stream/openai-responses.ts around lines 671–680.accountUnsuccessfulResponse() in packages/gateway/src/pipeline.ts lines 13391–13423. It accounts validated provider usage only when at least one token count is positive, calls optional markDirty(), sends usage to accountConversationUsage(), adds Sentry usage attributes via setGenAiUsageAttributes(), then marks the span with code 2 and message "upstream response did not complete" before calling endSpan().conversationTTLForAccounting() in packages/gateway/src/pipeline.ts lines 13425–13433. It accepts only "5m" or "1h", first from live sessions, then from loadSessionTracking(sessionID), otherwise returns undefined.ResponsesTerminalError in packages/gateway/src/stream/openai-responses.ts lines 545–553. It carries response: GatewayResponse and status: string, uses message upstream Responses request ended with status ${status}, and sets name = "ResponsesTerminalError".applyResponsesEvent() accumulation behavior in packages/gateway/src/stream/openai-responses.ts: response.output_text.delta appends via item.text += delta; response.output_text.done replaces text via item.text = text; response.refusal.delta appends refusal text while response.refusal.done replaces it; response.function_call_arguments.delta appends arguments while .done replaces them with final parsed.arguments.response.failed, response.done, response.incomplete, and response.completed; maps failed/cancelled statuses to response.failed, incomplete status/event to response.incomplete, and all others to response.completed. An incomplete reason of "content_filter" sets state.stopReason = "content_filter".input_tokens_details with fallback to prompt_tokens_details, tracks cached_tokens as cacheReadInputTokens and cache_write_tokens as cacheCreationInputTokens, and computes disjoint inputTokens as Math.max(0, input_tokens - cachedTokens - cacheWriteTokens).packages/gateway/test/openai-responses-recall-aware-stream.test.ts:104 checks terminal output IDs; 2. line 1199 test "rejects malformed named Responses events in a continuation"; 3. line 2673 test "allows a terminal-discovered recall that preserves sparse visible output positions"; 4. line 2684 uses "sparse visible text" and "msg_sparse_terminal_visible"; 5. line 2712 constructs output text "sparse visible text"; 6. line 2740 asserts output contains "sparse visible text"; 7. line 5789 test "allows a late recall that preserves sparse visible output positions"; 8. line 5830 test "fails closed when later visible output changes an emitted sparse position"; 9. line 5878 test "fails closed when a lower-index recall follows visible output"; 10. line 7258 test "does not relabel malformed incomplete continuation as nested recall"; 11. line 7293 test "does not relabel malformed continuation after unfinished recall arguments"; 12. line 8138 references "custom continuation events"; 13. packages/gateway/test/recall.test.ts:2841 comments that recall-only with follow-up makes the client see one assistant.