diff --git a/app/routes/api.enhancer.ts b/app/routes/api.enhancer.ts index 6b6b370ea..3a15af5af 100644 --- a/app/routes/api.enhancer.ts +++ b/app/routes/api.enhancer.ts @@ -96,7 +96,7 @@ async function enhancerAction({ context, request }: ActionFunctionArgs) { }, }); - const transformedStream = result.toAIStream().pipeThrough(transformStream); + const transformedStream = result.toDataStream().pipeThrough(transformStream); return new StreamingTextResponse(transformedStream); } catch (error: unknown) {