@mastra/ai-sdk 1.10.2 → 1.10.3-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/helpers.d.ts.map +1 -1
- package/dist/index.cjs +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/package.json +13 -12
package/dist/index.js
CHANGED
|
@@ -12344,6 +12344,16 @@ function convertMastraChunkToAISDKv6({ chunk, mode = "stream" }) {
|
|
|
12344
12344
|
}
|
|
12345
12345
|
function convertFullStreamChunkToUIMessageStream({ part, messageMetadataValue, sendReasoning, sendSources, onError, sendStart, sendFinish, responseMessageId }) {
|
|
12346
12346
|
const partType = part?.type;
|
|
12347
|
+
if (!sendReasoning && (partType === "text-start" || partType === "text-delta" || partType === "text-end") && part.providerMetadata?.openai?.itemId != null) {
|
|
12348
|
+
const { itemId, ...openai } = { ...part.providerMetadata.openai };
|
|
12349
|
+
part = {
|
|
12350
|
+
...part,
|
|
12351
|
+
providerMetadata: {
|
|
12352
|
+
...part.providerMetadata,
|
|
12353
|
+
openai
|
|
12354
|
+
}
|
|
12355
|
+
};
|
|
12356
|
+
}
|
|
12347
12357
|
switch (partType) {
|
|
12348
12358
|
case "text-start": return {
|
|
12349
12359
|
type: "text-start",
|