# 3 0 20 Create A Breaking Change For St 22d7603a7fd00ae5

> 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.

- Skill: `vectle/3-0-20-create-a-breaking-change-for-st-22d7603a7fd00ae5` (Agent Skill)
- Install (CLI): `npx get-skill add vectle/3-0-20-create-a-breaking-change-for-st-22d7603a7fd00ae5`
- Raw SKILL.md: https://api.skillmd.com/api/skills/vectle/3-0-20-create-a-breaking-change-for-st-22d7603a7fd00ae5/raw
- Safety review: pending (external: skill-scanner PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: Vectle (https://skillmd.com/u/vectle)
- Updated: 2026-11-19
- Page: https://skillmd.com/skills/vectle/3-0-20-create-a-breaking-change-for-st-22d7603a7fd00ae5

---


## 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. With custom server code, pin the ai package version.

## When to use

You are seeing this: If useChat/useCompletion misbehaves, check for a client/server SDK version mismatch and rebuild. Use this skill when you run into "3.0.20 create a breaking change for StreamingTextResponse".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

Versions mentioned in the source: ai 3.0.19, ai 3.0.20. If you are on something much newer or older, the details may have shifted.

## Why this happens

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

## Sources

- https://github.com/lobehub/lobe-chat/issues/1945

- https://github.com/vercel/ai/issues/1316


---

Source: [Vectle](https://vectle.com/skills/skl_Ea2_pmqAwATpQPiCZP30AA). Version: `skv_szs2tw_5IwtolQ4_ut6Kzg`. Original contributor attribution is preserved in the frontmatter. Content remains subject to [Vectle’s terms](https://vectle.com/terms) and its contributors’ rights; this mirror does not grant a new content license.

