@ai-sdk/google 4.0.0-beta.1 → 4.0.0-beta.10
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 +57 -0
- package/dist/index.d.mts +31 -14
- package/dist/index.d.ts +31 -14
- package/dist/index.js +84 -31
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +81 -28
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +11 -7
- package/dist/internal/index.d.ts +11 -7
- package/dist/internal/index.js +36 -18
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +33 -15
- package/dist/internal/index.mjs.map +1 -1
- package/docs/15-google-generative-ai.mdx +30 -3
- package/package.json +3 -3
- package/src/convert-google-generative-ai-usage.ts +2 -2
- package/src/convert-to-google-generative-ai-messages.ts +5 -2
- package/src/google-generative-ai-embedding-model.ts +42 -13
- package/src/google-generative-ai-embedding-options.ts +24 -0
- package/src/google-generative-ai-image-model.ts +14 -14
- package/src/google-generative-ai-language-model.ts +83 -54
- package/src/google-generative-ai-prompt.ts +9 -0
- package/src/google-generative-ai-video-model.ts +7 -7
- package/src/google-prepare-tools.ts +6 -6
- package/src/google-provider.ts +18 -18
- package/src/map-google-generative-ai-finish-reason.ts +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
|
|
2
2
|
import { Resolvable, FetchFunction, InferSchema } from '@ai-sdk/provider-utils';
|
|
3
|
-
import {
|
|
3
|
+
import { LanguageModelV4, LanguageModelV4CallOptions, LanguageModelV4GenerateResult, LanguageModelV4StreamResult } from '@ai-sdk/provider';
|
|
4
4
|
import { z } from 'zod/v4';
|
|
5
5
|
|
|
6
6
|
type GoogleGenerativeAIModelId = 'gemini-2.0-flash' | 'gemini-2.0-flash-001' | 'gemini-2.0-flash-lite' | 'gemini-2.0-flash-exp-image-generation' | '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-lite-preview-09-2025' | '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-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 & {});
|
|
@@ -14,10 +14,10 @@ type GoogleGenerativeAIConfig = {
|
|
|
14
14
|
/**
|
|
15
15
|
* The supported URLs for the model.
|
|
16
16
|
*/
|
|
17
|
-
supportedUrls?: () =>
|
|
17
|
+
supportedUrls?: () => LanguageModelV4['supportedUrls'];
|
|
18
18
|
};
|
|
19
|
-
declare class GoogleGenerativeAILanguageModel implements
|
|
20
|
-
readonly specificationVersion = "
|
|
19
|
+
declare class GoogleGenerativeAILanguageModel implements LanguageModelV4 {
|
|
20
|
+
readonly specificationVersion = "v4";
|
|
21
21
|
readonly modelId: GoogleGenerativeAIModelId;
|
|
22
22
|
private readonly config;
|
|
23
23
|
private readonly generateId;
|
|
@@ -25,8 +25,8 @@ declare class GoogleGenerativeAILanguageModel implements LanguageModelV3 {
|
|
|
25
25
|
get provider(): string;
|
|
26
26
|
get supportedUrls(): Record<string, RegExp[]> | PromiseLike<Record<string, RegExp[]>>;
|
|
27
27
|
private getArgs;
|
|
28
|
-
doGenerate(options:
|
|
29
|
-
doStream(options:
|
|
28
|
+
doGenerate(options: LanguageModelV4CallOptions): Promise<LanguageModelV4GenerateResult>;
|
|
29
|
+
doStream(options: LanguageModelV4CallOptions): Promise<LanguageModelV4StreamResult>;
|
|
30
30
|
}
|
|
31
31
|
declare const getGroundingMetadataSchema: () => z.ZodObject<{
|
|
32
32
|
webSearchQueries: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
@@ -95,6 +95,7 @@ declare const responseSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
95
95
|
mimeType: string;
|
|
96
96
|
data: string;
|
|
97
97
|
};
|
|
98
|
+
thought?: boolean | null | undefined;
|
|
98
99
|
thoughtSignature?: string | null | undefined;
|
|
99
100
|
} | {
|
|
100
101
|
executableCode?: {
|
|
@@ -111,6 +112,7 @@ declare const responseSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
111
112
|
})[] | null | undefined;
|
|
112
113
|
} | null | undefined;
|
|
113
114
|
finishReason?: string | null | undefined;
|
|
115
|
+
finishMessage?: string | null | undefined;
|
|
114
116
|
safetyRatings?: {
|
|
115
117
|
category?: string | null | undefined;
|
|
116
118
|
probability?: string | null | undefined;
|
|
@@ -196,6 +198,8 @@ declare const responseSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
196
198
|
type GroundingMetadataSchema = NonNullable<InferSchema<typeof responseSchema>['candidates'][number]['groundingMetadata']>;
|
|
197
199
|
type UrlContextMetadataSchema = NonNullable<InferSchema<typeof responseSchema>['candidates'][number]['urlContextMetadata']>;
|
|
198
200
|
type SafetyRatingSchema = NonNullable<InferSchema<typeof responseSchema>['candidates'][number]['safetyRatings']>[number];
|
|
201
|
+
type PromptFeedbackSchema = NonNullable<InferSchema<typeof responseSchema>['promptFeedback']>;
|
|
202
|
+
type UsageMetadataSchema = NonNullable<InferSchema<typeof responseSchema>['usageMetadata']>;
|
|
199
203
|
|
|
200
204
|
declare const googleTools: {
|
|
201
205
|
/**
|
|
@@ -280,4 +284,4 @@ declare const googleTools: {
|
|
|
280
284
|
}>;
|
|
281
285
|
};
|
|
282
286
|
|
|
283
|
-
export { GoogleGenerativeAILanguageModel, type GoogleGenerativeAIModelId, type GroundingMetadataSchema, type SafetyRatingSchema, type UrlContextMetadataSchema, getGroundingMetadataSchema, getUrlContextMetadataSchema, googleTools };
|
|
287
|
+
export { GoogleGenerativeAILanguageModel, type GoogleGenerativeAIModelId, type GroundingMetadataSchema, type PromptFeedbackSchema, type SafetyRatingSchema, type UrlContextMetadataSchema, type UsageMetadataSchema, getGroundingMetadataSchema, getUrlContextMetadataSchema, googleTools };
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
|
|
2
2
|
import { Resolvable, FetchFunction, InferSchema } from '@ai-sdk/provider-utils';
|
|
3
|
-
import {
|
|
3
|
+
import { LanguageModelV4, LanguageModelV4CallOptions, LanguageModelV4GenerateResult, LanguageModelV4StreamResult } from '@ai-sdk/provider';
|
|
4
4
|
import { z } from 'zod/v4';
|
|
5
5
|
|
|
6
6
|
type GoogleGenerativeAIModelId = 'gemini-2.0-flash' | 'gemini-2.0-flash-001' | 'gemini-2.0-flash-lite' | 'gemini-2.0-flash-exp-image-generation' | '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-lite-preview-09-2025' | '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-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 & {});
|
|
@@ -14,10 +14,10 @@ type GoogleGenerativeAIConfig = {
|
|
|
14
14
|
/**
|
|
15
15
|
* The supported URLs for the model.
|
|
16
16
|
*/
|
|
17
|
-
supportedUrls?: () =>
|
|
17
|
+
supportedUrls?: () => LanguageModelV4['supportedUrls'];
|
|
18
18
|
};
|
|
19
|
-
declare class GoogleGenerativeAILanguageModel implements
|
|
20
|
-
readonly specificationVersion = "
|
|
19
|
+
declare class GoogleGenerativeAILanguageModel implements LanguageModelV4 {
|
|
20
|
+
readonly specificationVersion = "v4";
|
|
21
21
|
readonly modelId: GoogleGenerativeAIModelId;
|
|
22
22
|
private readonly config;
|
|
23
23
|
private readonly generateId;
|
|
@@ -25,8 +25,8 @@ declare class GoogleGenerativeAILanguageModel implements LanguageModelV3 {
|
|
|
25
25
|
get provider(): string;
|
|
26
26
|
get supportedUrls(): Record<string, RegExp[]> | PromiseLike<Record<string, RegExp[]>>;
|
|
27
27
|
private getArgs;
|
|
28
|
-
doGenerate(options:
|
|
29
|
-
doStream(options:
|
|
28
|
+
doGenerate(options: LanguageModelV4CallOptions): Promise<LanguageModelV4GenerateResult>;
|
|
29
|
+
doStream(options: LanguageModelV4CallOptions): Promise<LanguageModelV4StreamResult>;
|
|
30
30
|
}
|
|
31
31
|
declare const getGroundingMetadataSchema: () => z.ZodObject<{
|
|
32
32
|
webSearchQueries: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
@@ -95,6 +95,7 @@ declare const responseSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
95
95
|
mimeType: string;
|
|
96
96
|
data: string;
|
|
97
97
|
};
|
|
98
|
+
thought?: boolean | null | undefined;
|
|
98
99
|
thoughtSignature?: string | null | undefined;
|
|
99
100
|
} | {
|
|
100
101
|
executableCode?: {
|
|
@@ -111,6 +112,7 @@ declare const responseSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
111
112
|
})[] | null | undefined;
|
|
112
113
|
} | null | undefined;
|
|
113
114
|
finishReason?: string | null | undefined;
|
|
115
|
+
finishMessage?: string | null | undefined;
|
|
114
116
|
safetyRatings?: {
|
|
115
117
|
category?: string | null | undefined;
|
|
116
118
|
probability?: string | null | undefined;
|
|
@@ -196,6 +198,8 @@ declare const responseSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
196
198
|
type GroundingMetadataSchema = NonNullable<InferSchema<typeof responseSchema>['candidates'][number]['groundingMetadata']>;
|
|
197
199
|
type UrlContextMetadataSchema = NonNullable<InferSchema<typeof responseSchema>['candidates'][number]['urlContextMetadata']>;
|
|
198
200
|
type SafetyRatingSchema = NonNullable<InferSchema<typeof responseSchema>['candidates'][number]['safetyRatings']>[number];
|
|
201
|
+
type PromptFeedbackSchema = NonNullable<InferSchema<typeof responseSchema>['promptFeedback']>;
|
|
202
|
+
type UsageMetadataSchema = NonNullable<InferSchema<typeof responseSchema>['usageMetadata']>;
|
|
199
203
|
|
|
200
204
|
declare const googleTools: {
|
|
201
205
|
/**
|
|
@@ -280,4 +284,4 @@ declare const googleTools: {
|
|
|
280
284
|
}>;
|
|
281
285
|
};
|
|
282
286
|
|
|
283
|
-
export { GoogleGenerativeAILanguageModel, type GoogleGenerativeAIModelId, type GroundingMetadataSchema, type SafetyRatingSchema, type UrlContextMetadataSchema, getGroundingMetadataSchema, getUrlContextMetadataSchema, googleTools };
|
|
287
|
+
export { GoogleGenerativeAILanguageModel, type GoogleGenerativeAIModelId, type GroundingMetadataSchema, type PromptFeedbackSchema, type SafetyRatingSchema, type UrlContextMetadataSchema, type UsageMetadataSchema, getGroundingMetadataSchema, getUrlContextMetadataSchema, googleTools };
|
package/dist/internal/index.js
CHANGED
|
@@ -18,14 +18,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
20
|
// src/internal/index.ts
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
23
|
GoogleGenerativeAILanguageModel: () => GoogleGenerativeAILanguageModel,
|
|
24
24
|
getGroundingMetadataSchema: () => getGroundingMetadataSchema,
|
|
25
25
|
getUrlContextMetadataSchema: () => getUrlContextMetadataSchema,
|
|
26
26
|
googleTools: () => googleTools
|
|
27
27
|
});
|
|
28
|
-
module.exports = __toCommonJS(
|
|
28
|
+
module.exports = __toCommonJS(index_exports);
|
|
29
29
|
|
|
30
30
|
// src/google-generative-ai-language-model.ts
|
|
31
31
|
var import_provider_utils4 = require("@ai-sdk/provider-utils");
|
|
@@ -271,6 +271,7 @@ function convertToGoogleGenerativeAIMessages(prompt, options) {
|
|
|
271
271
|
mimeType: part.mediaType,
|
|
272
272
|
data: (0, import_provider_utils.convertToBase64)(part.data)
|
|
273
273
|
},
|
|
274
|
+
...(providerOpts == null ? void 0 : providerOpts.thought) === true ? { thought: true } : {},
|
|
274
275
|
thoughtSignature
|
|
275
276
|
};
|
|
276
277
|
}
|
|
@@ -743,7 +744,7 @@ function mapGoogleGenerativeAIFinishReason({
|
|
|
743
744
|
// src/google-generative-ai-language-model.ts
|
|
744
745
|
var GoogleGenerativeAILanguageModel = class {
|
|
745
746
|
constructor(modelId, config) {
|
|
746
|
-
this.specificationVersion = "
|
|
747
|
+
this.specificationVersion = "v4";
|
|
747
748
|
var _a;
|
|
748
749
|
this.modelId = modelId;
|
|
749
750
|
this.config = config;
|
|
@@ -855,7 +856,7 @@ var GoogleGenerativeAILanguageModel = class {
|
|
|
855
856
|
};
|
|
856
857
|
}
|
|
857
858
|
async doGenerate(options) {
|
|
858
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
859
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
859
860
|
const { args, warnings, providerOptionsName } = await this.getArgs(options);
|
|
860
861
|
const mergedHeaders = (0, import_provider_utils4.combineHeaders)(
|
|
861
862
|
await (0, import_provider_utils4.resolve)(this.config.headers),
|
|
@@ -935,13 +936,16 @@ var GoogleGenerativeAILanguageModel = class {
|
|
|
935
936
|
} : void 0
|
|
936
937
|
});
|
|
937
938
|
} else if ("inlineData" in part) {
|
|
939
|
+
const hasThought = part.thought === true;
|
|
940
|
+
const hasThoughtSignature = !!part.thoughtSignature;
|
|
938
941
|
content.push({
|
|
939
942
|
type: "file",
|
|
940
943
|
data: part.inlineData.data,
|
|
941
944
|
mediaType: part.inlineData.mimeType,
|
|
942
|
-
providerMetadata:
|
|
945
|
+
providerMetadata: hasThought || hasThoughtSignature ? {
|
|
943
946
|
[providerOptionsName]: {
|
|
944
|
-
|
|
947
|
+
...hasThought ? { thought: true } : {},
|
|
948
|
+
...hasThoughtSignature ? { thoughtSignature: part.thoughtSignature } : {}
|
|
945
949
|
}
|
|
946
950
|
} : void 0
|
|
947
951
|
});
|
|
@@ -974,7 +978,8 @@ var GoogleGenerativeAILanguageModel = class {
|
|
|
974
978
|
groundingMetadata: (_h = candidate.groundingMetadata) != null ? _h : null,
|
|
975
979
|
urlContextMetadata: (_i = candidate.urlContextMetadata) != null ? _i : null,
|
|
976
980
|
safetyRatings: (_j = candidate.safetyRatings) != null ? _j : null,
|
|
977
|
-
usageMetadata: usageMetadata != null ? usageMetadata : null
|
|
981
|
+
usageMetadata: usageMetadata != null ? usageMetadata : null,
|
|
982
|
+
finishMessage: (_k = candidate.finishMessage) != null ? _k : null
|
|
978
983
|
}
|
|
979
984
|
},
|
|
980
985
|
request: { body: args },
|
|
@@ -1008,6 +1013,8 @@ var GoogleGenerativeAILanguageModel = class {
|
|
|
1008
1013
|
};
|
|
1009
1014
|
let usage = void 0;
|
|
1010
1015
|
let providerMetadata = void 0;
|
|
1016
|
+
let lastGroundingMetadata = null;
|
|
1017
|
+
let lastUrlContextMetadata = null;
|
|
1011
1018
|
const generateId2 = this.config.generateId;
|
|
1012
1019
|
let hasToolCalls = false;
|
|
1013
1020
|
let currentTextBlockId = null;
|
|
@@ -1022,7 +1029,7 @@ var GoogleGenerativeAILanguageModel = class {
|
|
|
1022
1029
|
controller.enqueue({ type: "stream-start", warnings });
|
|
1023
1030
|
},
|
|
1024
1031
|
transform(chunk, controller) {
|
|
1025
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
1032
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1026
1033
|
if (options.includeRawChunks) {
|
|
1027
1034
|
controller.enqueue({ type: "raw", rawValue: chunk.rawValue });
|
|
1028
1035
|
}
|
|
@@ -1040,6 +1047,12 @@ var GoogleGenerativeAILanguageModel = class {
|
|
|
1040
1047
|
return;
|
|
1041
1048
|
}
|
|
1042
1049
|
const content = candidate.content;
|
|
1050
|
+
if (candidate.groundingMetadata != null) {
|
|
1051
|
+
lastGroundingMetadata = candidate.groundingMetadata;
|
|
1052
|
+
}
|
|
1053
|
+
if (candidate.urlContextMetadata != null) {
|
|
1054
|
+
lastUrlContextMetadata = candidate.urlContextMetadata;
|
|
1055
|
+
}
|
|
1043
1056
|
const sources = extractSources({
|
|
1044
1057
|
groundingMetadata: candidate.groundingMetadata,
|
|
1045
1058
|
generateId: generateId2
|
|
@@ -1154,16 +1167,19 @@ var GoogleGenerativeAILanguageModel = class {
|
|
|
1154
1167
|
});
|
|
1155
1168
|
currentReasoningBlockId = null;
|
|
1156
1169
|
}
|
|
1157
|
-
const
|
|
1170
|
+
const hasThought = part.thought === true;
|
|
1171
|
+
const hasThoughtSignature = !!part.thoughtSignature;
|
|
1172
|
+
const fileMeta = hasThought || hasThoughtSignature ? {
|
|
1158
1173
|
[providerOptionsName]: {
|
|
1159
|
-
|
|
1174
|
+
...hasThought ? { thought: true } : {},
|
|
1175
|
+
...hasThoughtSignature ? { thoughtSignature: part.thoughtSignature } : {}
|
|
1160
1176
|
}
|
|
1161
1177
|
} : void 0;
|
|
1162
1178
|
controller.enqueue({
|
|
1163
1179
|
type: "file",
|
|
1164
1180
|
mediaType: part.inlineData.mimeType,
|
|
1165
1181
|
data: part.inlineData.data,
|
|
1166
|
-
providerMetadata:
|
|
1182
|
+
providerMetadata: fileMeta
|
|
1167
1183
|
});
|
|
1168
1184
|
}
|
|
1169
1185
|
}
|
|
@@ -1213,14 +1229,13 @@ var GoogleGenerativeAILanguageModel = class {
|
|
|
1213
1229
|
providerMetadata = {
|
|
1214
1230
|
[providerOptionsName]: {
|
|
1215
1231
|
promptFeedback: (_e = value.promptFeedback) != null ? _e : null,
|
|
1216
|
-
groundingMetadata:
|
|
1217
|
-
urlContextMetadata:
|
|
1218
|
-
safetyRatings: (
|
|
1232
|
+
groundingMetadata: lastGroundingMetadata,
|
|
1233
|
+
urlContextMetadata: lastUrlContextMetadata,
|
|
1234
|
+
safetyRatings: (_f = candidate.safetyRatings) != null ? _f : null,
|
|
1235
|
+
usageMetadata: usageMetadata != null ? usageMetadata : null,
|
|
1236
|
+
finishMessage: (_g = candidate.finishMessage) != null ? _g : null
|
|
1219
1237
|
}
|
|
1220
1238
|
};
|
|
1221
|
-
if (usageMetadata != null) {
|
|
1222
|
-
providerMetadata[providerOptionsName].usageMetadata = usageMetadata;
|
|
1223
|
-
}
|
|
1224
1239
|
}
|
|
1225
1240
|
},
|
|
1226
1241
|
flush(controller) {
|
|
@@ -1429,6 +1444,7 @@ var getContentSchema = () => import_v43.z.object({
|
|
|
1429
1444
|
mimeType: import_v43.z.string(),
|
|
1430
1445
|
data: import_v43.z.string()
|
|
1431
1446
|
}),
|
|
1447
|
+
thought: import_v43.z.boolean().nullish(),
|
|
1432
1448
|
thoughtSignature: import_v43.z.string().nullish()
|
|
1433
1449
|
}),
|
|
1434
1450
|
import_v43.z.object({
|
|
@@ -1479,6 +1495,7 @@ var responseSchema = (0, import_provider_utils4.lazySchema)(
|
|
|
1479
1495
|
import_v43.z.object({
|
|
1480
1496
|
content: getContentSchema().nullish().or(import_v43.z.object({}).strict()),
|
|
1481
1497
|
finishReason: import_v43.z.string().nullish(),
|
|
1498
|
+
finishMessage: import_v43.z.string().nullish(),
|
|
1482
1499
|
safetyRatings: import_v43.z.array(getSafetyRatingSchema()).nullish(),
|
|
1483
1500
|
groundingMetadata: getGroundingMetadataSchema().nullish(),
|
|
1484
1501
|
urlContextMetadata: getUrlContextMetadataSchema().nullish()
|
|
@@ -1499,6 +1516,7 @@ var chunkSchema = (0, import_provider_utils4.lazySchema)(
|
|
|
1499
1516
|
import_v43.z.object({
|
|
1500
1517
|
content: getContentSchema().nullish(),
|
|
1501
1518
|
finishReason: import_v43.z.string().nullish(),
|
|
1519
|
+
finishMessage: import_v43.z.string().nullish(),
|
|
1502
1520
|
safetyRatings: import_v43.z.array(getSafetyRatingSchema()).nullish(),
|
|
1503
1521
|
groundingMetadata: getGroundingMetadataSchema().nullish(),
|
|
1504
1522
|
urlContextMetadata: getUrlContextMetadataSchema().nullish()
|