mirror of
https://github.com/JackChen-me/open-multi-agent.git
synced 2026-10-19 01:29:57 -05:00
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.
This commit is contained in:
1 parent
f62c7edbc3
commit
e678bfb3e7
1 file changed
+1
-1
@@ -108,5 +108,5 @@ ${teamOutput}`,
|
|||||||
messages: await convertToModelMessages(messages),
|
messages: await convertToModelMessages(messages),
|
||||||
})
|
})
|
||||||
|
|
||||||
return createUIMessageStreamResponse({ stream: toUIMessageStream({ stream: result.fullStream }) })
|
return createUIMessageStreamResponse({ stream: toUIMessageStream({ stream: result.stream }) })
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user