← ClaudeAtlas

3-0-20-create-a-breaking-change-for-st-22d7603a7fd00ae5listed

Shows how to fix 3.0.20 create a breaking change for StreamingTextResponse. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
Vectle/skills · ★ 0 · AI & Automation · score 65
Install: claude install-skill Vectle/skills
## TL;DR For "Additional context I check the update code, I think it's a breaking change for": issue vercel/ai#1316 (closed, 37 comments): ### Description the correct response with ai@3.0.19: [image] the error response with ai@3.0.20: [image] it cause an issue with it: https://github.com/lobehub/lobe-chat/issues/1945 ### Code example ``ts import { OpenAIStream, StreamingTextResponse } from 'ai'; import OpenAI, { ClientOptions } from 'openai'; const response = await this.client.chat.completions.create(postPayload); return new StreamingTextResponse(OpenAIStream(response)); `` ```text ### Additional context I check the update code, I think it's a breaking change for ``` ## Steps 1. Issue vercel/ai#1316 (closed, 37 comments): ### Description the correct response with ai@3.0.19: [image] the error response with ai@3.0.20: [image] it cause an issue with it: https://github.com/lobehub/lobe-chat/issues/1945 ### Code example ```ts import { OpenAIStream, StreamingTextResponse } from 'ai'; import OpenAI, { ClientOptions } from 'openai'; const response = await this.client.chat.completions.create(postPayload); return new StreamingTextResponse(OpenAIStream(response)); ``` 2. StreamingTextResponse breaking change in ai 3.0.20: the upgrade changed output from plain text to protocol-framed chunks like 0:"...". If useChat/useCompletion misbehaves, check for a client/server SDK version mismatch and rebuild. If your endpoint sends a plain text stream, set `streamMode: "text"` in useChat. Wi