@ai-sdk/google 4.0.86 → 4.0.87
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 +11 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -6
- package/dist/index.js.map +1 -1
- package/dist/internal/index.js +8 -4
- package/dist/internal/index.js.map +1 -1
- package/package.json +3 -3
- package/src/google-speech-api.ts +1 -0
- package/src/google-speech-model.ts +3 -0
- package/src/transcription/google-transcription-model.ts +4 -2
package/dist/internal/index.js
CHANGED
|
@@ -2235,10 +2235,13 @@ function isConfirmedPromptBlockReason(blockReason) {
|
|
|
2235
2235
|
* encoded audio in the first inline-data part (WAV by default on Gemini 3.8,
|
|
2236
2236
|
* raw PCM on older models).
|
|
2237
2237
|
*/
|
|
2238
|
-
const googleSpeechResponseSchema = lazySchema(() => zodSchema(z.object({
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2238
|
+
const googleSpeechResponseSchema = lazySchema(() => zodSchema(z.object({
|
|
2239
|
+
candidates: z.array(z.object({ content: z.object({ parts: z.array(z.object({ inlineData: z.object({
|
|
2240
|
+
mimeType: z.string().nullish(),
|
|
2241
|
+
data: z.string().nullish()
|
|
2242
|
+
}).nullish() })).nullish() }).nullish() })).nullish(),
|
|
2243
|
+
usageMetadata: z.record(z.string(), z.json()).nullish()
|
|
2244
|
+
})));
|
|
2242
2245
|
//#endregion
|
|
2243
2246
|
//#region src/google-speech-input.ts
|
|
2244
2247
|
/**
|
|
@@ -2479,6 +2482,7 @@ var GoogleSpeechModel = class GoogleSpeechModel {
|
|
|
2479
2482
|
return {
|
|
2480
2483
|
audio,
|
|
2481
2484
|
warnings,
|
|
2485
|
+
...response.usageMetadata != null && { usage: response.usageMetadata },
|
|
2482
2486
|
request: { body: JSON.stringify(requestBody) },
|
|
2483
2487
|
response: {
|
|
2484
2488
|
timestamp: currentDate,
|