@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.
- package/CHANGELOG.md +12 -0
- package/dist/index.d.mts +10 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js +43 -24
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43 -24
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +2 -2
- package/dist/internal/index.d.ts +2 -2
- package/dist/internal/index.js +42 -23
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +42 -23
- package/dist/internal/index.mjs.map +1 -1
- package/docs/15-google-generative-ai.mdx +33 -6
- package/package.json +1 -1
- package/src/google-generative-ai-options.ts +1 -0
- package/src/interactions/google-interactions-language-model-options.ts +13 -2
- package/src/interactions/google-interactions-language-model.ts +11 -0
- package/src/interactions/google-interactions-prompt.ts +15 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ai-sdk/google
|
|
2
2
|
|
|
3
|
+
## 3.0.121
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 13507cb: feat(google): add gemini-3.8-flash model
|
|
8
|
+
|
|
9
|
+
## 3.0.120
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- daaa769: fix(google): support video response formats in Gemini Interactions
|
|
14
|
+
|
|
3
15
|
## 3.0.119
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -13,7 +13,7 @@ declare const googleErrorDataSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
13
13
|
}>;
|
|
14
14
|
type GoogleErrorData = InferSchema<typeof googleErrorDataSchema>;
|
|
15
15
|
|
|
16
|
-
type GoogleGenerativeAIModelId = '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-pro-latest' | 'gemini-flash-latest' | 'gemini-flash-lite-latest' | 'deep-research-pro-preview-12-2025' | '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 & {});
|
|
16
|
+
type GoogleGenerativeAIModelId = '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' | '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 & {});
|
|
17
17
|
declare const googleLanguageModelOptions: _ai_sdk_provider_utils.LazySchema<{
|
|
18
18
|
responseModalities?: ("TEXT" | "IMAGE")[] | undefined;
|
|
19
19
|
thinkingConfig?: {
|
|
@@ -306,7 +306,7 @@ type GoogleVideoModelOptions = {
|
|
|
306
306
|
* the two surfaces (`:generateContent` vs `/interactions`) are independent and
|
|
307
307
|
* may diverge over time.
|
|
308
308
|
*/
|
|
309
|
-
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' | 'lyria-3-clip-preview' | 'lyria-3-pro-preview' | (string & {});
|
|
309
|
+
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 & {});
|
|
310
310
|
/**
|
|
311
311
|
* Provider-options schema for `google.interactions(...)` calls. Read from the
|
|
312
312
|
* shared `providerOptions.google.*` namespace (per PRD); per-call options that
|
|
@@ -344,6 +344,14 @@ declare const googleInteractionsLanguageModelOptions: _ai_sdk_provider_utils.Laz
|
|
|
344
344
|
[x: string]: unknown;
|
|
345
345
|
type: "audio";
|
|
346
346
|
mimeType?: string | null | undefined;
|
|
347
|
+
} | {
|
|
348
|
+
[x: string]: unknown;
|
|
349
|
+
type: "video";
|
|
350
|
+
aspectRatio?: "9:16" | "16:9" | null | undefined;
|
|
351
|
+
resolution?: "720p" | "1080p" | "4k" | "360p" | null | undefined;
|
|
352
|
+
duration?: string | null | undefined;
|
|
353
|
+
delivery?: "uri" | "inline" | null | undefined;
|
|
354
|
+
gcsUri?: string | null | undefined;
|
|
347
355
|
})[] | null | undefined;
|
|
348
356
|
imageConfig?: {
|
|
349
357
|
aspectRatio?: "1:1" | "2:3" | "3:2" | "3:4" | "4:3" | "4:5" | "5:4" | "9:16" | "16:9" | "21:9" | "1:8" | "8:1" | "1:4" | "4:1" | null | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ declare const googleErrorDataSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
13
13
|
}>;
|
|
14
14
|
type GoogleErrorData = InferSchema<typeof googleErrorDataSchema>;
|
|
15
15
|
|
|
16
|
-
type GoogleGenerativeAIModelId = '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-pro-latest' | 'gemini-flash-latest' | 'gemini-flash-lite-latest' | 'deep-research-pro-preview-12-2025' | '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 & {});
|
|
16
|
+
type GoogleGenerativeAIModelId = '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' | '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 & {});
|
|
17
17
|
declare const googleLanguageModelOptions: _ai_sdk_provider_utils.LazySchema<{
|
|
18
18
|
responseModalities?: ("TEXT" | "IMAGE")[] | undefined;
|
|
19
19
|
thinkingConfig?: {
|
|
@@ -306,7 +306,7 @@ type GoogleVideoModelOptions = {
|
|
|
306
306
|
* the two surfaces (`:generateContent` vs `/interactions`) are independent and
|
|
307
307
|
* may diverge over time.
|
|
308
308
|
*/
|
|
309
|
-
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' | 'lyria-3-clip-preview' | 'lyria-3-pro-preview' | (string & {});
|
|
309
|
+
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 & {});
|
|
310
310
|
/**
|
|
311
311
|
* Provider-options schema for `google.interactions(...)` calls. Read from the
|
|
312
312
|
* shared `providerOptions.google.*` namespace (per PRD); per-call options that
|
|
@@ -344,6 +344,14 @@ declare const googleInteractionsLanguageModelOptions: _ai_sdk_provider_utils.Laz
|
|
|
344
344
|
[x: string]: unknown;
|
|
345
345
|
type: "audio";
|
|
346
346
|
mimeType?: string | null | undefined;
|
|
347
|
+
} | {
|
|
348
|
+
[x: string]: unknown;
|
|
349
|
+
type: "video";
|
|
350
|
+
aspectRatio?: "9:16" | "16:9" | null | undefined;
|
|
351
|
+
resolution?: "720p" | "1080p" | "4k" | "360p" | null | undefined;
|
|
352
|
+
duration?: string | null | undefined;
|
|
353
|
+
delivery?: "uri" | "inline" | null | undefined;
|
|
354
|
+
gcsUri?: string | null | undefined;
|
|
347
355
|
})[] | null | undefined;
|
|
348
356
|
imageConfig?: {
|
|
349
357
|
aspectRatio?: "1:1" | "2:3" | "3:2" | "3:4" | "4:3" | "4:5" | "5:4" | "9:16" | "16:9" | "21:9" | "1:8" | "8:1" | "1:4" | "4:1" | null | undefined;
|
package/dist/index.js
CHANGED
|
@@ -235,7 +235,7 @@ var googleInteractionsTranscriptionResponseSchema = import_v43.z.object({
|
|
|
235
235
|
var import_provider_utils24 = require("@ai-sdk/provider-utils");
|
|
236
236
|
|
|
237
237
|
// src/version.ts
|
|
238
|
-
var VERSION = true ? "3.0.
|
|
238
|
+
var VERSION = true ? "3.0.121" : "0.0.0-test";
|
|
239
239
|
|
|
240
240
|
// src/google-generative-ai-embedding-model.ts
|
|
241
241
|
var import_provider2 = require("@ai-sdk/provider");
|
|
@@ -5241,8 +5241,8 @@ var googleInteractionsLanguageModelOptions = (0, import_provider_utils19.lazySch
|
|
|
5241
5241
|
thinkingSummaries: import_v418.z.enum(["auto", "none"]).nullish(),
|
|
5242
5242
|
/**
|
|
5243
5243
|
* Output-format entries that map directly to the API's `response_format`
|
|
5244
|
-
* array. Use this to request image, audio, or non-JSON text
|
|
5245
|
-
* with
|
|
5244
|
+
* array. Use this to request image, audio, video, or non-JSON text
|
|
5245
|
+
* outputs with modality-specific controls.
|
|
5246
5246
|
*
|
|
5247
5247
|
* Entries are sent in order. The AI SDK call-level `responseFormat: {
|
|
5248
5248
|
* type: 'json', schema }` still drives JSON-mode and adds a matching
|
|
@@ -5279,6 +5279,14 @@ var googleInteractionsLanguageModelOptions = (0, import_provider_utils19.lazySch
|
|
|
5279
5279
|
import_v418.z.object({
|
|
5280
5280
|
type: import_v418.z.literal("audio"),
|
|
5281
5281
|
mimeType: import_v418.z.string().nullish()
|
|
5282
|
+
}).loose(),
|
|
5283
|
+
import_v418.z.object({
|
|
5284
|
+
type: import_v418.z.literal("video"),
|
|
5285
|
+
aspectRatio: import_v418.z.enum(["16:9", "9:16"]).nullish(),
|
|
5286
|
+
resolution: import_v418.z.enum(["360p", "720p", "1080p", "4k"]).nullish(),
|
|
5287
|
+
duration: import_v418.z.string().nullish(),
|
|
5288
|
+
delivery: import_v418.z.enum(["inline", "uri"]).nullish(),
|
|
5289
|
+
gcsUri: import_v418.z.string().nullish()
|
|
5282
5290
|
}).loose()
|
|
5283
5291
|
])
|
|
5284
5292
|
).nullish(),
|
|
@@ -6165,7 +6173,7 @@ var GoogleInteractionsLanguageModel = class {
|
|
|
6165
6173
|
};
|
|
6166
6174
|
}
|
|
6167
6175
|
async getArgs(options) {
|
|
6168
|
-
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;
|
|
6176
|
+
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;
|
|
6169
6177
|
const warnings = [];
|
|
6170
6178
|
const opts = await (0, import_provider_utils23.parseProviderOptions)({
|
|
6171
6179
|
provider: "google",
|
|
@@ -6241,6 +6249,17 @@ var GoogleInteractionsLanguageModel = class {
|
|
|
6241
6249
|
mime_type: (_g = entry.mimeType) != null ? _g : void 0
|
|
6242
6250
|
})
|
|
6243
6251
|
);
|
|
6252
|
+
} else if (entry.type === "video") {
|
|
6253
|
+
responseFormatEntries.push(
|
|
6254
|
+
pruneUndefined({
|
|
6255
|
+
type: "video",
|
|
6256
|
+
aspect_ratio: (_h = entry.aspectRatio) != null ? _h : void 0,
|
|
6257
|
+
resolution: (_i = entry.resolution) != null ? _i : void 0,
|
|
6258
|
+
duration: (_j = entry.duration) != null ? _j : void 0,
|
|
6259
|
+
delivery: (_k = entry.delivery) != null ? _k : void 0,
|
|
6260
|
+
gcs_uri: (_l = entry.gcsUri) != null ? _l : void 0
|
|
6261
|
+
})
|
|
6262
|
+
);
|
|
6244
6263
|
}
|
|
6245
6264
|
}
|
|
6246
6265
|
}
|
|
@@ -6250,13 +6269,13 @@ var GoogleInteractionsLanguageModel = class {
|
|
|
6250
6269
|
warnings: convWarnings
|
|
6251
6270
|
} = convertToGoogleInteractionsInput({
|
|
6252
6271
|
prompt: options.prompt,
|
|
6253
|
-
previousInteractionId: (
|
|
6254
|
-
store: (
|
|
6255
|
-
mediaResolution: (
|
|
6272
|
+
previousInteractionId: (_m = opts == null ? void 0 : opts.previousInteractionId) != null ? _m : void 0,
|
|
6273
|
+
store: (_n = opts == null ? void 0 : opts.store) != null ? _n : void 0,
|
|
6274
|
+
mediaResolution: (_o = opts == null ? void 0 : opts.mediaResolution) != null ? _o : void 0
|
|
6256
6275
|
});
|
|
6257
6276
|
warnings.push(...convWarnings);
|
|
6258
6277
|
let systemInstruction = convertedSystemInstruction;
|
|
6259
|
-
const optionSystemInstruction = (
|
|
6278
|
+
const optionSystemInstruction = (_p = opts == null ? void 0 : opts.systemInstruction) != null ? _p : void 0;
|
|
6260
6279
|
if (systemInstruction != null && optionSystemInstruction != null) {
|
|
6261
6280
|
warnings.push({
|
|
6262
6281
|
type: "other",
|
|
@@ -6295,14 +6314,14 @@ var GoogleInteractionsLanguageModel = class {
|
|
|
6295
6314
|
generationConfig = void 0;
|
|
6296
6315
|
} else {
|
|
6297
6316
|
generationConfig = pruneUndefined({
|
|
6298
|
-
temperature: (
|
|
6299
|
-
top_p: (
|
|
6300
|
-
top_k: (
|
|
6301
|
-
seed: (
|
|
6317
|
+
temperature: (_q = options.temperature) != null ? _q : void 0,
|
|
6318
|
+
top_p: (_r = options.topP) != null ? _r : void 0,
|
|
6319
|
+
top_k: (_s = options.topK) != null ? _s : void 0,
|
|
6320
|
+
seed: (_t = options.seed) != null ? _t : void 0,
|
|
6302
6321
|
stop_sequences: options.stopSequences != null && options.stopSequences.length > 0 ? options.stopSequences : void 0,
|
|
6303
|
-
max_output_tokens: (
|
|
6304
|
-
thinking_level: (
|
|
6305
|
-
thinking_summaries: (
|
|
6322
|
+
max_output_tokens: (_u = options.maxOutputTokens) != null ? _u : void 0,
|
|
6323
|
+
thinking_level: (_v = opts == null ? void 0 : opts.thinkingLevel) != null ? _v : void 0,
|
|
6324
|
+
thinking_summaries: (_w = opts == null ? void 0 : opts.thinkingSummaries) != null ? _w : void 0,
|
|
6306
6325
|
tool_choice: toolChoiceForBody
|
|
6307
6326
|
});
|
|
6308
6327
|
if ((opts == null ? void 0 : opts.imageConfig) != null) {
|
|
@@ -6329,9 +6348,9 @@ var GoogleInteractionsLanguageModel = class {
|
|
|
6329
6348
|
if (ac.type === "deep-research") {
|
|
6330
6349
|
agentConfig = pruneUndefined({
|
|
6331
6350
|
type: "deep-research",
|
|
6332
|
-
thinking_summaries: (
|
|
6333
|
-
visualization: (
|
|
6334
|
-
collaborative_planning: (
|
|
6351
|
+
thinking_summaries: (_x = ac.thinkingSummaries) != null ? _x : void 0,
|
|
6352
|
+
visualization: (_y = ac.visualization) != null ? _y : void 0,
|
|
6353
|
+
collaborative_planning: (_z = ac.collaborativePlanning) != null ? _z : void 0
|
|
6335
6354
|
});
|
|
6336
6355
|
} else if (ac.type === "dynamic") {
|
|
6337
6356
|
agentConfig = { type: "dynamic" };
|
|
@@ -6348,7 +6367,7 @@ var GoogleInteractionsLanguageModel = class {
|
|
|
6348
6367
|
environment = opts.environment;
|
|
6349
6368
|
} else {
|
|
6350
6369
|
const env = opts.environment;
|
|
6351
|
-
const sources = (
|
|
6370
|
+
const sources = (_A = env.sources) == null ? void 0 : _A.map((s) => {
|
|
6352
6371
|
var _a2;
|
|
6353
6372
|
if (s.type === "inline") {
|
|
6354
6373
|
return {
|
|
@@ -6393,20 +6412,20 @@ var GoogleInteractionsLanguageModel = class {
|
|
|
6393
6412
|
tools: toolsForBody,
|
|
6394
6413
|
response_format: responseFormatEntries.length > 0 ? responseFormatEntries : void 0,
|
|
6395
6414
|
response_modalities: (opts == null ? void 0 : opts.responseModalities) != null ? opts.responseModalities : void 0,
|
|
6396
|
-
previous_interaction_id: (
|
|
6397
|
-
service_tier: (
|
|
6398
|
-
store: (
|
|
6415
|
+
previous_interaction_id: (_B = opts == null ? void 0 : opts.previousInteractionId) != null ? _B : void 0,
|
|
6416
|
+
service_tier: (_C = opts == null ? void 0 : opts.serviceTier) != null ? _C : void 0,
|
|
6417
|
+
store: (_D = opts == null ? void 0 : opts.store) != null ? _D : void 0,
|
|
6399
6418
|
generation_config: generationConfig != null && Object.keys(generationConfig).length > 0 ? generationConfig : void 0,
|
|
6400
6419
|
agent_config: agentConfig,
|
|
6401
6420
|
environment,
|
|
6402
|
-
background: (
|
|
6421
|
+
background: (_E = opts == null ? void 0 : opts.background) != null ? _E : void 0
|
|
6403
6422
|
});
|
|
6404
6423
|
return {
|
|
6405
6424
|
args,
|
|
6406
6425
|
warnings,
|
|
6407
6426
|
isAgent,
|
|
6408
6427
|
isBackground: (opts == null ? void 0 : opts.background) === true,
|
|
6409
|
-
pollingTimeoutMs: (
|
|
6428
|
+
pollingTimeoutMs: (_F = opts == null ? void 0 : opts.pollingTimeoutMs) != null ? _F : void 0
|
|
6410
6429
|
};
|
|
6411
6430
|
}
|
|
6412
6431
|
async doGenerate(options) {
|