@ai-sdk/google 4.0.88 → 4.0.90
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 +32 -0
- package/dist/index.d.ts +16 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -5
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts +18 -2
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js +9 -2
- package/dist/internal/index.js.map +1 -1
- package/docs/15-google.mdx +20 -6
- package/package.json +5 -5
- package/src/google-batch.ts +4 -0
- package/src/google-image-model.ts +1 -0
- package/src/google-image-settings.ts +1 -0
- package/src/google-language-model-options.ts +1 -0
- package/src/google-language-model.ts +13 -0
- package/src/google-provider.ts +7 -0
- package/src/interactions/google-interactions-language-model-options.ts +1 -0
package/dist/internal/index.d.ts
CHANGED
|
@@ -81,7 +81,7 @@ type GoogleFunctionResponsePart = {
|
|
|
81
81
|
};
|
|
82
82
|
//#endregion
|
|
83
83
|
//#region src/google-language-model-options.d.ts
|
|
84
|
-
type GoogleModelId = 'gemini-2.0-flash' | 'gemini-2.0-flash-001' | 'gemini-2.0-flash-lite' | 'gemini-2.0-flash-lite-001' | 'gemini-2.5-pro' | 'gemini-2.5-flash' | 'gemini-2.5-flash-image' | 'gemini-2.5-flash-lite' | 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro-preview-tts' | 'gemini-2.5-flash-native-audio-latest' | 'gemini-2.5-flash-native-audio-preview-09-2025' | 'gemini-2.5-flash-native-audio-preview-12-2025' | 'gemini-2.5-computer-use-preview-10-2025' | 'gemini-3-pro-preview' | 'gemini-3-pro-image-preview' | 'gemini-3-flash-preview' | 'gemini-3.1-pro-preview' | 'gemini-3.1-pro-preview-customtools' | 'gemini-3.1-flash-image-preview' | 'gemini-3.1-flash-lite-preview' | 'gemini-3.1-flash-tts-preview' | 'gemini-3.5-flash' | 'gemini-3.5-flash-lite' | 'gemini-3.6-flash' | 'gemini-3.7-flash' | 'gemini-3.8-flash' | 'gemini-pro-latest' | 'gemini-flash-latest' | 'gemini-flash-lite-latest' | 'deep-research-pro-preview-12-2025' | 'deep-research-max-preview-04-2026' | 'deep-research-preview-04-2026' | 'nano-banana-pro-preview' | 'aqa' | 'gemini-robotics-er-1.5-preview' | 'gemma-3-1b-it' | 'gemma-3-4b-it' | 'gemma-3n-e4b-it' | 'gemma-3n-e2b-it' | 'gemma-3-12b-it' | 'gemma-3-27b-it' | (string & {});
|
|
84
|
+
type GoogleModelId = 'gemini-2.0-flash' | 'gemini-2.0-flash-001' | 'gemini-2.0-flash-lite' | 'gemini-2.0-flash-lite-001' | 'gemini-2.5-pro' | 'gemini-2.5-flash' | 'gemini-2.5-flash-image' | 'gemini-2.5-flash-lite' | 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro-preview-tts' | 'gemini-2.5-flash-native-audio-latest' | 'gemini-2.5-flash-native-audio-preview-09-2025' | 'gemini-2.5-flash-native-audio-preview-12-2025' | 'gemini-2.5-computer-use-preview-10-2025' | 'gemini-3-pro-preview' | 'gemini-3-pro-image-preview' | 'gemini-3-flash-preview' | 'gemini-3.1-pro-preview' | 'gemini-3.1-pro-preview-customtools' | 'gemini-3.1-flash-image-preview' | 'gemini-3.1-flash-lite-preview' | 'gemini-3.1-flash-tts-preview' | 'gemini-3.5-flash' | 'gemini-3.5-flash-lite' | 'gemini-3.6-flash' | 'gemini-3.7-flash' | 'gemini-3.8-flash' | 'gemini-nano-banana-2.1' | 'gemini-pro-latest' | 'gemini-flash-latest' | 'gemini-flash-lite-latest' | 'deep-research-pro-preview-12-2025' | 'deep-research-max-preview-04-2026' | 'deep-research-preview-04-2026' | 'nano-banana-pro-preview' | 'aqa' | 'gemini-robotics-er-1.5-preview' | 'gemma-3-1b-it' | 'gemma-3-4b-it' | 'gemma-3n-e4b-it' | 'gemma-3n-e2b-it' | 'gemma-3-12b-it' | 'gemma-3-27b-it' | (string & {});
|
|
85
85
|
//#endregion
|
|
86
86
|
//#region src/google-language-model.d.ts
|
|
87
87
|
export type GoogleLanguageModelConfig = {
|
|
@@ -230,6 +230,14 @@ export declare const getGroundingMetadataSchema: () => z.ZodObject<{
|
|
|
230
230
|
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
231
231
|
text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
232
232
|
fileSearchStore: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
233
|
+
customMetadata: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
234
|
+
key: z.ZodString;
|
|
235
|
+
stringValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
236
|
+
numericValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
237
|
+
stringListValue: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
238
|
+
values: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
239
|
+
}, z.core.$strip>>>;
|
|
240
|
+
}, z.core.$strip>>>>;
|
|
233
241
|
}, z.core.$strip>>>;
|
|
234
242
|
maps: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
235
243
|
uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -348,6 +356,14 @@ export declare const responseSchema: import("@ai-sdk/provider-utils").LazySchema
|
|
|
348
356
|
title?: string | null | undefined;
|
|
349
357
|
text?: string | null | undefined;
|
|
350
358
|
fileSearchStore?: string | null | undefined;
|
|
359
|
+
customMetadata?: {
|
|
360
|
+
key: string;
|
|
361
|
+
stringValue?: string | null | undefined;
|
|
362
|
+
numericValue?: number | null | undefined;
|
|
363
|
+
stringListValue?: {
|
|
364
|
+
values?: string[] | null | undefined;
|
|
365
|
+
} | null | undefined;
|
|
366
|
+
}[] | null | undefined;
|
|
351
367
|
} | null | undefined;
|
|
352
368
|
maps?: {
|
|
353
369
|
uri?: string | null | undefined;
|
|
@@ -569,7 +585,7 @@ export declare const googleTools: {
|
|
|
569
585
|
* the two surfaces (`:generateContent` vs `/interactions`) are independent and
|
|
570
586
|
* may diverge over time.
|
|
571
587
|
*/
|
|
572
|
-
type GoogleInteractionsModelId = 'gemini-2.5-computer-use-preview-10-2025' | 'gemini-2.5-flash' | 'gemini-2.5-flash-image' | 'gemini-2.5-flash-lite' | 'gemini-2.5-flash-lite-preview-09-2025' | 'gemini-2.5-flash-native-audio-preview-12-2025' | 'gemini-2.5-flash-preview-09-2025' | 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro' | 'gemini-2.5-pro-preview-tts' | 'gemini-3-flash-preview' | 'gemini-3-pro-image-preview' | 'gemini-3-pro-preview' | 'gemini-3.1-pro-preview' | 'gemini-3.1-flash-image-preview' | 'gemini-3.1-flash-lite-preview' | 'gemini-3.1-flash-tts-preview' | 'gemini-3.5-flash' | 'gemini-3.5-flash-lite' | 'gemini-3.6-flash' | 'gemini-3.7-flash' | 'gemini-3.8-flash' | 'lyria-3-clip-preview' | 'lyria-3-pro-preview' | (string & {});
|
|
588
|
+
type GoogleInteractionsModelId = 'gemini-2.5-computer-use-preview-10-2025' | 'gemini-2.5-flash' | 'gemini-2.5-flash-image' | 'gemini-2.5-flash-lite' | 'gemini-2.5-flash-lite-preview-09-2025' | 'gemini-2.5-flash-native-audio-preview-12-2025' | 'gemini-2.5-flash-preview-09-2025' | 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro' | 'gemini-2.5-pro-preview-tts' | 'gemini-3-flash-preview' | 'gemini-3-pro-image-preview' | 'gemini-3-pro-preview' | 'gemini-3.1-pro-preview' | 'gemini-3.1-flash-image-preview' | 'gemini-3.1-flash-lite-preview' | 'gemini-3.1-flash-tts-preview' | 'gemini-3.5-flash' | 'gemini-3.5-flash-lite' | 'gemini-3.6-flash' | 'gemini-3.7-flash' | 'gemini-3.8-flash' | 'gemini-nano-banana-2.1' | 'lyria-3-clip-preview' | 'lyria-3-pro-preview' | (string & {});
|
|
573
589
|
//#endregion
|
|
574
590
|
//#region src/interactions/google-interactions-language-model.d.ts
|
|
575
591
|
type GoogleInteractionsConfig = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":["_$__google_prompt0.GoogleContent","_$__google_prompt0.GoogleSystemInstruction"],"sources":["../../src/google-prompt.ts","../../src/google-language-model-options.ts","../../src/google-language-model.ts","../../src/google-speech-model-options.ts","../../src/google-speech-model.ts","../../src/google-speech-input.ts","../../src/google-tools.ts","../../src/interactions/google-interactions-language-model-options.ts","../../src/interactions/google-interactions-language-model.ts","../../src/interactions/google-interactions-agent.ts"],"mappings":";;;;KAaY;EACV,OAAO;IAAQ;;;KAGL;EACV;EACA,OAAO,MAAM;;KAGH;EACN;EAAc;EAAmB;;EAEjC;IAAc;IAAkB;;EAChC;EACA;;EAGA;IAAgB;IAAa;IAAc;;EAC3C;;EAGA;IACE;IACA;IACA;IACA,QAAQ,MAAM;;;EAIhB;IAAY;IAAkB;;EAC9B;EACA;;EAGA;IACE;IACA;IACA;;EAEF;;EAGA;IACE;IACA;IACA;;EAEF;;EAGA;IACE;IACA;;;EAIF;IACE;IACA;;;KAII;EAEN;IAAc;IAAkB;;;EAGhC;IAAY;IAAkB;;;;;KCzExB;;;YCuEA;EACV;EACA;EACA,UAAU,WAAW;EACrB,QAAQ;EACR;;;;EAKA,sBAAsB;;;;EAKtB;IACE;IACA;;;qBAIS,+BAA+B;WACjC;WAEA,SAAS;mBAED;mBACA;UAET,oBAAoB,OAAO;;;;UAO3B,sBAAsB;IAC5B;IACA,QAAQ;MACT;EAIW,YAAA,SAAS,eAAe,QAAQ;MAMxC;MAIA,iBAAa,eAAA,YAAA,YAAA,eAAA;SAIJ,iBACX,SACA,QACA,WACE,QACA,iBACA,aACA,MACA,MACA,kBACA,iBACA,eACA,gBACA,MACA,OACA,YACA,WACA,iBACA,eAEF;IAEA,SAAS;IACT,QAAQ;IACR,SAAS;IACT;MACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAFUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAqSG;SAqDP,iCACL,QACA,UACA,UACA,sBACA,iBACA;IAEA,QAAQ;IACR,UAAU,mBAAmB;IAC7B,UAAU;IACV;IACA,kBAAkB,kBAAkB;IACpC;MACE;EA2ME,WACJ,SAAS,6BACR,QAAQ;EAoDL,SACJ,SAAS,6BACR,QAAQ;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["_$__google_prompt0.GoogleContent","_$__google_prompt0.GoogleSystemInstruction"],"sources":["../../src/google-prompt.ts","../../src/google-language-model-options.ts","../../src/google-language-model.ts","../../src/google-speech-model-options.ts","../../src/google-speech-model.ts","../../src/google-speech-input.ts","../../src/google-tools.ts","../../src/interactions/google-interactions-language-model-options.ts","../../src/interactions/google-interactions-language-model.ts","../../src/interactions/google-interactions-agent.ts"],"mappings":";;;;KAaY;EACV,OAAO;IAAQ;;;KAGL;EACV;EACA,OAAO,MAAM;;KAGH;EACN;EAAc;EAAmB;;EAEjC;IAAc;IAAkB;;EAChC;EACA;;EAGA;IAAgB;IAAa;IAAc;;EAC3C;;EAGA;IACE;IACA;IACA;IACA,QAAQ,MAAM;;;EAIhB;IAAY;IAAkB;;EAC9B;EACA;;EAGA;IACE;IACA;IACA;;EAEF;;EAGA;IACE;IACA;IACA;;EAEF;;EAGA;IACE;IACA;;;EAIF;IACE;IACA;;;KAII;EAEN;IAAc;IAAkB;;;EAGhC;IAAY;IAAkB;;;;;KCzExB;;;YCuEA;EACV;EACA;EACA,UAAU,WAAW;EACrB,QAAQ;EACR;;;;EAKA,sBAAsB;;;;EAKtB;IACE;IACA;;;qBAIS,+BAA+B;WACjC;WAEA,SAAS;mBAED;mBACA;UAET,oBAAoB,OAAO;;;;UAO3B,sBAAsB;IAC5B;IACA,QAAQ;MACT;EAIW,YAAA,SAAS,eAAe,QAAQ;MAMxC;MAIA,iBAAa,eAAA,YAAA,YAAA,eAAA;SAIJ,iBACX,SACA,QACA,WACE,QAC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;;;;;;wBCnRhB,uBACd,MACA,OACA;EAEA;EACA;EACA,kBAAkB;;EACd;EAAc;;;;qBCLP;;;;;;;;kBAAA;oBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KCQD;;;KC2CA;EACV;EACA;EACA,UAAU,WAAW;EACrB,QAAQ;EACR;EACA,sBAAsB;;KAGZ,+BACR;EACE;;EACA;;qBAEO,2CAA2C;WAC7C;WAEA;;;;;WAMA;mBAEQ;UAET,oBAAoB,OAAO;;;;;UAU3B,sBAAsB;IAC5B;IACA;IACA,QAAQ;MACT;EAQC,YAAA,cAAc,8BACd,QAAQ;MAeN;MAIA,iBAAa,eAAA,YAAA,YAAA,eAAA;UAgBH;EAiVR,WACJ,SAAS,6BACR,QAAQ;EAmIL,SACJ,SAAS,6BACR,QAAQ;UAoFG;;;;;;;;;;;;;KClrBJ"}
|
package/dist/internal/index.js
CHANGED
|
@@ -1995,7 +1995,8 @@ function resolveGemini3ThinkingConfig({ reasoning, modelId, warnings }) {
|
|
|
1995
1995
|
low: "low",
|
|
1996
1996
|
medium: "medium",
|
|
1997
1997
|
high: "high",
|
|
1998
|
-
xhigh: "high"
|
|
1998
|
+
xhigh: "high",
|
|
1999
|
+
max: "high"
|
|
1999
2000
|
},
|
|
2000
2001
|
warnings
|
|
2001
2002
|
});
|
|
@@ -2120,7 +2121,13 @@ const getGroundingMetadataSchema = () => z.object({
|
|
|
2120
2121
|
uri: z.string().nullish(),
|
|
2121
2122
|
title: z.string().nullish(),
|
|
2122
2123
|
text: z.string().nullish(),
|
|
2123
|
-
fileSearchStore: z.string().nullish()
|
|
2124
|
+
fileSearchStore: z.string().nullish(),
|
|
2125
|
+
customMetadata: z.array(z.object({
|
|
2126
|
+
key: z.string(),
|
|
2127
|
+
stringValue: z.string().nullish(),
|
|
2128
|
+
numericValue: z.number().nullish(),
|
|
2129
|
+
stringListValue: z.object({ values: z.array(z.string()).nullish() }).nullish()
|
|
2130
|
+
})).nullish()
|
|
2124
2131
|
}).nullish(),
|
|
2125
2132
|
maps: z.object({
|
|
2126
2133
|
uri: z.string().nullish(),
|