Dashboard › opencode-lore › Distillation
69418407-9a0c-48e7-a43e-872dc84dc5d7["lore_tm_v1_81Zbb4kHo_uYMgez9PL9uPIZQb1JkK8wNTTjeY-cyRM","lore_tm_v1_RjtIXc0SJAOr1dBm0BFw9-eh8TDBB8oAaNxoKIZfIzI","lore_tm_v1_YNUehCR6qs2xLgdNJXTNOwf37DA1Fml8oosF9M9YbHY","lore_tm_v1_fnX2hARj_T18POijT49vJAtOvjx_iA9OuAfXc2VI8z8","lore_tm_v1_JWoQhD_Id4Gxs8R0iVnSxATqQDQAW394jVWq-v7zYqg"]
Date: Sep 16, 2026
packages/gateway/src/pipeline.ts now calls validateResponsesProviderFailureTerminal() for provider-failure terminals on both the principal stream and recall continuation stream before lifecycle handling; both paths emit log.error(RESPONSES_PROVIDER_FAILURE_LOG).packages/gateway/src/stream/openai-responses.ts adds exported constant RESPONSES_PROVIDER_FAILURE_LOG = "openai-responses provider failure" and logs it when a sanitized provider failure is accepted.validateResponsesProviderFailureTerminal(event, parsed, state, validation, maxSparseIndex, sanitizedFailure) in packages/gateway/src/stream/openai-responses.ts. It rejects when parsed.type !== event or !state.created; validates the sanitized response.failed payload through validatePublicResponsesEvent() or validateCodexResponsesEvent(); and calls validateFailureTerminal(parsed) for failure events other than error and response.error.projectResponsesInProgressEvent(parsed, state) in packages/gateway/src/stream/openai-responses.ts. It projects response.in_progress from trusted accumulator state: preserves sequence_number when present; uses state.id, state.createdAt, and state.model; fixes status: "in_progress" and output: []; and only accepts provider response.object when it equals "response", otherwise defaulting to "response".packages/gateway/src/pipeline.ts no longer forwards response.in_progress verbatim; it serializes projectResponsesInProgressEvent(parsed, state) so provider lifecycle metadata after response.created is advisory and only the trusted created-state projection reaches clients.accumulateResponsesSSEStream() in packages/gateway/src/stream/openai-responses.ts likewise sends projected JSON to opts.onValidatedEvent for response.in_progress, while other non-message events retain their original data.response.in_progress; model consistency remains enforced for other events.validateResponsesUsage(parsed.response.usage, "malformed Responses usage").ResponsesAccState in packages/gateway/src/stream/openai-responses.ts now includes 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 then restores snapshot fields with Object.assign.packages/gateway/src/pipeline.ts:18864-19142 uses streamResponsesRecallAware() when the client protocol is openai-responses, no warning is injected, and a recall tool exists; otherwise it uses streamResponsesPassthrough() for no-recall passthrough or accumulateResponsesSSEStream() for warning/non-Responses-client buffering.onComplete sends successful responses to finishStreaming(response) and unsuccessful responses to finishUnsuccessfulStreaming(response), while captureUnsuccessfulResponses() catches ResponsesTerminalError, accounts via finishUnsuccessfulStreaming(error.response), returns incomplete responses as { successful: false }, and suppresses other failed terminals from becoming client responses.