From e678bfb3e7c9313be78303c2c32294417bb58dbb Mon Sep 17 00:00:00 2001 From: Jack Chen Date: Mon, 7 Sep 2026 21:52:52 +0800 Subject: [PATCH] fix(examples): use the supported AI SDK stream property (#590) AI SDK 7 deprecates `StreamTextResult.fullStream` in favor of `stream`. The example pins `ai@^7.0.0`, so the reference route was reading a deprecated property that new readers would copy into their own code. `packages/core/src/llm/ai-sdk.ts` keeps `fullStream` deliberately. Core declares `ai` as a peer dependency across `^5.0.0 || ^6.0.0 || ^7.0.0`, and `StreamTextResult` in v5 and v6 exposes no `stream` property at all, so switching there would break those consumers at runtime. `fullStream` is deprecated in v7 but not removed, so it stays correct for all three. Verified with `tsc --noEmit` against the example's own tsconfig. --- .../integrations/with-vercel-ai-sdk/app/api/chat/route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/examples/integrations/with-vercel-ai-sdk/app/api/chat/route.ts b/packages/core/examples/integrations/with-vercel-ai-sdk/app/api/chat/route.ts index 5b3d73b..08ddde3 100644 --- a/packages/core/examples/integrations/with-vercel-ai-sdk/app/api/chat/route.ts +++ b/packages/core/examples/integrations/with-vercel-ai-sdk/app/api/chat/route.ts @@ -108,5 +108,5 @@ ${teamOutput}`, messages: await convertToModelMessages(messages), }) - return createUIMessageStreamResponse({ stream: toUIMessageStream({ stream: result.fullStream }) }) + return createUIMessageStreamResponse({ stream: toUIMessageStream({ stream: result.stream }) }) }