@ai-sdk/google 3.0.119 → 3.0.121

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.
@@ -4306,8 +4306,8 @@ var googleInteractionsLanguageModelOptions = lazySchema10(
4306
4306
  thinkingSummaries: z12.enum(["auto", "none"]).nullish(),
4307
4307
  /**
4308
4308
  * Output-format entries that map directly to the API's `response_format`
4309
- * array. Use this to request image, audio, or non-JSON text outputs
4310
- * with full control over `mime_type`, `aspect_ratio`, and `image_size`.
4309
+ * array. Use this to request image, audio, video, or non-JSON text
4310
+ * outputs with modality-specific controls.
4311
4311
  *
4312
4312
  * Entries are sent in order. The AI SDK call-level `responseFormat: {
4313
4313
  * type: 'json', schema }` still drives JSON-mode and adds a matching
@@ -4344,6 +4344,14 @@ var googleInteractionsLanguageModelOptions = lazySchema10(
4344
4344
  z12.object({
4345
4345
  type: z12.literal("audio"),
4346
4346
  mimeType: z12.string().nullish()
4347
+ }).loose(),
4348
+ z12.object({
4349
+ type: z12.literal("video"),
4350
+ aspectRatio: z12.enum(["16:9", "9:16"]).nullish(),
4351
+ resolution: z12.enum(["360p", "720p", "1080p", "4k"]).nullish(),
4352
+ duration: z12.string().nullish(),
4353
+ delivery: z12.enum(["inline", "uri"]).nullish(),
4354
+ gcsUri: z12.string().nullish()
4347
4355
  }).loose()
4348
4356
  ])
4349
4357
  ).nullish(),
@@ -5244,7 +5252,7 @@ var GoogleInteractionsLanguageModel = class {
5244
5252
  };
5245
5253
  }
5246
5254
  async getArgs(options) {
5247
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A;
5255
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F;
5248
5256
  const warnings = [];
5249
5257
  const opts = await parseProviderOptions2({
5250
5258
  provider: "google",
@@ -5320,6 +5328,17 @@ var GoogleInteractionsLanguageModel = class {
5320
5328
  mime_type: (_g = entry.mimeType) != null ? _g : void 0
5321
5329
  })
5322
5330
  );
5331
+ } else if (entry.type === "video") {
5332
+ responseFormatEntries.push(
5333
+ pruneUndefined({
5334
+ type: "video",
5335
+ aspect_ratio: (_h = entry.aspectRatio) != null ? _h : void 0,
5336
+ resolution: (_i = entry.resolution) != null ? _i : void 0,
5337
+ duration: (_j = entry.duration) != null ? _j : void 0,
5338
+ delivery: (_k = entry.delivery) != null ? _k : void 0,
5339
+ gcs_uri: (_l = entry.gcsUri) != null ? _l : void 0
5340
+ })
5341
+ );
5323
5342
  }
5324
5343
  }
5325
5344
  }
@@ -5329,13 +5348,13 @@ var GoogleInteractionsLanguageModel = class {
5329
5348
  warnings: convWarnings
5330
5349
  } = convertToGoogleInteractionsInput({
5331
5350
  prompt: options.prompt,
5332
- previousInteractionId: (_h = opts == null ? void 0 : opts.previousInteractionId) != null ? _h : void 0,
5333
- store: (_i = opts == null ? void 0 : opts.store) != null ? _i : void 0,
5334
- mediaResolution: (_j = opts == null ? void 0 : opts.mediaResolution) != null ? _j : void 0
5351
+ previousInteractionId: (_m = opts == null ? void 0 : opts.previousInteractionId) != null ? _m : void 0,
5352
+ store: (_n = opts == null ? void 0 : opts.store) != null ? _n : void 0,
5353
+ mediaResolution: (_o = opts == null ? void 0 : opts.mediaResolution) != null ? _o : void 0
5335
5354
  });
5336
5355
  warnings.push(...convWarnings);
5337
5356
  let systemInstruction = convertedSystemInstruction;
5338
- const optionSystemInstruction = (_k = opts == null ? void 0 : opts.systemInstruction) != null ? _k : void 0;
5357
+ const optionSystemInstruction = (_p = opts == null ? void 0 : opts.systemInstruction) != null ? _p : void 0;
5339
5358
  if (systemInstruction != null && optionSystemInstruction != null) {
5340
5359
  warnings.push({
5341
5360
  type: "other",
@@ -5374,14 +5393,14 @@ var GoogleInteractionsLanguageModel = class {
5374
5393
  generationConfig = void 0;
5375
5394
  } else {
5376
5395
  generationConfig = pruneUndefined({
5377
- temperature: (_l = options.temperature) != null ? _l : void 0,
5378
- top_p: (_m = options.topP) != null ? _m : void 0,
5379
- top_k: (_n = options.topK) != null ? _n : void 0,
5380
- seed: (_o = options.seed) != null ? _o : void 0,
5396
+ temperature: (_q = options.temperature) != null ? _q : void 0,
5397
+ top_p: (_r = options.topP) != null ? _r : void 0,
5398
+ top_k: (_s = options.topK) != null ? _s : void 0,
5399
+ seed: (_t = options.seed) != null ? _t : void 0,
5381
5400
  stop_sequences: options.stopSequences != null && options.stopSequences.length > 0 ? options.stopSequences : void 0,
5382
- max_output_tokens: (_p = options.maxOutputTokens) != null ? _p : void 0,
5383
- thinking_level: (_q = opts == null ? void 0 : opts.thinkingLevel) != null ? _q : void 0,
5384
- thinking_summaries: (_r = opts == null ? void 0 : opts.thinkingSummaries) != null ? _r : void 0,
5401
+ max_output_tokens: (_u = options.maxOutputTokens) != null ? _u : void 0,
5402
+ thinking_level: (_v = opts == null ? void 0 : opts.thinkingLevel) != null ? _v : void 0,
5403
+ thinking_summaries: (_w = opts == null ? void 0 : opts.thinkingSummaries) != null ? _w : void 0,
5385
5404
  tool_choice: toolChoiceForBody
5386
5405
  });
5387
5406
  if ((opts == null ? void 0 : opts.imageConfig) != null) {
@@ -5408,9 +5427,9 @@ var GoogleInteractionsLanguageModel = class {
5408
5427
  if (ac.type === "deep-research") {
5409
5428
  agentConfig = pruneUndefined({
5410
5429
  type: "deep-research",
5411
- thinking_summaries: (_s = ac.thinkingSummaries) != null ? _s : void 0,
5412
- visualization: (_t = ac.visualization) != null ? _t : void 0,
5413
- collaborative_planning: (_u = ac.collaborativePlanning) != null ? _u : void 0
5430
+ thinking_summaries: (_x = ac.thinkingSummaries) != null ? _x : void 0,
5431
+ visualization: (_y = ac.visualization) != null ? _y : void 0,
5432
+ collaborative_planning: (_z = ac.collaborativePlanning) != null ? _z : void 0
5414
5433
  });
5415
5434
  } else if (ac.type === "dynamic") {
5416
5435
  agentConfig = { type: "dynamic" };
@@ -5427,7 +5446,7 @@ var GoogleInteractionsLanguageModel = class {
5427
5446
  environment = opts.environment;
5428
5447
  } else {
5429
5448
  const env = opts.environment;
5430
- const sources = (_v = env.sources) == null ? void 0 : _v.map((s) => {
5449
+ const sources = (_A = env.sources) == null ? void 0 : _A.map((s) => {
5431
5450
  var _a2;
5432
5451
  if (s.type === "inline") {
5433
5452
  return {
@@ -5472,20 +5491,20 @@ var GoogleInteractionsLanguageModel = class {
5472
5491
  tools: toolsForBody,
5473
5492
  response_format: responseFormatEntries.length > 0 ? responseFormatEntries : void 0,
5474
5493
  response_modalities: (opts == null ? void 0 : opts.responseModalities) != null ? opts.responseModalities : void 0,
5475
- previous_interaction_id: (_w = opts == null ? void 0 : opts.previousInteractionId) != null ? _w : void 0,
5476
- service_tier: (_x = opts == null ? void 0 : opts.serviceTier) != null ? _x : void 0,
5477
- store: (_y = opts == null ? void 0 : opts.store) != null ? _y : void 0,
5494
+ previous_interaction_id: (_B = opts == null ? void 0 : opts.previousInteractionId) != null ? _B : void 0,
5495
+ service_tier: (_C = opts == null ? void 0 : opts.serviceTier) != null ? _C : void 0,
5496
+ store: (_D = opts == null ? void 0 : opts.store) != null ? _D : void 0,
5478
5497
  generation_config: generationConfig != null && Object.keys(generationConfig).length > 0 ? generationConfig : void 0,
5479
5498
  agent_config: agentConfig,
5480
5499
  environment,
5481
- background: (_z = opts == null ? void 0 : opts.background) != null ? _z : void 0
5500
+ background: (_E = opts == null ? void 0 : opts.background) != null ? _E : void 0
5482
5501
  });
5483
5502
  return {
5484
5503
  args,
5485
5504
  warnings,
5486
5505
  isAgent,
5487
5506
  isBackground: (opts == null ? void 0 : opts.background) === true,
5488
- pollingTimeoutMs: (_A = opts == null ? void 0 : opts.pollingTimeoutMs) != null ? _A : void 0
5507
+ pollingTimeoutMs: (_F = opts == null ? void 0 : opts.pollingTimeoutMs) != null ? _F : void 0
5489
5508
  };
5490
5509
  }
5491
5510
  async doGenerate(options) {