## The problem
Issue vercel/ai#199 (closed, 38 comments): When using the package in an action, like so, ```ts export const action = async ({ request }: ActionArgs) => { const { messages, transcriptId } = z .object({ messages: z.array( z .object({ content: z.string(), role: z.union([z.literal('user'), z.literal('system'), z.literal('assistant')]), }) .passthrough(), ), transcriptId: z.string(), }) .parse(await request.json()); // Load transcript set from Redis, turn it into a string const transcriptArray = await transcriptQueries.getTranscriptArray(redisClient, { transcriptKey: transcriptId }); const transcript = transcriptArray; const prompt = `<my p
## What to do
StreamingTextResponse breaks in Remix action functions because of polyfilled web streams: `@remix-run/web-fetch`/`web-std-io` polyfill ReadableStream, and the AI SDK passes a native TransformStream to `pipeThrough`, which fails the polyfill's internal checks. Remove the `@remix-run/web-std-io` polyfills (see remix-run/web-std-io#42). If the issue persists after removal, the polyfills were not the only cause.