@ai-sdk/google 3.0.36 → 3.0.38
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/CHANGELOG.md +12 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +22 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -2
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +1 -1
- package/dist/internal/index.d.ts +1 -1
- package/dist/internal/index.js +21 -1
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +21 -1
- package/dist/internal/index.mjs.map +1 -1
- package/docs/15-google-generative-ai.mdx +1 -0
- package/package.json +1 -1
- package/src/google-generative-ai-language-model.ts +25 -0
- package/src/google-generative-ai-options.ts +1 -0
|
@@ -564,11 +564,36 @@ export class GoogleGenerativeAILanguageModel implements LanguageModelV3 {
|
|
|
564
564
|
});
|
|
565
565
|
}
|
|
566
566
|
} else if ('inlineData' in part) {
|
|
567
|
+
// End any active text or reasoning block before starting file output.
|
|
568
|
+
// Relevant for multimodal output models.
|
|
569
|
+
if (currentTextBlockId !== null) {
|
|
570
|
+
controller.enqueue({
|
|
571
|
+
type: 'text-end',
|
|
572
|
+
id: currentTextBlockId,
|
|
573
|
+
});
|
|
574
|
+
currentTextBlockId = null;
|
|
575
|
+
}
|
|
576
|
+
if (currentReasoningBlockId !== null) {
|
|
577
|
+
controller.enqueue({
|
|
578
|
+
type: 'reasoning-end',
|
|
579
|
+
id: currentReasoningBlockId,
|
|
580
|
+
});
|
|
581
|
+
currentReasoningBlockId = null;
|
|
582
|
+
}
|
|
583
|
+
|
|
567
584
|
// Process file parts inline to preserve order with text
|
|
585
|
+
const thoughtSignatureMetadata = part.thoughtSignature
|
|
586
|
+
? {
|
|
587
|
+
[providerOptionsName]: {
|
|
588
|
+
thoughtSignature: part.thoughtSignature,
|
|
589
|
+
},
|
|
590
|
+
}
|
|
591
|
+
: undefined;
|
|
568
592
|
controller.enqueue({
|
|
569
593
|
type: 'file',
|
|
570
594
|
mediaType: part.inlineData.mimeType,
|
|
571
595
|
data: part.inlineData.data,
|
|
596
|
+
providerMetadata: thoughtSignatureMetadata,
|
|
572
597
|
});
|
|
573
598
|
}
|
|
574
599
|
}
|
|
@@ -26,6 +26,7 @@ export type GoogleGenerativeAIModelId =
|
|
|
26
26
|
| 'gemini-3.1-pro-preview'
|
|
27
27
|
| 'gemini-3.1-pro-preview-customtools'
|
|
28
28
|
| 'gemini-3.1-flash-image-preview'
|
|
29
|
+
| 'gemini-3.1-flash-lite-preview'
|
|
29
30
|
// latest version
|
|
30
31
|
// https://ai.google.dev/gemini-api/docs/models#latest
|
|
31
32
|
| 'gemini-pro-latest'
|