Dashboard › opencode-lore › Distillation
20005a84-4b91-4ebe-a6fe-ee75994a0abc["lore_tm_v1_DgCfU4hzvpUf8BtbhwL9bPQfetdPbWtLl5CQoy5sHAg","lore_tm_v1_IRCrU6R3WkVR4FUkCV3Ol_-uurGYa_uoqM781XdKD_c","lore_tm_v1_-tjssQX6MBDHC2eBP92XaBwsFRDvbUcbjKYiCxZL3Gw","lore_tm_v1_fRdPIuv8EcphTmLoYKRNfXY4CBsgX4T4GCL3Y7ZjCLU","lore_tm_v1_0RpA4is6-9FNKVt_x6wTAp5wVX5vK5B5PV_CG-2aKEw","lore_tm_v1_WTPHFYuR0NqA7nBzRJN6X-EIABAykmFy5H2avpIbYiM"]
Date: Sep 16, 2026
packages/gateway/test/openai-responses-stream.test.ts add imports for log, afterEach, and makeResponsesAccState; define silentLogSink with no-op info, warn, error, and captureException; and restore that sink in afterEach().packages/gateway/test/openai-responses-stream.test.ts adds a test named uses created metadata and failure usage in the plain streaming route, covering metadata from response.created and usage from a failure terminal in the plain streaming path./home/byk/Code/opencode-lore-provider-error/packages/gateway/src/pipeline.ts, the recall-aware Responses-stream finish(resp, successful) function at lines 9621-9633 is idempotent via completionAttempted; it calls recallDiagnostics.finish("completed" | "failed"), invokes opts.onComplete(resp, successful), sets completed = true only after the callback succeeds, and logs openai-responses recall-aware onComplete error: if the callback throws.KEEPALIVE_INACTIVITY_MS = 30_000, emits : keepalive, and sequenceChunk() rewrites parseable SSE frames with monotonically increasing sequence_number values beginning at 0.settleRecall() in /home/byk/Code/opencode-lore-provider-error/packages/gateway/src/pipeline.ts rejects exhausted recall admission with new RecallContinuationFailure("depth_exhausted"); races opts.onRecall(input) against abort; rolls back late or aborted callback results; records diagnostics and budget usage with Buffer.byteLength(result.resultText) and result.coverage; and logs recall final continuation: budget exhausted reason=${stopReason} when the budget yields a stop reason.accumulateNonStreamResponse() in /home/byk/Code/opencode-lore-provider-error/packages/gateway/src/pipeline.ts detects SSE bodies even when stream: false was sent or text/event-stream is absent, then routes them through protocol-specific strict accumulators. For openai-responses, it uses validation: codex ? "codex" : "public", stopAtTerminal: true, and requireCompletedTerminal: true.parseResponsesNonStreamEnvelope(). accumulateNonStreamResponse() throws ResponsesTerminalError(response, parsed.status) whenever the status is not completed, independently of requireValidCompletion.parseResponsesNonStreamEnvelope() derives status from json.status, defaulting to "unknown", and calls assertValidNonStreamCompletion(json, "openai-responses") for statuses completed and incomplete.preserveIncompleteResponsesTerminal() converts only a ResponsesTerminalError whose status === "incomplete" back into its contained GatewayResponse; all other errors are rethrown.NonStreamCompletionError, but invalid usage still throws and the projection is never returned as success.NonStreamCompletionError stores the parsed GatewayResponse, uses message upstream response did not complete, and is thrown after usage-only projection when required non-stream completion validation fails.assertValidNonStreamCompletion() rejects a non-null json.error with upstream response contained an error; for OpenAI Chat Completions, it requires a first choice with a message and string finish_reason, otherwise throwing upstream OpenAI request did not complete.0dd569b520bad37adbaea230f32100c7f83f463c (Change ID: lpmvqrurxwlmrmwnyllmxlvkmplvwnlz) on bookmarks fix/responses-provider-failures and fix/responses-provider-failures@git is titled fix(responses): unify provider failure handling; author/committer is Burak Yigit Kaya <ben@byk.im>. It changes 6 files with 3,398 insertions and 500 deletions: packages/gateway/src/pipeline.ts, packages/gateway/src/stream/openai-responses.ts, packages/gateway/test/openai-responses-recall-aware-stream.test.ts, packages/gateway/test/openai-responses-stream.test.ts, packages/gateway/test/pipeline-streaming.test.ts, and packages/gateway/test/recall-codex-stream.test.ts.24880457763b6f10831856d01c41bd72d62ddc28 (Change ID: wswlsmrnuzlqtxyskqotksrlqtzplrkl) is titled fix(responses): reject non-monotonic provider failures; author/committer is Burak Yigit Kaya <ben@byk.im>. It changes 4 files with 364 insertions and 27 deletions: packages/gateway/src/pipeline.ts, packages/gateway/src/stream/openai-responses.ts, packages/gateway/test/openai-responses-recall-aware-stream.test.ts, and packages/gateway/test/openai-responses-stream.test.ts.