{"record":{"id":"7076bae7dcbbb26d","repo":"deepseek-ai/deepseek-harness","slug":"stream-closed-7076ba","errorCode":"STREAM_CLOSED","errorMessage":"pi-ai event stream ended without done/error","messagePattern":"pi-ai event stream ended without done/error","errorType":"exception","errorClass":"LlmError","httpStatus":null,"severity":"error","filePath":"packages/llm/llm-pi-ai/src/stream.ts","lineNumber":210,"sourceCode":"        yield { type: 'usage', usage: mapUsage(event.message.usage) }\n        yield {\n          type: 'finish',\n          reason: mapStopReason(event.message, contextWindow),\n          replayState: toPiReplayState(event.message),\n        }\n        return\n      case 'error':\n        // In-stream error delivery (pi-ai's style) → error finish chunk\n        // (the harness's other sanctioned error path besides throwing).\n        yield { type: 'usage', usage: mapUsage(event.error.usage) }\n        yield { type: 'finish', reason: mapStopReason(event.error, contextWindow) }\n        return\n      // no default: AssistantMessageEvent is pi-ai's closed union; a new\n      // event type should fail compilation here via tsc's exhaustiveness\n      // when one is added (switch covers all current variants).\n    }\n  }\n  throw new LlmError('pi-ai event stream ended without done/error', 'STREAM_CLOSED')\n}\n","sourceCodeStart":192,"sourceCodeEnd":212,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/llm/llm-pi-ai/src/stream.ts#L192-L212","documentation":"Error \"pi-ai event stream ended without done/error\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/llm/llm-pi-ai/src/stream.ts:210 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the request; the event stream ended without a done or error event."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}