@ai-sdk/google 3.0.26 → 3.0.28

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/dist/index.mjs CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  } from "@ai-sdk/provider-utils";
8
8
 
9
9
  // src/version.ts
10
- var VERSION = true ? "3.0.26" : "0.0.0-test";
10
+ var VERSION = true ? "3.0.28" : "0.0.0-test";
11
11
 
12
12
  // src/google-generative-ai-embedding-model.ts
13
13
  import {
@@ -425,8 +425,8 @@ function convertToGoogleGenerativeAIMessages(prompt, options) {
425
425
  contents.push({
426
426
  role: "model",
427
427
  parts: content.map((part) => {
428
- var _a2;
429
- const providerOpts = (_a2 = part.providerOptions) == null ? void 0 : _a2[providerOptionsName];
428
+ var _a2, _b2, _c2;
429
+ const providerOpts = (_c2 = (_a2 = part.providerOptions) == null ? void 0 : _a2[providerOptionsName]) != null ? _c2 : providerOptionsName !== "google" ? (_b2 = part.providerOptions) == null ? void 0 : _b2.google : void 0;
430
430
  const thoughtSignature = (providerOpts == null ? void 0 : providerOpts.thoughtSignature) != null ? String(providerOpts.thoughtSignature) : void 0;
431
431
  switch (part.type) {
432
432
  case "text": {
@@ -1998,7 +1998,9 @@ var GoogleGenerativeAIImageModel = class {
1998
1998
  providerOptions: {
1999
1999
  google: {
2000
2000
  responseModalities: ["IMAGE"],
2001
- imageConfig: aspectRatio ? { aspectRatio } : void 0,
2001
+ imageConfig: aspectRatio ? {
2002
+ aspectRatio
2003
+ } : void 0,
2002
2004
  ...(_c = providerOptions == null ? void 0 : providerOptions.google) != null ? _c : {}
2003
2005
  }
2004
2006
  },