Dashboard › opencode-lore › Distillation
e9deea38-20d7-435a-bd00-c235284a5af5["lore_tm_v1_Q7-SGOiaRiDmr-P3pAMgiqDu6ylhQabhVcCcvGFVLwk"]
Date: Sep 16, 2026
packages/gateway/src/stream/openai-responses.ts extends ResponsesAccState with created: boolean, optional createdAt?: number, and optional lastAcceptedSequenceNumber?: number; initial state sets created: false.cloneResponsesAccState(state) using structuredClone(state) and restoreResponsesAccState(state, snapshot), which deletes keys absent from the snapshot and restores values with Object.assign(state, snapshot).PUBLIC_GATEWAY_ERROR = "Gateway request failed" and exports RESPONSES_PROVIDER_FAILURE_LOG = "openai-responses provider failure".packages/gateway/src/stream/openai-responses.ts: only the fixed provider-failure payload may cross the gateway boundary; provider diagnostics and failed output remain private, while stable protocol fields remain available so clients can close the existing response lifecycle.opts.validation === "codex" calls finish(false, finalizeUnsuccessfulResponsesAcc(state)), ensuring failed usage/accounting is finalized independently of downstream client demand.