@ai-sdk/google 3.0.136 → 3.0.137
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 +9 -0
- package/dist/index.d.mts +8 -11
- package/dist/index.d.ts +8 -11
- package/dist/index.js +243 -230
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +153 -135
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +14 -14
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +14 -14
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/google-generative-ai-embedding-options.ts +15 -14
- package/src/google-generative-ai-image-model.ts +1 -1
- package/src/google-generative-ai-language-model.ts +43 -40
- package/src/google-generative-ai-video-model.ts +30 -26
- package/src/tool/file-search.ts +33 -30
- package/src/tool/google-search.ts +19 -18
- package/src/transcription/google-transcription-model-options.ts +40 -31
- package/src/transcription/google-transcription-model.ts +37 -30
package/dist/index.mjs
CHANGED
|
@@ -3,6 +3,8 @@ import {
|
|
|
3
3
|
InvalidArgumentError
|
|
4
4
|
} from "@ai-sdk/provider";
|
|
5
5
|
import {
|
|
6
|
+
lazySchema as lazySchema3,
|
|
7
|
+
zodSchema as zodSchema3,
|
|
6
8
|
combineHeaders,
|
|
7
9
|
convertToBase64,
|
|
8
10
|
createJsonResponseHandler,
|
|
@@ -37,37 +39,45 @@ var googleFailedResponseHandler = createJsonErrorResponseHandler({
|
|
|
37
39
|
});
|
|
38
40
|
|
|
39
41
|
// src/transcription/google-transcription-model-options.ts
|
|
42
|
+
import {
|
|
43
|
+
lazySchema as lazySchema2,
|
|
44
|
+
zodSchema as zodSchema2
|
|
45
|
+
} from "@ai-sdk/provider-utils";
|
|
40
46
|
import { z as z2 } from "zod/v4";
|
|
41
|
-
var googleTranscriptionModelOptions =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
47
|
+
var googleTranscriptionModelOptions = lazySchema2(
|
|
48
|
+
() => zodSchema2(
|
|
49
|
+
z2.object({
|
|
50
|
+
/**
|
|
51
|
+
* BCP-47 language codes providing hints about the languages present in the
|
|
52
|
+
* audio. If omitted or empty, defaults to automatic language detection.
|
|
53
|
+
*/
|
|
54
|
+
languageCodes: z2.array(z2.string()).optional(),
|
|
55
|
+
/**
|
|
56
|
+
* Custom vocabulary phrases, which bias the speech recognition model
|
|
57
|
+
* toward recognizing specific terms.
|
|
58
|
+
*/
|
|
59
|
+
customVocabulary: z2.array(z2.string()).optional(),
|
|
60
|
+
/**
|
|
61
|
+
* Enables word-level timestamp generation.
|
|
62
|
+
*/
|
|
63
|
+
wordTimestamp: z2.boolean().optional(),
|
|
64
|
+
/**
|
|
65
|
+
* Enables speaker diarization.
|
|
66
|
+
*/
|
|
67
|
+
diarization: z2.boolean().optional(),
|
|
68
|
+
/**
|
|
69
|
+
* Transcription output formatting mode.
|
|
70
|
+
*
|
|
71
|
+
* - `VERBATIM` (default): exact literal transcript preserving filler
|
|
72
|
+
* words, repetitions, and false starts.
|
|
73
|
+
* - `SMART`: cleans up and structures the transcript in real time —
|
|
74
|
+
* disfluency removal, inline self-corrections, structured formatting
|
|
75
|
+
* (lists, numbers, dates, paragraph breaks), and grammar/casing polish.
|
|
76
|
+
*/
|
|
77
|
+
mode: z2.enum(["SMART", "VERBATIM"]).optional()
|
|
78
|
+
})
|
|
79
|
+
)
|
|
80
|
+
);
|
|
71
81
|
|
|
72
82
|
// src/transcription/google-transcription-model.ts
|
|
73
83
|
function isLiveTranscriptionModelId(modelId) {
|
|
@@ -191,29 +201,33 @@ function parseOffsetSeconds(offset) {
|
|
|
191
201
|
const parsed = Number.parseFloat(offset);
|
|
192
202
|
return Number.isFinite(parsed) ? parsed : void 0;
|
|
193
203
|
}
|
|
194
|
-
var googleInteractionsWordAnnotationSchema = z3.object({
|
|
204
|
+
var googleInteractionsWordAnnotationSchema = () => z3.object({
|
|
195
205
|
type: z3.string().nullish(),
|
|
196
206
|
text: z3.string().nullish(),
|
|
197
207
|
speaker: z3.string().nullish(),
|
|
198
208
|
start_offset: z3.string().nullish(),
|
|
199
209
|
end_offset: z3.string().nullish()
|
|
200
210
|
});
|
|
201
|
-
var googleInteractionsTranscriptionResponseSchema =
|
|
202
|
-
|
|
203
|
-
steps: z3.array(
|
|
211
|
+
var googleInteractionsTranscriptionResponseSchema = lazySchema3(
|
|
212
|
+
() => zodSchema3(
|
|
204
213
|
z3.object({
|
|
205
|
-
|
|
206
|
-
|
|
214
|
+
status: z3.string().nullish(),
|
|
215
|
+
steps: z3.array(
|
|
207
216
|
z3.object({
|
|
208
217
|
type: z3.string().nullish(),
|
|
209
|
-
|
|
210
|
-
|
|
218
|
+
content: z3.array(
|
|
219
|
+
z3.object({
|
|
220
|
+
type: z3.string().nullish(),
|
|
221
|
+
text: z3.string().nullish(),
|
|
222
|
+
annotations: z3.array(googleInteractionsWordAnnotationSchema()).nullish()
|
|
223
|
+
})
|
|
224
|
+
).nullish()
|
|
211
225
|
})
|
|
212
|
-
).nullish()
|
|
226
|
+
).nullish(),
|
|
227
|
+
usage: z3.record(z3.string(), z3.unknown()).nullish()
|
|
213
228
|
})
|
|
214
|
-
)
|
|
215
|
-
|
|
216
|
-
});
|
|
229
|
+
)
|
|
230
|
+
);
|
|
217
231
|
|
|
218
232
|
// src/google-provider.ts
|
|
219
233
|
import {
|
|
@@ -224,7 +238,7 @@ import {
|
|
|
224
238
|
} from "@ai-sdk/provider-utils";
|
|
225
239
|
|
|
226
240
|
// src/version.ts
|
|
227
|
-
var VERSION = true ? "3.0.
|
|
241
|
+
var VERSION = true ? "3.0.137" : "0.0.0-test";
|
|
228
242
|
|
|
229
243
|
// src/google-generative-ai-embedding-model.ts
|
|
230
244
|
import {
|
|
@@ -234,21 +248,21 @@ import {
|
|
|
234
248
|
combineHeaders as combineHeaders2,
|
|
235
249
|
createJsonResponseHandler as createJsonResponseHandler2,
|
|
236
250
|
EXPERIMENTAL_EMBEDDING_MODEL_PROVIDER_OPTIONS_TRANSFORMER,
|
|
237
|
-
lazySchema as
|
|
251
|
+
lazySchema as lazySchema5,
|
|
238
252
|
parseProviderOptions as parseProviderOptions2,
|
|
239
253
|
postJsonToApi as postJsonToApi2,
|
|
240
254
|
resolve as resolve2,
|
|
241
|
-
zodSchema as
|
|
255
|
+
zodSchema as zodSchema5
|
|
242
256
|
} from "@ai-sdk/provider-utils";
|
|
243
257
|
import { z as z5 } from "zod/v4";
|
|
244
258
|
|
|
245
259
|
// src/google-generative-ai-embedding-options.ts
|
|
246
260
|
import {
|
|
247
|
-
lazySchema as
|
|
248
|
-
zodSchema as
|
|
261
|
+
lazySchema as lazySchema4,
|
|
262
|
+
zodSchema as zodSchema4
|
|
249
263
|
} from "@ai-sdk/provider-utils";
|
|
250
264
|
import { z as z4 } from "zod/v4";
|
|
251
|
-
var googleEmbeddingContentPartSchema = z4.union([
|
|
265
|
+
var googleEmbeddingContentPartSchema = () => z4.union([
|
|
252
266
|
z4.object({ text: z4.string() }),
|
|
253
267
|
z4.object({
|
|
254
268
|
inlineData: z4.object({
|
|
@@ -263,8 +277,8 @@ var googleEmbeddingContentPartSchema = z4.union([
|
|
|
263
277
|
})
|
|
264
278
|
})
|
|
265
279
|
]);
|
|
266
|
-
var googleEmbeddingModelOptions =
|
|
267
|
-
() =>
|
|
280
|
+
var googleEmbeddingModelOptions = lazySchema4(
|
|
281
|
+
() => zodSchema4(
|
|
268
282
|
z4.object({
|
|
269
283
|
/**
|
|
270
284
|
* Optional. Optional reduced dimension for the output embedding.
|
|
@@ -302,7 +316,7 @@ var googleEmbeddingModelOptions = lazySchema2(
|
|
|
302
316
|
* The array length must match the number of values being embedded. In
|
|
303
317
|
* the case of a single embedding, the array length must be 1.
|
|
304
318
|
*/
|
|
305
|
-
content: z4.array(z4.array(googleEmbeddingContentPartSchema).min(1).nullable()).optional()
|
|
319
|
+
content: z4.array(z4.array(googleEmbeddingContentPartSchema()).min(1).nullable()).optional()
|
|
306
320
|
})
|
|
307
321
|
)
|
|
308
322
|
);
|
|
@@ -434,15 +448,15 @@ var GoogleGenerativeAIEmbeddingModel = class {
|
|
|
434
448
|
};
|
|
435
449
|
}
|
|
436
450
|
};
|
|
437
|
-
var googleGenerativeAITextEmbeddingResponseSchema =
|
|
438
|
-
() =>
|
|
451
|
+
var googleGenerativeAITextEmbeddingResponseSchema = lazySchema5(
|
|
452
|
+
() => zodSchema5(
|
|
439
453
|
z5.object({
|
|
440
454
|
embeddings: z5.array(z5.object({ values: z5.array(z5.number()) }))
|
|
441
455
|
})
|
|
442
456
|
)
|
|
443
457
|
);
|
|
444
|
-
var googleGenerativeAISingleEmbeddingResponseSchema =
|
|
445
|
-
() =>
|
|
458
|
+
var googleGenerativeAISingleEmbeddingResponseSchema = lazySchema5(
|
|
459
|
+
() => zodSchema5(
|
|
446
460
|
z5.object({
|
|
447
461
|
embedding: z5.object({ values: z5.array(z5.number()) })
|
|
448
462
|
})
|
|
@@ -465,11 +479,11 @@ import {
|
|
|
465
479
|
createEventSourceResponseHandler,
|
|
466
480
|
createJsonResponseHandler as createJsonResponseHandler3,
|
|
467
481
|
generateId,
|
|
468
|
-
lazySchema as
|
|
482
|
+
lazySchema as lazySchema7,
|
|
469
483
|
parseProviderOptions as parseProviderOptions3,
|
|
470
484
|
postJsonToApi as postJsonToApi3,
|
|
471
485
|
resolve as resolve3,
|
|
472
|
-
zodSchema as
|
|
486
|
+
zodSchema as zodSchema7
|
|
473
487
|
} from "@ai-sdk/provider-utils";
|
|
474
488
|
import { z as z7 } from "zod/v4";
|
|
475
489
|
|
|
@@ -1354,12 +1368,12 @@ function getModelPath(modelId) {
|
|
|
1354
1368
|
|
|
1355
1369
|
// src/google-generative-ai-options.ts
|
|
1356
1370
|
import {
|
|
1357
|
-
lazySchema as
|
|
1358
|
-
zodSchema as
|
|
1371
|
+
lazySchema as lazySchema6,
|
|
1372
|
+
zodSchema as zodSchema6
|
|
1359
1373
|
} from "@ai-sdk/provider-utils";
|
|
1360
1374
|
import { z as z6 } from "zod/v4";
|
|
1361
|
-
var googleLanguageModelOptions =
|
|
1362
|
-
() =>
|
|
1375
|
+
var googleLanguageModelOptions = lazySchema6(
|
|
1376
|
+
() => zodSchema6(
|
|
1363
1377
|
z6.object({
|
|
1364
1378
|
responseModalities: z6.array(z6.enum(["TEXT", "IMAGE"])).optional(),
|
|
1365
1379
|
thinkingConfig: z6.object({
|
|
@@ -3193,7 +3207,7 @@ var getGroundingMetadataSchema = () => z7.object({
|
|
|
3193
3207
|
z7.object({})
|
|
3194
3208
|
]).nullish()
|
|
3195
3209
|
});
|
|
3196
|
-
var partialArgSchema = z7.object({
|
|
3210
|
+
var partialArgSchema = () => z7.object({
|
|
3197
3211
|
jsonPath: z7.string(),
|
|
3198
3212
|
stringValue: z7.string().nullish(),
|
|
3199
3213
|
numberValue: z7.number().nullish(),
|
|
@@ -3210,7 +3224,7 @@ var getContentSchema = () => z7.object({
|
|
|
3210
3224
|
id: z7.string().nullish(),
|
|
3211
3225
|
name: z7.string().nullish(),
|
|
3212
3226
|
args: z7.unknown().nullish(),
|
|
3213
|
-
partialArgs: z7.array(partialArgSchema).nullish(),
|
|
3227
|
+
partialArgs: z7.array(partialArgSchema()).nullish(),
|
|
3214
3228
|
willContinue: z7.boolean().nullish()
|
|
3215
3229
|
}),
|
|
3216
3230
|
thoughtSignature: z7.string().nullish()
|
|
@@ -3263,13 +3277,13 @@ var getSafetyRatingSchema = () => z7.object({
|
|
|
3263
3277
|
severityScore: z7.number().nullish(),
|
|
3264
3278
|
blocked: z7.boolean().nullish()
|
|
3265
3279
|
});
|
|
3266
|
-
var tokenDetailsSchema = z7.array(
|
|
3280
|
+
var tokenDetailsSchema = () => z7.array(
|
|
3267
3281
|
z7.object({
|
|
3268
3282
|
modality: z7.string(),
|
|
3269
3283
|
tokenCount: z7.number()
|
|
3270
3284
|
}).catchall(z7.json())
|
|
3271
3285
|
).nullish();
|
|
3272
|
-
var usageSchema = z7.object({
|
|
3286
|
+
var usageSchema = () => z7.object({
|
|
3273
3287
|
cachedContentTokenCount: z7.number().nullish(),
|
|
3274
3288
|
thoughtsTokenCount: z7.number().nullish(),
|
|
3275
3289
|
promptTokenCount: z7.number().nullish(),
|
|
@@ -3280,10 +3294,10 @@ var usageSchema = z7.object({
|
|
|
3280
3294
|
trafficType: z7.string().nullish(),
|
|
3281
3295
|
serviceTier: z7.string().nullish(),
|
|
3282
3296
|
// https://ai.google.dev/api/generate-content#Modality
|
|
3283
|
-
promptTokensDetails: tokenDetailsSchema,
|
|
3284
|
-
cacheTokensDetails: tokenDetailsSchema,
|
|
3285
|
-
candidatesTokensDetails: tokenDetailsSchema,
|
|
3286
|
-
toolUsePromptTokensDetails: tokenDetailsSchema
|
|
3297
|
+
promptTokensDetails: tokenDetailsSchema(),
|
|
3298
|
+
cacheTokensDetails: tokenDetailsSchema(),
|
|
3299
|
+
candidatesTokensDetails: tokenDetailsSchema(),
|
|
3300
|
+
toolUsePromptTokensDetails: tokenDetailsSchema()
|
|
3287
3301
|
}).catchall(z7.json());
|
|
3288
3302
|
var getUrlContextMetadataSchema = () => z7.object({
|
|
3289
3303
|
urlMetadata: z7.array(
|
|
@@ -3293,8 +3307,8 @@ var getUrlContextMetadataSchema = () => z7.object({
|
|
|
3293
3307
|
})
|
|
3294
3308
|
).nullish()
|
|
3295
3309
|
});
|
|
3296
|
-
var responseSchema =
|
|
3297
|
-
() =>
|
|
3310
|
+
var responseSchema = lazySchema7(
|
|
3311
|
+
() => zodSchema7(
|
|
3298
3312
|
z7.object({
|
|
3299
3313
|
responseId: z7.string().nullish(),
|
|
3300
3314
|
candidates: z7.array(
|
|
@@ -3308,7 +3322,7 @@ var responseSchema = lazySchema5(
|
|
|
3308
3322
|
urlContextMetadata: getUrlContextMetadataSchema().nullish()
|
|
3309
3323
|
})
|
|
3310
3324
|
).nullish(),
|
|
3311
|
-
usageMetadata: usageSchema.nullish(),
|
|
3325
|
+
usageMetadata: usageSchema().nullish(),
|
|
3312
3326
|
promptFeedback: z7.object({
|
|
3313
3327
|
blockReason: z7.string().nullish(),
|
|
3314
3328
|
safetyRatings: z7.array(getSafetyRatingSchema()).nullish()
|
|
@@ -3316,8 +3330,8 @@ var responseSchema = lazySchema5(
|
|
|
3316
3330
|
})
|
|
3317
3331
|
)
|
|
3318
3332
|
);
|
|
3319
|
-
var chunkSchema =
|
|
3320
|
-
() =>
|
|
3333
|
+
var chunkSchema = lazySchema7(
|
|
3334
|
+
() => zodSchema7(
|
|
3321
3335
|
z7.object({
|
|
3322
3336
|
responseId: z7.string().nullish(),
|
|
3323
3337
|
candidates: z7.array(
|
|
@@ -3331,7 +3345,7 @@ var chunkSchema = lazySchema5(
|
|
|
3331
3345
|
urlContextMetadata: getUrlContextMetadataSchema().nullish()
|
|
3332
3346
|
})
|
|
3333
3347
|
).nullish(),
|
|
3334
|
-
usageMetadata: usageSchema.nullish(),
|
|
3348
|
+
usageMetadata: usageSchema().nullish(),
|
|
3335
3349
|
promptFeedback: z7.object({
|
|
3336
3350
|
blockReason: z7.string().nullish(),
|
|
3337
3351
|
safetyRatings: z7.array(getSafetyRatingSchema()).nullish()
|
|
@@ -3361,23 +3375,23 @@ var codeExecution = createProviderToolFactoryWithOutputSchema({
|
|
|
3361
3375
|
// src/tool/enterprise-web-search.ts
|
|
3362
3376
|
import {
|
|
3363
3377
|
createProviderToolFactory,
|
|
3364
|
-
lazySchema as
|
|
3365
|
-
zodSchema as
|
|
3378
|
+
lazySchema as lazySchema8,
|
|
3379
|
+
zodSchema as zodSchema8
|
|
3366
3380
|
} from "@ai-sdk/provider-utils";
|
|
3367
3381
|
import { z as z9 } from "zod/v4";
|
|
3368
3382
|
var enterpriseWebSearch = createProviderToolFactory({
|
|
3369
3383
|
id: "google.enterprise_web_search",
|
|
3370
|
-
inputSchema:
|
|
3384
|
+
inputSchema: lazySchema8(() => zodSchema8(z9.object({})))
|
|
3371
3385
|
});
|
|
3372
3386
|
|
|
3373
3387
|
// src/tool/file-search.ts
|
|
3374
3388
|
import {
|
|
3375
3389
|
createProviderToolFactory as createProviderToolFactory2,
|
|
3376
|
-
lazySchema as
|
|
3377
|
-
zodSchema as
|
|
3390
|
+
lazySchema as lazySchema9,
|
|
3391
|
+
zodSchema as zodSchema9
|
|
3378
3392
|
} from "@ai-sdk/provider-utils";
|
|
3379
3393
|
import { z as z10 } from "zod/v4";
|
|
3380
|
-
var fileSearchArgsBaseSchema = z10.object({
|
|
3394
|
+
var fileSearchArgsBaseSchema = () => z10.object({
|
|
3381
3395
|
/** The names of the file_search_stores to retrieve from.
|
|
3382
3396
|
* Example: `fileSearchStores/my-file-search-store-123`
|
|
3383
3397
|
*/
|
|
@@ -3393,8 +3407,8 @@ var fileSearchArgsBaseSchema = z10.object({
|
|
|
3393
3407
|
"Metadata filter to apply to the file search retrieval documents. See https://google.aip.dev/160 for the syntax of the filter expression."
|
|
3394
3408
|
).optional()
|
|
3395
3409
|
}).passthrough();
|
|
3396
|
-
var fileSearchArgsSchema =
|
|
3397
|
-
() =>
|
|
3410
|
+
var fileSearchArgsSchema = lazySchema9(
|
|
3411
|
+
() => zodSchema9(fileSearchArgsBaseSchema())
|
|
3398
3412
|
);
|
|
3399
3413
|
var fileSearch = createProviderToolFactory2({
|
|
3400
3414
|
id: "google.file_search",
|
|
@@ -3404,23 +3418,23 @@ var fileSearch = createProviderToolFactory2({
|
|
|
3404
3418
|
// src/tool/google-maps.ts
|
|
3405
3419
|
import {
|
|
3406
3420
|
createProviderToolFactory as createProviderToolFactory3,
|
|
3407
|
-
lazySchema as
|
|
3408
|
-
zodSchema as
|
|
3421
|
+
lazySchema as lazySchema10,
|
|
3422
|
+
zodSchema as zodSchema10
|
|
3409
3423
|
} from "@ai-sdk/provider-utils";
|
|
3410
3424
|
import { z as z11 } from "zod/v4";
|
|
3411
3425
|
var googleMaps = createProviderToolFactory3({
|
|
3412
3426
|
id: "google.google_maps",
|
|
3413
|
-
inputSchema:
|
|
3427
|
+
inputSchema: lazySchema10(() => zodSchema10(z11.object({})))
|
|
3414
3428
|
});
|
|
3415
3429
|
|
|
3416
3430
|
// src/tool/google-search.ts
|
|
3417
3431
|
import {
|
|
3418
3432
|
createProviderToolFactory as createProviderToolFactory4,
|
|
3419
|
-
lazySchema as
|
|
3420
|
-
zodSchema as
|
|
3433
|
+
lazySchema as lazySchema11,
|
|
3434
|
+
zodSchema as zodSchema11
|
|
3421
3435
|
} from "@ai-sdk/provider-utils";
|
|
3422
3436
|
import { z as z12 } from "zod/v4";
|
|
3423
|
-
var googleSearchToolArgsBaseSchema = z12.object({
|
|
3437
|
+
var googleSearchToolArgsBaseSchema = () => z12.object({
|
|
3424
3438
|
searchTypes: z12.object({
|
|
3425
3439
|
webSearch: z12.object({}).optional(),
|
|
3426
3440
|
imageSearch: z12.object({}).optional()
|
|
@@ -3430,8 +3444,8 @@ var googleSearchToolArgsBaseSchema = z12.object({
|
|
|
3430
3444
|
endTime: z12.string()
|
|
3431
3445
|
}).optional()
|
|
3432
3446
|
}).passthrough();
|
|
3433
|
-
var googleSearchToolArgsSchema =
|
|
3434
|
-
() =>
|
|
3447
|
+
var googleSearchToolArgsSchema = lazySchema11(
|
|
3448
|
+
() => zodSchema11(googleSearchToolArgsBaseSchema())
|
|
3435
3449
|
);
|
|
3436
3450
|
var googleSearch = createProviderToolFactory4(
|
|
3437
3451
|
{
|
|
@@ -3443,13 +3457,13 @@ var googleSearch = createProviderToolFactory4(
|
|
|
3443
3457
|
// src/tool/url-context.ts
|
|
3444
3458
|
import {
|
|
3445
3459
|
createProviderToolFactory as createProviderToolFactory5,
|
|
3446
|
-
lazySchema as
|
|
3447
|
-
zodSchema as
|
|
3460
|
+
lazySchema as lazySchema12,
|
|
3461
|
+
zodSchema as zodSchema12
|
|
3448
3462
|
} from "@ai-sdk/provider-utils";
|
|
3449
3463
|
import { z as z13 } from "zod/v4";
|
|
3450
3464
|
var urlContext = createProviderToolFactory5({
|
|
3451
3465
|
id: "google.url_context",
|
|
3452
|
-
inputSchema:
|
|
3466
|
+
inputSchema: lazySchema12(() => zodSchema12(z13.object({})))
|
|
3453
3467
|
});
|
|
3454
3468
|
|
|
3455
3469
|
// src/tool/vertex-rag-store.ts
|
|
@@ -3529,11 +3543,11 @@ import {
|
|
|
3529
3543
|
convertToBase64 as convertToBase643,
|
|
3530
3544
|
createJsonResponseHandler as createJsonResponseHandler4,
|
|
3531
3545
|
generateId as defaultGenerateId,
|
|
3532
|
-
lazySchema as
|
|
3546
|
+
lazySchema as lazySchema13,
|
|
3533
3547
|
parseProviderOptions as parseProviderOptions4,
|
|
3534
3548
|
postJsonToApi as postJsonToApi4,
|
|
3535
3549
|
resolve as resolve4,
|
|
3536
|
-
zodSchema as
|
|
3550
|
+
zodSchema as zodSchema13
|
|
3537
3551
|
} from "@ai-sdk/provider-utils";
|
|
3538
3552
|
import { z as z15 } from "zod/v4";
|
|
3539
3553
|
var GoogleGenerativeAIImageModel = class {
|
|
@@ -3789,8 +3803,8 @@ var GoogleGenerativeAIImageModel = class {
|
|
|
3789
3803
|
function isGeminiModel(modelId) {
|
|
3790
3804
|
return modelId.startsWith("gemini-");
|
|
3791
3805
|
}
|
|
3792
|
-
var googleImageResponseSchema =
|
|
3793
|
-
() =>
|
|
3806
|
+
var googleImageResponseSchema = lazySchema13(
|
|
3807
|
+
() => zodSchema13(
|
|
3794
3808
|
z15.object({
|
|
3795
3809
|
predictions: z15.array(
|
|
3796
3810
|
z15.union([
|
|
@@ -3801,8 +3815,8 @@ var googleImageResponseSchema = lazySchema11(
|
|
|
3801
3815
|
})
|
|
3802
3816
|
)
|
|
3803
3817
|
);
|
|
3804
|
-
var googleImageModelOptionsSchema =
|
|
3805
|
-
() =>
|
|
3818
|
+
var googleImageModelOptionsSchema = lazySchema13(
|
|
3819
|
+
() => zodSchema13(
|
|
3806
3820
|
z15.object({
|
|
3807
3821
|
personGeneration: z15.enum(["dont_allow", "allow_adult", "allow_all"]).nullish(),
|
|
3808
3822
|
aspectRatio: z15.enum(["1:1", "3:4", "4:3", "9:16", "16:9"]).nullish(),
|
|
@@ -3815,7 +3829,7 @@ var googleImageModelOptionsSchema = lazySchema11(
|
|
|
3815
3829
|
* dedicated escape hatch for grounding image generation the same way
|
|
3816
3830
|
* `generateText` does.
|
|
3817
3831
|
*/
|
|
3818
|
-
googleSearch: googleSearchToolArgsBaseSchema.optional()
|
|
3832
|
+
googleSearch: googleSearchToolArgsBaseSchema().optional()
|
|
3819
3833
|
})
|
|
3820
3834
|
)
|
|
3821
3835
|
);
|
|
@@ -3831,11 +3845,11 @@ import {
|
|
|
3831
3845
|
delay,
|
|
3832
3846
|
getFromApi,
|
|
3833
3847
|
isSameOrigin,
|
|
3834
|
-
lazySchema as
|
|
3848
|
+
lazySchema as lazySchema14,
|
|
3835
3849
|
parseProviderOptions as parseProviderOptions5,
|
|
3836
3850
|
postJsonToApi as postJsonToApi5,
|
|
3837
3851
|
resolve as resolve5,
|
|
3838
|
-
zodSchema as
|
|
3852
|
+
zodSchema as zodSchema14
|
|
3839
3853
|
} from "@ai-sdk/provider-utils";
|
|
3840
3854
|
import { z as z16 } from "zod/v4";
|
|
3841
3855
|
function getFirstFrameImage(options) {
|
|
@@ -4102,28 +4116,32 @@ var GoogleGenerativeAIVideoModel = class {
|
|
|
4102
4116
|
};
|
|
4103
4117
|
}
|
|
4104
4118
|
};
|
|
4105
|
-
var googleOperationSchema =
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
z16.object({
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
})
|
|
4125
|
-
|
|
4126
|
-
|
|
4119
|
+
var googleOperationSchema = lazySchema14(
|
|
4120
|
+
() => zodSchema14(
|
|
4121
|
+
z16.object({
|
|
4122
|
+
name: z16.string().nullish(),
|
|
4123
|
+
done: z16.boolean().nullish(),
|
|
4124
|
+
error: z16.object({
|
|
4125
|
+
code: z16.number().nullish(),
|
|
4126
|
+
message: z16.string(),
|
|
4127
|
+
status: z16.string().nullish()
|
|
4128
|
+
}).nullish(),
|
|
4129
|
+
response: z16.object({
|
|
4130
|
+
generateVideoResponse: z16.object({
|
|
4131
|
+
generatedSamples: z16.array(
|
|
4132
|
+
z16.object({
|
|
4133
|
+
video: z16.object({
|
|
4134
|
+
uri: z16.string().nullish()
|
|
4135
|
+
}).nullish()
|
|
4136
|
+
})
|
|
4137
|
+
).nullish()
|
|
4138
|
+
}).nullish()
|
|
4139
|
+
}).nullish()
|
|
4140
|
+
})
|
|
4141
|
+
)
|
|
4142
|
+
);
|
|
4143
|
+
var googleVideoModelOptionsSchema = lazySchema14(
|
|
4144
|
+
() => zodSchema14(
|
|
4127
4145
|
z16.object({
|
|
4128
4146
|
pollIntervalMs: z16.number().positive().nullish(),
|
|
4129
4147
|
pollTimeoutMs: z16.number().positive().nullish(),
|
|
@@ -5305,8 +5323,8 @@ ${block.text}`
|
|
|
5305
5323
|
|
|
5306
5324
|
// src/interactions/google-interactions-api.ts
|
|
5307
5325
|
import {
|
|
5308
|
-
lazySchema as
|
|
5309
|
-
zodSchema as
|
|
5326
|
+
lazySchema as lazySchema15,
|
|
5327
|
+
zodSchema as zodSchema15
|
|
5310
5328
|
} from "@ai-sdk/provider-utils";
|
|
5311
5329
|
import { z as z17 } from "zod/v4";
|
|
5312
5330
|
var tokenByModalitySchema = () => z17.object({
|
|
@@ -5470,8 +5488,8 @@ var stepSchema = () => {
|
|
|
5470
5488
|
z17.object({ type: z17.string() }).loose()
|
|
5471
5489
|
]);
|
|
5472
5490
|
};
|
|
5473
|
-
var googleInteractionsResponseSchema =
|
|
5474
|
-
() =>
|
|
5491
|
+
var googleInteractionsResponseSchema = lazySchema15(
|
|
5492
|
+
() => zodSchema15(
|
|
5475
5493
|
z17.object({
|
|
5476
5494
|
/*
|
|
5477
5495
|
* `id` is omitted from the response body when `store: false` (fully
|
|
@@ -5492,8 +5510,8 @@ var googleInteractionsResponseSchema = lazySchema13(
|
|
|
5492
5510
|
}).loose()
|
|
5493
5511
|
)
|
|
5494
5512
|
);
|
|
5495
|
-
var googleInteractionsEventSchema =
|
|
5496
|
-
() =>
|
|
5513
|
+
var googleInteractionsEventSchema = lazySchema15(
|
|
5514
|
+
() => zodSchema15(
|
|
5497
5515
|
(() => {
|
|
5498
5516
|
const status = interactionStatusSchema();
|
|
5499
5517
|
const annotation = annotationSchema();
|
|
@@ -5651,12 +5669,12 @@ var googleInteractionsEventSchema = lazySchema13(
|
|
|
5651
5669
|
|
|
5652
5670
|
// src/interactions/google-interactions-language-model-options.ts
|
|
5653
5671
|
import {
|
|
5654
|
-
lazySchema as
|
|
5655
|
-
zodSchema as
|
|
5672
|
+
lazySchema as lazySchema16,
|
|
5673
|
+
zodSchema as zodSchema16
|
|
5656
5674
|
} from "@ai-sdk/provider-utils";
|
|
5657
5675
|
import { z as z18 } from "zod/v4";
|
|
5658
|
-
var googleInteractionsLanguageModelOptions =
|
|
5659
|
-
() =>
|
|
5676
|
+
var googleInteractionsLanguageModelOptions = lazySchema16(
|
|
5677
|
+
() => zodSchema16(
|
|
5660
5678
|
z18.object({
|
|
5661
5679
|
previousInteractionId: z18.string().nullish(),
|
|
5662
5680
|
store: z18.boolean().nullish(),
|