Dashboard › opencode-lore › Distillation
0f8c9ad8-b777-4b03-92b0-d52d4e724aa2["lore_tm_v1_qCa7mdNptPJtrCw72gxPmFCajq9Rgu3ZV9Z_coU7_1I","lore_tm_v1_OLkQAQQEi9fH0qxAymyaDJitTpp_ouAF75U7-bHDwu8"]
Date: Sep 16, 2026
packages/gateway/src/pipeline.ts around line 18530: “the follow-up's stream flag can never diverge from how the continuation” is delivered.packages/gateway/src/pipeline.ts around line 18705 using the exact wording “Never throws / never”; the surrounding comment says this applies when a Lore context-warning banner is layered on.handleProvisionalConversationTurn cancels the upstream body and returns sanitizedUpstreamErrorResponse(upstreamResponse) when upstreamResponse.ok is false (packages/gateway/src/pipeline.ts, lines 15834-15838).handleProvisionalConversationTurn to validate a provisional session identity without touching session-owned state. A full Lore turn occurs only on a later retry after a successful response confirms the presented header; failed or incomplete attempts leave the adopted session, project rows, auth registries, and gradient state untouched (packages/gateway/src/pipeline.ts, lines 15795-15800).handleProvisionalConversationTurn resolves route intent via prepareRequestUpstream(req, config) but keeps it private until a complete response and client EOF confirm the provisional identity (packages/gateway/src/pipeline.ts, lines 15811-15814).openai-responses uses accumulateResponsesSSEStream with validation: req.codex ? "codex" : "public", stopAtTerminal: true, and requireCompletedTerminal: true; openai uses accumulateOpenAISSEStream with strict: true, stopAtTerminal: true, and consumeUntilDone: true; gemini uses accumulateGeminiSSEStream with strict: true and stopAtTerminal: true; other protocols use accumulateSSEResponse with strict: true and stopAtTerminal: true (packages/gateway/src/pipeline.ts, lines 15841-15868).accumulateNonStreamResponse(upstreamResponse, forwarded.effectiveProtocol, req.codex === true, abortScope.signal, true) (packages/gateway/src/pipeline.ts, lines 15869-15875).ResponsesTerminalError, handleProvisionalConversationTurn schedules post-response handling with scheduleStreamingPostResponse; it waits for downstreamSettled, one setImmediate, and optional provisionalFinalizerPauseForTest, then abandons stale generations when requestGeneration !== streamingPostResponseGeneration (packages/gateway/src/pipeline.ts, lines 15876-15890).conflictsWithConfidentSessionProject(identified.sessionID, pathResult) causes dropOwnedProvisionalKey(identified.provisionalKey, identified.sessionID) and immediate return (packages/gateway/src/pipeline.ts, lines 15891-15900).accountUnsuccessfulResponse with conversationTTLForAccounting(identified.sessionID); the dirty callback sets the matching session state’s _dirty = true. The scheduled work is associated with requestCredentialFingerprint(req.rawHeaders, config) ?? undefined (packages/gateway/src/pipeline.ts, lines 15901-15916).req.stream && upstreamResponse.body; otherwise it reads the body with readForegroundBody, validates non-streaming openai-responses using parseResponsesNonStreamEnvelope(JSON.parse(body)), copies usage-limit headers, and returns JSON with the upstream status (packages/gateway/src/pipeline.ts, lines 15670-15695).translateAnthropicStreamToOpenAI, translateAnthropicStreamToResponses, or translateAnthropicStreamToGemini, each receiving signal: abortScope.signal (packages/gateway/src/pipeline.ts, lines 15700-15735).preserveIncompleteResponsesTerminal and re-emit it through nonStreamHttpResponse; non-streaming cross-protocol responses similarly use accumulateNonStreamResponse followed by nonStreamHttpResponse (packages/gateway/src/pipeline.ts, lines 15736-15792).