{"record":{"id":"b0bedbc475b9a0f0","repo":"vercel/ai","slug":"harnessagent-pipeuimessagestreamtoresponse-is-not","errorCode":null,"errorMessage":"HarnessAgent: pipeUIMessageStreamToResponse is not implemented yet. Track the foundation review for follow-up.","messagePattern":"HarnessAgent: pipeUIMessageStreamToResponse is not implemented yet\\. Track the foundation review for follow-up\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/harness/src/agent/internal/harness-stream-text-result.ts","lineNumber":763,"sourceCode":"      toUIMessageStreamHelper<TOOLS, UI_MESSAGE>({\n        stream: this.stream,\n        tools: this.tools,\n        originalMessages,\n        generateMessageId,\n        onEnd,\n        onFinish,\n        messageMetadata,\n        sendReasoning,\n        sendSources,\n        sendStart,\n        sendFinish,\n        onError,\n      }),\n    ) as AsyncIterableStream<InferUIMessageChunk<UI_MESSAGE>>;\n  }\n\n  pipeUIMessageStreamToResponse(): never {\n    throw notSupportedYet('pipeUIMessageStreamToResponse');\n  }\n\n  pipeTextStreamToResponse(): never {\n    throw notSupportedYet('pipeTextStreamToResponse');\n  }\n\n  toUIMessageStreamResponse<UI_MESSAGE extends UIMessage>({\n    originalMessages,\n    generateMessageId,\n    onEnd,\n    onFinish,\n    messageMetadata,\n    sendReasoning,\n    sendSources,\n    sendStart,\n    sendFinish,\n    onError,\n    ...init","sourceCodeStart":745,"sourceCodeEnd":781,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/harness/src/agent/internal/harness-stream-text-result.ts#L745-L781","documentation":"pipeUIMessageStreamToResponse on HarnessStreamTextResult is a stub that unconditionally throws this 'not implemented yet' error; the harness result does not yet support piping a UI message stream directly to a server Response. (pipeTextStreamToResponse is similarly unimplemented.) It is an intentional placeholder, not an environmental failure.","triggerScenarios":"Calling result.pipeUIMessageStreamToResponse() on any HarnessStreamTextResult — the method is `: never` and always throws.","commonSituations":"Porting route handlers from the core AI SDK useChat/server examples to a harness agent and calling the same pipe helper; expecting feature parity between `ai` result objects and harness results.","solutions":["Use result.toUIMessageStream() and write the chunks to your Response manually.","Alternatively pipe result.textStream into a plain-text Response yourself.","Track the foundation review; avoid calling this method until it is implemented."],"exampleFix":"// before\nresult.pipeUIMessageStreamToResponse();\n// after\nconst stream = result.toUIMessageStream({ onError });\nreturn new Response(stream, { headers: { 'Content-Type': 'text/event-stream' } });","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Avoid the stub entirely; build the response from the UI message stream:\nconst stream = result.toUIMessageStream({ onError });\nreturn new Response(stream, { headers: { 'Content-Type': 'text/event-stream' } });","preventionTips":["Never call pipeUIMessageStreamToResponse on harness results; it always throws.","Use toUIMessageStream() plus a manual Response in route handlers.","Check the harness package API surface before porting code that uses `ai` result helpers."],"tags":["not-implemented","ui-message-stream","harness-agent","api-limitation"],"backgroundTag":"feature-not-implemented","analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}