@ai-sdk/google 3.0.24 → 3.0.25

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ai-sdk/google
2
2
 
3
+ ## 3.0.25
4
+
5
+ ### Patch Changes
6
+
7
+ - 99fbed8: feat: normalize provider specific model options type names and ensure they are exported
8
+
3
9
  ## 3.0.24
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -12,7 +12,7 @@ declare const googleErrorDataSchema: _ai_sdk_provider_utils.LazySchema<{
12
12
  type GoogleErrorData = InferSchema<typeof googleErrorDataSchema>;
13
13
 
14
14
  type GoogleGenerativeAIModelId = 'gemini-1.5-flash' | 'gemini-1.5-flash-latest' | 'gemini-1.5-flash-001' | 'gemini-1.5-flash-002' | 'gemini-1.5-flash-8b' | 'gemini-1.5-flash-8b-latest' | 'gemini-1.5-flash-8b-001' | 'gemini-1.5-pro' | 'gemini-1.5-pro-latest' | 'gemini-1.5-pro-001' | 'gemini-1.5-pro-002' | 'gemini-2.0-flash' | 'gemini-2.0-flash-001' | 'gemini-2.0-flash-live-001' | 'gemini-2.0-flash-lite' | 'gemini-2.0-pro-exp-02-05' | 'gemini-2.0-flash-thinking-exp-01-21' | 'gemini-2.0-flash-exp' | '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-04-17' | 'gemini-2.5-flash-preview-09-2025' | 'gemini-3-pro-preview' | 'gemini-3-pro-image-preview' | 'gemini-3-flash-preview' | 'gemini-pro-latest' | 'gemini-flash-latest' | 'gemini-flash-lite-latest' | 'gemini-2.5-pro-exp-03-25' | 'gemini-exp-1206' | 'gemma-3-12b-it' | 'gemma-3-27b-it' | (string & {});
15
- declare const googleGenerativeAIProviderOptions: _ai_sdk_provider_utils.LazySchema<{
15
+ declare const googleLanguageModelOptions: _ai_sdk_provider_utils.LazySchema<{
16
16
  responseModalities?: ("TEXT" | "IMAGE")[] | undefined;
17
17
  thinkingConfig?: {
18
18
  thinkingBudget?: number | undefined;
@@ -40,7 +40,7 @@ declare const googleGenerativeAIProviderOptions: _ai_sdk_provider_utils.LazySche
40
40
  } | undefined;
41
41
  } | undefined;
42
42
  }>;
43
- type GoogleGenerativeAIProviderOptions = InferSchema<typeof googleGenerativeAIProviderOptions>;
43
+ type GoogleLanguageModelOptions = InferSchema<typeof googleLanguageModelOptions>;
44
44
 
45
45
  declare const responseSchema: _ai_sdk_provider_utils.LazySchema<{
46
46
  candidates: {
@@ -168,22 +168,22 @@ interface GoogleGenerativeAIImageSettings {
168
168
  maxImagesPerCall?: number;
169
169
  }
170
170
 
171
- declare const googleImageProviderOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
171
+ declare const googleImageModelOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
172
172
  personGeneration?: "dont_allow" | "allow_adult" | "allow_all" | null | undefined;
173
173
  aspectRatio?: "1:1" | "3:4" | "4:3" | "9:16" | "16:9" | null | undefined;
174
174
  }>;
175
- type GoogleGenerativeAIImageProviderOptions = InferSchema<typeof googleImageProviderOptionsSchema>;
175
+ type GoogleImageModelOptions = InferSchema<typeof googleImageModelOptionsSchema>;
176
176
 
177
177
  type GoogleGenerativeAIEmbeddingModelId = 'gemini-embedding-001' | 'text-embedding-004' | (string & {});
178
- declare const googleGenerativeAIEmbeddingProviderOptions: _ai_sdk_provider_utils.LazySchema<{
178
+ declare const googleEmbeddingModelOptions: _ai_sdk_provider_utils.LazySchema<{
179
179
  outputDimensionality?: number | undefined;
180
180
  taskType?: "SEMANTIC_SIMILARITY" | "CLASSIFICATION" | "CLUSTERING" | "RETRIEVAL_DOCUMENT" | "RETRIEVAL_QUERY" | "QUESTION_ANSWERING" | "FACT_VERIFICATION" | "CODE_RETRIEVAL_QUERY" | undefined;
181
181
  }>;
182
- type GoogleGenerativeAIEmbeddingProviderOptions = InferSchema<typeof googleGenerativeAIEmbeddingProviderOptions>;
182
+ type GoogleEmbeddingModelOptions = InferSchema<typeof googleEmbeddingModelOptions>;
183
183
 
184
184
  type GoogleGenerativeAIVideoModelId = 'veo-3.1-fast-generate-preview' | 'veo-3.1-generate-preview' | 'veo-3.1-generate' | 'veo-2.0-generate-001' | (string & {});
185
185
 
186
- type GoogleGenerativeAIVideoProviderOptions = {
186
+ type GoogleVideoModelOptions = {
187
187
  pollIntervalMs?: number | null;
188
188
  pollTimeoutMs?: number | null;
189
189
  personGeneration?: 'dont_allow' | 'allow_adult' | 'allow_all' | null;
@@ -350,4 +350,4 @@ declare const google: GoogleGenerativeAIProvider;
350
350
 
351
351
  declare const VERSION: string;
352
352
 
353
- export { type GoogleErrorData, type GoogleGenerativeAIEmbeddingProviderOptions, type GoogleGenerativeAIImageProviderOptions, type GoogleGenerativeAIProvider, type GoogleGenerativeAIProviderMetadata, type GoogleGenerativeAIProviderOptions, type GoogleGenerativeAIProviderSettings, type GoogleGenerativeAIVideoModelId, type GoogleGenerativeAIVideoProviderOptions, VERSION, createGoogleGenerativeAI, google };
353
+ export { type GoogleEmbeddingModelOptions, type GoogleErrorData, type GoogleEmbeddingModelOptions as GoogleGenerativeAIEmbeddingProviderOptions, type GoogleImageModelOptions as GoogleGenerativeAIImageProviderOptions, type GoogleGenerativeAIProvider, type GoogleGenerativeAIProviderMetadata, type GoogleLanguageModelOptions as GoogleGenerativeAIProviderOptions, type GoogleGenerativeAIProviderSettings, type GoogleGenerativeAIVideoModelId, type GoogleVideoModelOptions as GoogleGenerativeAIVideoProviderOptions, type GoogleImageModelOptions, type GoogleLanguageModelOptions, type GoogleVideoModelOptions, VERSION, createGoogleGenerativeAI, google };
package/dist/index.d.ts CHANGED
@@ -12,7 +12,7 @@ declare const googleErrorDataSchema: _ai_sdk_provider_utils.LazySchema<{
12
12
  type GoogleErrorData = InferSchema<typeof googleErrorDataSchema>;
13
13
 
14
14
  type GoogleGenerativeAIModelId = 'gemini-1.5-flash' | 'gemini-1.5-flash-latest' | 'gemini-1.5-flash-001' | 'gemini-1.5-flash-002' | 'gemini-1.5-flash-8b' | 'gemini-1.5-flash-8b-latest' | 'gemini-1.5-flash-8b-001' | 'gemini-1.5-pro' | 'gemini-1.5-pro-latest' | 'gemini-1.5-pro-001' | 'gemini-1.5-pro-002' | 'gemini-2.0-flash' | 'gemini-2.0-flash-001' | 'gemini-2.0-flash-live-001' | 'gemini-2.0-flash-lite' | 'gemini-2.0-pro-exp-02-05' | 'gemini-2.0-flash-thinking-exp-01-21' | 'gemini-2.0-flash-exp' | '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-04-17' | 'gemini-2.5-flash-preview-09-2025' | 'gemini-3-pro-preview' | 'gemini-3-pro-image-preview' | 'gemini-3-flash-preview' | 'gemini-pro-latest' | 'gemini-flash-latest' | 'gemini-flash-lite-latest' | 'gemini-2.5-pro-exp-03-25' | 'gemini-exp-1206' | 'gemma-3-12b-it' | 'gemma-3-27b-it' | (string & {});
15
- declare const googleGenerativeAIProviderOptions: _ai_sdk_provider_utils.LazySchema<{
15
+ declare const googleLanguageModelOptions: _ai_sdk_provider_utils.LazySchema<{
16
16
  responseModalities?: ("TEXT" | "IMAGE")[] | undefined;
17
17
  thinkingConfig?: {
18
18
  thinkingBudget?: number | undefined;
@@ -40,7 +40,7 @@ declare const googleGenerativeAIProviderOptions: _ai_sdk_provider_utils.LazySche
40
40
  } | undefined;
41
41
  } | undefined;
42
42
  }>;
43
- type GoogleGenerativeAIProviderOptions = InferSchema<typeof googleGenerativeAIProviderOptions>;
43
+ type GoogleLanguageModelOptions = InferSchema<typeof googleLanguageModelOptions>;
44
44
 
45
45
  declare const responseSchema: _ai_sdk_provider_utils.LazySchema<{
46
46
  candidates: {
@@ -168,22 +168,22 @@ interface GoogleGenerativeAIImageSettings {
168
168
  maxImagesPerCall?: number;
169
169
  }
170
170
 
171
- declare const googleImageProviderOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
171
+ declare const googleImageModelOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
172
172
  personGeneration?: "dont_allow" | "allow_adult" | "allow_all" | null | undefined;
173
173
  aspectRatio?: "1:1" | "3:4" | "4:3" | "9:16" | "16:9" | null | undefined;
174
174
  }>;
175
- type GoogleGenerativeAIImageProviderOptions = InferSchema<typeof googleImageProviderOptionsSchema>;
175
+ type GoogleImageModelOptions = InferSchema<typeof googleImageModelOptionsSchema>;
176
176
 
177
177
  type GoogleGenerativeAIEmbeddingModelId = 'gemini-embedding-001' | 'text-embedding-004' | (string & {});
178
- declare const googleGenerativeAIEmbeddingProviderOptions: _ai_sdk_provider_utils.LazySchema<{
178
+ declare const googleEmbeddingModelOptions: _ai_sdk_provider_utils.LazySchema<{
179
179
  outputDimensionality?: number | undefined;
180
180
  taskType?: "SEMANTIC_SIMILARITY" | "CLASSIFICATION" | "CLUSTERING" | "RETRIEVAL_DOCUMENT" | "RETRIEVAL_QUERY" | "QUESTION_ANSWERING" | "FACT_VERIFICATION" | "CODE_RETRIEVAL_QUERY" | undefined;
181
181
  }>;
182
- type GoogleGenerativeAIEmbeddingProviderOptions = InferSchema<typeof googleGenerativeAIEmbeddingProviderOptions>;
182
+ type GoogleEmbeddingModelOptions = InferSchema<typeof googleEmbeddingModelOptions>;
183
183
 
184
184
  type GoogleGenerativeAIVideoModelId = 'veo-3.1-fast-generate-preview' | 'veo-3.1-generate-preview' | 'veo-3.1-generate' | 'veo-2.0-generate-001' | (string & {});
185
185
 
186
- type GoogleGenerativeAIVideoProviderOptions = {
186
+ type GoogleVideoModelOptions = {
187
187
  pollIntervalMs?: number | null;
188
188
  pollTimeoutMs?: number | null;
189
189
  personGeneration?: 'dont_allow' | 'allow_adult' | 'allow_all' | null;
@@ -350,4 +350,4 @@ declare const google: GoogleGenerativeAIProvider;
350
350
 
351
351
  declare const VERSION: string;
352
352
 
353
- export { type GoogleErrorData, type GoogleGenerativeAIEmbeddingProviderOptions, type GoogleGenerativeAIImageProviderOptions, type GoogleGenerativeAIProvider, type GoogleGenerativeAIProviderMetadata, type GoogleGenerativeAIProviderOptions, type GoogleGenerativeAIProviderSettings, type GoogleGenerativeAIVideoModelId, type GoogleGenerativeAIVideoProviderOptions, VERSION, createGoogleGenerativeAI, google };
353
+ export { type GoogleEmbeddingModelOptions, type GoogleErrorData, type GoogleEmbeddingModelOptions as GoogleGenerativeAIEmbeddingProviderOptions, type GoogleImageModelOptions as GoogleGenerativeAIImageProviderOptions, type GoogleGenerativeAIProvider, type GoogleGenerativeAIProviderMetadata, type GoogleLanguageModelOptions as GoogleGenerativeAIProviderOptions, type GoogleGenerativeAIProviderSettings, type GoogleGenerativeAIVideoModelId, type GoogleVideoModelOptions as GoogleGenerativeAIVideoProviderOptions, type GoogleImageModelOptions, type GoogleLanguageModelOptions, type GoogleVideoModelOptions, VERSION, createGoogleGenerativeAI, google };
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ module.exports = __toCommonJS(src_exports);
30
30
  var import_provider_utils16 = require("@ai-sdk/provider-utils");
31
31
 
32
32
  // src/version.ts
33
- var VERSION = true ? "3.0.24" : "0.0.0-test";
33
+ var VERSION = true ? "3.0.25" : "0.0.0-test";
34
34
 
35
35
  // src/google-generative-ai-embedding-model.ts
36
36
  var import_provider = require("@ai-sdk/provider");
@@ -59,7 +59,7 @@ var googleFailedResponseHandler = (0, import_provider_utils.createJsonErrorRespo
59
59
  // src/google-generative-ai-embedding-options.ts
60
60
  var import_provider_utils2 = require("@ai-sdk/provider-utils");
61
61
  var import_v42 = require("zod/v4");
62
- var googleGenerativeAIEmbeddingProviderOptions = (0, import_provider_utils2.lazySchema)(
62
+ var googleEmbeddingModelOptions = (0, import_provider_utils2.lazySchema)(
63
63
  () => (0, import_provider_utils2.zodSchema)(
64
64
  import_v42.z.object({
65
65
  /**
@@ -114,7 +114,7 @@ var GoogleGenerativeAIEmbeddingModel = class {
114
114
  const googleOptions = await (0, import_provider_utils3.parseProviderOptions)({
115
115
  provider: "google",
116
116
  providerOptions,
117
- schema: googleGenerativeAIEmbeddingProviderOptions
117
+ schema: googleEmbeddingModelOptions
118
118
  });
119
119
  if (values.length > this.maxEmbeddingsPerCall) {
120
120
  throw new import_provider.TooManyEmbeddingValuesForCallError({
@@ -542,7 +542,7 @@ function getModelPath(modelId) {
542
542
  // src/google-generative-ai-options.ts
543
543
  var import_provider_utils5 = require("@ai-sdk/provider-utils");
544
544
  var import_v44 = require("zod/v4");
545
- var googleGenerativeAIProviderOptions = (0, import_provider_utils5.lazySchema)(
545
+ var googleLanguageModelOptions = (0, import_provider_utils5.lazySchema)(
546
546
  () => (0, import_provider_utils5.zodSchema)(
547
547
  import_v44.z.object({
548
548
  responseModalities: import_v44.z.array(import_v44.z.enum(["TEXT", "IMAGE"])).optional(),
@@ -924,13 +924,13 @@ var GoogleGenerativeAILanguageModel = class {
924
924
  let googleOptions = await (0, import_provider_utils6.parseProviderOptions)({
925
925
  provider: providerOptionsName,
926
926
  providerOptions,
927
- schema: googleGenerativeAIProviderOptions
927
+ schema: googleLanguageModelOptions
928
928
  });
929
929
  if (googleOptions == null && providerOptionsName !== "google") {
930
930
  googleOptions = await (0, import_provider_utils6.parseProviderOptions)({
931
931
  provider: "google",
932
932
  providerOptions,
933
- schema: googleGenerativeAIProviderOptions
933
+ schema: googleLanguageModelOptions
934
934
  });
935
935
  }
936
936
  if ((tools == null ? void 0 : tools.some(
@@ -1834,7 +1834,7 @@ var GoogleGenerativeAIImageModel = class {
1834
1834
  const googleOptions = await (0, import_provider_utils14.parseProviderOptions)({
1835
1835
  provider: "google",
1836
1836
  providerOptions,
1837
- schema: googleImageProviderOptionsSchema
1837
+ schema: googleImageModelOptionsSchema
1838
1838
  });
1839
1839
  const currentDate = (_c = (_b = (_a = this.config._internal) == null ? void 0 : _a.currentDate) == null ? void 0 : _b.call(_a)) != null ? _c : /* @__PURE__ */ new Date();
1840
1840
  const parameters = {
@@ -1888,7 +1888,7 @@ var googleImageResponseSchema = (0, import_provider_utils14.lazySchema)(
1888
1888
  })
1889
1889
  )
1890
1890
  );
1891
- var googleImageProviderOptionsSchema = (0, import_provider_utils14.lazySchema)(
1891
+ var googleImageModelOptionsSchema = (0, import_provider_utils14.lazySchema)(
1892
1892
  () => (0, import_provider_utils14.zodSchema)(
1893
1893
  import_v413.z.object({
1894
1894
  personGeneration: import_v413.z.enum(["dont_allow", "allow_adult", "allow_all"]).nullish(),
@@ -1920,7 +1920,7 @@ var GoogleGenerativeAIVideoModel = class {
1920
1920
  const googleOptions = await (0, import_provider_utils15.parseProviderOptions)({
1921
1921
  provider: "google",
1922
1922
  providerOptions: options.providerOptions,
1923
- schema: googleVideoProviderOptionsSchema
1923
+ schema: googleVideoModelOptionsSchema
1924
1924
  });
1925
1925
  const instances = [{}];
1926
1926
  const instance = instances[0];
@@ -2132,7 +2132,7 @@ var googleOperationSchema = import_v414.z.object({
2132
2132
  }).nullish()
2133
2133
  }).nullish()
2134
2134
  });
2135
- var googleVideoProviderOptionsSchema = (0, import_provider_utils15.lazySchema)(
2135
+ var googleVideoModelOptionsSchema = (0, import_provider_utils15.lazySchema)(
2136
2136
  () => (0, import_provider_utils15.zodSchema)(
2137
2137
  import_v414.z.object({
2138
2138
  pollIntervalMs: import_v414.z.number().positive().nullish(),