@ai-sdk/google 4.0.78 → 4.0.79
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 +16 -0
- package/dist/index.d.ts +13 -1
- package/dist/index.js +573 -397
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts +26 -2
- package/dist/internal/index.js +370 -219
- package/dist/internal/index.js.map +1 -1
- package/docs/15-google.mdx +85 -14
- package/package.json +2 -2
- package/src/convert-to-google-messages.ts +28 -0
- package/src/google-embedding-model.ts +39 -8
- package/src/google-json-accumulator.ts +0 -1
- package/src/google-prompt.ts +12 -0
- package/src/google-speech-api.ts +2 -1
- package/src/google-speech-input.ts +64 -0
- package/src/google-speech-model-options.ts +28 -1
- package/src/google-speech-model.ts +137 -25
- package/src/internal/index.ts +1 -0
- package/src/tool/code-execution.ts +14 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @ai-sdk/google
|
|
2
2
|
|
|
3
|
+
## 4.0.79
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fe07867: Fix Google `embedMany` calls with more than 100 values by keeping per-value multimodal content aligned across automatic batches, including text-only entries. Validate content length before sending requests and validate each batch's provider options after middleware transforms them.
|
|
8
|
+
- 2db5621: fix(google): preserve code execution parts when replaying messages
|
|
9
|
+
- 2693319: Add Gemini 3.8 TTS support with structured speech metadata and per-turn speaker and style controls for prebuilt voices. Preserve native WAV responses without adding a second header, support explicit raw PCM, mu-law, and A-law output, and identify headerless audio formats correctly. Add the Gemini 3.8 speech model IDs to Google and Gateway types.
|
|
10
|
+
|
|
11
|
+
Share transcript and custom-voice inspection through the Google provider internal export, and reject empty speech transcripts before sending a request. Default newer and custom model IDs to structured speech while preserving the legacy format for Gemini 2.5 and 3.1.
|
|
12
|
+
|
|
13
|
+
- 771e74b: chore: enable dead code lint rules
|
|
14
|
+
- Updated dependencies [fe07867]
|
|
15
|
+
- Updated dependencies [a4b0940]
|
|
16
|
+
- Updated dependencies [771e74b]
|
|
17
|
+
- @ai-sdk/provider-utils@5.0.47
|
|
18
|
+
|
|
3
19
|
## 4.0.78
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -290,8 +290,19 @@ type GoogleVideoModelOptions = {
|
|
|
290
290
|
|
|
291
291
|
type GoogleVideoModelId = 'veo-3.1-fast-generate-preview' | 'veo-3.1-generate-preview' | 'veo-3.1-generate' | 'veo-3.1-lite-generate-preview' | 'veo-3.0-generate-001' | 'veo-3.0-fast-generate-001' | 'veo-2.0-generate-001' | (string & {});
|
|
292
292
|
|
|
293
|
-
type GoogleSpeechModelId = 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro-preview-tts' | 'gemini-3.1-flash-tts-preview' | (string & {});
|
|
293
|
+
type GoogleSpeechModelId = 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro-preview-tts' | 'gemini-3.1-flash-tts-preview' | 'gemini-3.8-flash-tts' | 'gemini-3.8-flash-lite-tts' | (string & {});
|
|
294
294
|
declare const googleSpeechProviderOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
295
|
+
speechMetadata?: {
|
|
296
|
+
speaker?: string | undefined;
|
|
297
|
+
style?: string | undefined;
|
|
298
|
+
} | undefined;
|
|
299
|
+
turns?: {
|
|
300
|
+
text: string;
|
|
301
|
+
speechMetadata?: {
|
|
302
|
+
speaker?: string | undefined;
|
|
303
|
+
style?: string | undefined;
|
|
304
|
+
} | undefined;
|
|
305
|
+
}[] | undefined;
|
|
295
306
|
multiSpeakerVoiceConfig?: {
|
|
296
307
|
speakerVoiceConfigs: {
|
|
297
308
|
speaker: string;
|
|
@@ -299,6 +310,7 @@ declare const googleSpeechProviderOptionsSchema: _ai_sdk_provider_utils.LazySche
|
|
|
299
310
|
prebuiltVoiceConfig: {
|
|
300
311
|
voiceName: string;
|
|
301
312
|
};
|
|
313
|
+
voice?: undefined;
|
|
302
314
|
};
|
|
303
315
|
}[];
|
|
304
316
|
} | undefined;
|