@ai-sdk/google
Advanced tools
+6
-0
| # @ai-sdk/google | ||
| ## 3.0.25 | ||
| ### Patch Changes | ||
| - 99fbed8: feat: normalize provider specific model options type names and ensure they are exported | ||
| ## 3.0.24 | ||
@@ -4,0 +10,0 @@ |
+8
-8
@@ -15,3 +15,3 @@ import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils'; | ||
| 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 & {}); | ||
| declare const googleGenerativeAIProviderOptions: _ai_sdk_provider_utils.LazySchema<{ | ||
| declare const googleLanguageModelOptions: _ai_sdk_provider_utils.LazySchema<{ | ||
| responseModalities?: ("TEXT" | "IMAGE")[] | undefined; | ||
@@ -44,3 +44,3 @@ thinkingConfig?: { | ||
| }>; | ||
| type GoogleGenerativeAIProviderOptions = InferSchema<typeof googleGenerativeAIProviderOptions>; | ||
| type GoogleLanguageModelOptions = InferSchema<typeof googleLanguageModelOptions>; | ||
@@ -173,18 +173,18 @@ declare const responseSchema: _ai_sdk_provider_utils.LazySchema<{ | ||
| declare const googleImageProviderOptionsSchema: _ai_sdk_provider_utils.LazySchema<{ | ||
| declare const googleImageModelOptionsSchema: _ai_sdk_provider_utils.LazySchema<{ | ||
| personGeneration?: "dont_allow" | "allow_adult" | "allow_all" | null | undefined; | ||
| aspectRatio?: "1:1" | "3:4" | "4:3" | "9:16" | "16:9" | null | undefined; | ||
| }>; | ||
| type GoogleGenerativeAIImageProviderOptions = InferSchema<typeof googleImageProviderOptionsSchema>; | ||
| type GoogleImageModelOptions = InferSchema<typeof googleImageModelOptionsSchema>; | ||
| type GoogleGenerativeAIEmbeddingModelId = 'gemini-embedding-001' | 'text-embedding-004' | (string & {}); | ||
| declare const googleGenerativeAIEmbeddingProviderOptions: _ai_sdk_provider_utils.LazySchema<{ | ||
| declare const googleEmbeddingModelOptions: _ai_sdk_provider_utils.LazySchema<{ | ||
| outputDimensionality?: number | undefined; | ||
| taskType?: "SEMANTIC_SIMILARITY" | "CLASSIFICATION" | "CLUSTERING" | "RETRIEVAL_DOCUMENT" | "RETRIEVAL_QUERY" | "QUESTION_ANSWERING" | "FACT_VERIFICATION" | "CODE_RETRIEVAL_QUERY" | undefined; | ||
| }>; | ||
| type GoogleGenerativeAIEmbeddingProviderOptions = InferSchema<typeof googleGenerativeAIEmbeddingProviderOptions>; | ||
| type GoogleEmbeddingModelOptions = InferSchema<typeof googleEmbeddingModelOptions>; | ||
| type GoogleGenerativeAIVideoModelId = 'veo-3.1-fast-generate-preview' | 'veo-3.1-generate-preview' | 'veo-3.1-generate' | 'veo-2.0-generate-001' | (string & {}); | ||
| type GoogleGenerativeAIVideoProviderOptions = { | ||
| type GoogleVideoModelOptions = { | ||
| pollIntervalMs?: number | null; | ||
@@ -356,2 +356,2 @@ pollTimeoutMs?: number | null; | ||
| export { type GoogleErrorData, type GoogleGenerativeAIEmbeddingProviderOptions, type GoogleGenerativeAIImageProviderOptions, type GoogleGenerativeAIProvider, type GoogleGenerativeAIProviderMetadata, type GoogleGenerativeAIProviderOptions, type GoogleGenerativeAIProviderSettings, type GoogleGenerativeAIVideoModelId, type GoogleGenerativeAIVideoProviderOptions, VERSION, createGoogleGenerativeAI, google }; | ||
| 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 }; |
+8
-8
@@ -15,3 +15,3 @@ import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils'; | ||
| 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 & {}); | ||
| declare const googleGenerativeAIProviderOptions: _ai_sdk_provider_utils.LazySchema<{ | ||
| declare const googleLanguageModelOptions: _ai_sdk_provider_utils.LazySchema<{ | ||
| responseModalities?: ("TEXT" | "IMAGE")[] | undefined; | ||
@@ -44,3 +44,3 @@ thinkingConfig?: { | ||
| }>; | ||
| type GoogleGenerativeAIProviderOptions = InferSchema<typeof googleGenerativeAIProviderOptions>; | ||
| type GoogleLanguageModelOptions = InferSchema<typeof googleLanguageModelOptions>; | ||
@@ -173,18 +173,18 @@ declare const responseSchema: _ai_sdk_provider_utils.LazySchema<{ | ||
| declare const googleImageProviderOptionsSchema: _ai_sdk_provider_utils.LazySchema<{ | ||
| declare const googleImageModelOptionsSchema: _ai_sdk_provider_utils.LazySchema<{ | ||
| personGeneration?: "dont_allow" | "allow_adult" | "allow_all" | null | undefined; | ||
| aspectRatio?: "1:1" | "3:4" | "4:3" | "9:16" | "16:9" | null | undefined; | ||
| }>; | ||
| type GoogleGenerativeAIImageProviderOptions = InferSchema<typeof googleImageProviderOptionsSchema>; | ||
| type GoogleImageModelOptions = InferSchema<typeof googleImageModelOptionsSchema>; | ||
| type GoogleGenerativeAIEmbeddingModelId = 'gemini-embedding-001' | 'text-embedding-004' | (string & {}); | ||
| declare const googleGenerativeAIEmbeddingProviderOptions: _ai_sdk_provider_utils.LazySchema<{ | ||
| declare const googleEmbeddingModelOptions: _ai_sdk_provider_utils.LazySchema<{ | ||
| outputDimensionality?: number | undefined; | ||
| taskType?: "SEMANTIC_SIMILARITY" | "CLASSIFICATION" | "CLUSTERING" | "RETRIEVAL_DOCUMENT" | "RETRIEVAL_QUERY" | "QUESTION_ANSWERING" | "FACT_VERIFICATION" | "CODE_RETRIEVAL_QUERY" | undefined; | ||
| }>; | ||
| type GoogleGenerativeAIEmbeddingProviderOptions = InferSchema<typeof googleGenerativeAIEmbeddingProviderOptions>; | ||
| type GoogleEmbeddingModelOptions = InferSchema<typeof googleEmbeddingModelOptions>; | ||
| type GoogleGenerativeAIVideoModelId = 'veo-3.1-fast-generate-preview' | 'veo-3.1-generate-preview' | 'veo-3.1-generate' | 'veo-2.0-generate-001' | (string & {}); | ||
| type GoogleGenerativeAIVideoProviderOptions = { | ||
| type GoogleVideoModelOptions = { | ||
| pollIntervalMs?: number | null; | ||
@@ -356,2 +356,2 @@ pollTimeoutMs?: number | null; | ||
| export { type GoogleErrorData, type GoogleGenerativeAIEmbeddingProviderOptions, type GoogleGenerativeAIImageProviderOptions, type GoogleGenerativeAIProvider, type GoogleGenerativeAIProviderMetadata, type GoogleGenerativeAIProviderOptions, type GoogleGenerativeAIProviderSettings, type GoogleGenerativeAIVideoModelId, type GoogleGenerativeAIVideoProviderOptions, VERSION, createGoogleGenerativeAI, google }; | ||
| 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 }; |
@@ -388,3 +388,3 @@ "use strict"; | ||
| var import_v42 = require("zod/v4"); | ||
| var googleGenerativeAIProviderOptions = (0, import_provider_utils3.lazySchema)( | ||
| var googleLanguageModelOptions = (0, import_provider_utils3.lazySchema)( | ||
| () => (0, import_provider_utils3.zodSchema)( | ||
@@ -771,3 +771,3 @@ import_v42.z.object({ | ||
| providerOptions, | ||
| schema: googleGenerativeAIProviderOptions | ||
| schema: googleLanguageModelOptions | ||
| }); | ||
@@ -778,3 +778,3 @@ if (googleOptions == null && providerOptionsName !== "google") { | ||
| providerOptions, | ||
| schema: googleGenerativeAIProviderOptions | ||
| schema: googleLanguageModelOptions | ||
| }); | ||
@@ -781,0 +781,0 @@ } |
@@ -375,3 +375,3 @@ // src/google-generative-ai-language-model.ts | ||
| import { z as z2 } from "zod/v4"; | ||
| var googleGenerativeAIProviderOptions = lazySchema2( | ||
| var googleLanguageModelOptions = lazySchema2( | ||
| () => zodSchema2( | ||
@@ -760,3 +760,3 @@ z2.object({ | ||
| providerOptions, | ||
| schema: googleGenerativeAIProviderOptions | ||
| schema: googleLanguageModelOptions | ||
| }); | ||
@@ -767,3 +767,3 @@ if (googleOptions == null && providerOptionsName !== "google") { | ||
| providerOptions, | ||
| schema: googleGenerativeAIProviderOptions | ||
| schema: googleLanguageModelOptions | ||
| }); | ||
@@ -770,0 +770,0 @@ } |
+1
-1
| { | ||
| "name": "@ai-sdk/google", | ||
| "version": "3.0.24", | ||
| "version": "3.0.25", | ||
| "license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
@@ -19,3 +19,3 @@ import { | ||
| GoogleGenerativeAIEmbeddingModelId, | ||
| googleGenerativeAIEmbeddingProviderOptions, | ||
| googleEmbeddingModelOptions, | ||
| } from './google-generative-ai-embedding-options'; | ||
@@ -61,3 +61,3 @@ | ||
| providerOptions, | ||
| schema: googleGenerativeAIEmbeddingProviderOptions, | ||
| schema: googleEmbeddingModelOptions, | ||
| }); | ||
@@ -64,0 +64,0 @@ |
@@ -13,3 +13,3 @@ import { | ||
| export const googleGenerativeAIEmbeddingProviderOptions = lazySchema(() => | ||
| export const googleEmbeddingModelOptions = lazySchema(() => | ||
| zodSchema( | ||
@@ -51,4 +51,4 @@ z.object({ | ||
| export type GoogleGenerativeAIEmbeddingProviderOptions = InferSchema< | ||
| typeof googleGenerativeAIEmbeddingProviderOptions | ||
| export type GoogleEmbeddingModelOptions = InferSchema< | ||
| typeof googleEmbeddingModelOptions | ||
| >; |
@@ -102,3 +102,3 @@ import { ImageModelV3, SharedV3Warning } from '@ai-sdk/provider'; | ||
| providerOptions, | ||
| schema: googleImageProviderOptionsSchema, | ||
| schema: googleImageModelOptionsSchema, | ||
| }); | ||
@@ -172,3 +172,3 @@ | ||
| // https://ai.google.dev/gemini-api/docs/imagen#imagen-model | ||
| const googleImageProviderOptionsSchema = lazySchema(() => | ||
| const googleImageModelOptionsSchema = lazySchema(() => | ||
| zodSchema( | ||
@@ -184,4 +184,4 @@ z.object({ | ||
| export type GoogleGenerativeAIImageProviderOptions = InferSchema< | ||
| typeof googleImageProviderOptionsSchema | ||
| export type GoogleImageModelOptions = InferSchema< | ||
| typeof googleImageModelOptionsSchema | ||
| >; |
@@ -39,3 +39,3 @@ import { | ||
| GoogleGenerativeAIModelId, | ||
| googleGenerativeAIProviderOptions, | ||
| googleLanguageModelOptions, | ||
| } from './google-generative-ai-options'; | ||
@@ -107,3 +107,3 @@ import { GoogleGenerativeAIContentPart } from './google-generative-ai-prompt'; | ||
| providerOptions, | ||
| schema: googleGenerativeAIProviderOptions, | ||
| schema: googleLanguageModelOptions, | ||
| }); | ||
@@ -115,3 +115,3 @@ | ||
| providerOptions, | ||
| schema: googleGenerativeAIProviderOptions, | ||
| schema: googleLanguageModelOptions, | ||
| }); | ||
@@ -118,0 +118,0 @@ } |
@@ -48,3 +48,3 @@ import { InferSchema, lazySchema, zodSchema } from '@ai-sdk/provider-utils'; | ||
| export const googleGenerativeAIProviderOptions = lazySchema(() => | ||
| export const googleLanguageModelOptions = lazySchema(() => | ||
| zodSchema( | ||
@@ -192,4 +192,4 @@ z.object({ | ||
| export type GoogleGenerativeAIProviderOptions = InferSchema< | ||
| typeof googleGenerativeAIProviderOptions | ||
| export type GoogleLanguageModelOptions = InferSchema< | ||
| typeof googleLanguageModelOptions | ||
| >; |
@@ -24,3 +24,3 @@ import { | ||
| export type GoogleGenerativeAIVideoProviderOptions = { | ||
| export type GoogleVideoModelOptions = { | ||
| // Polling configuration | ||
@@ -80,4 +80,4 @@ pollIntervalMs?: number | null; | ||
| providerOptions: options.providerOptions, | ||
| schema: googleVideoProviderOptionsSchema, | ||
| })) as GoogleGenerativeAIVideoProviderOptions | undefined; | ||
| schema: googleVideoModelOptionsSchema, | ||
| })) as GoogleVideoModelOptions | undefined; | ||
@@ -160,3 +160,3 @@ const instances: Array<Record<string, unknown>> = [{}]; | ||
| if (googleOptions != null) { | ||
| const opts = googleOptions as GoogleGenerativeAIVideoProviderOptions; | ||
| const opts = googleOptions as GoogleVideoModelOptions; | ||
@@ -356,3 +356,3 @@ if ( | ||
| const googleVideoProviderOptionsSchema = lazySchema(() => | ||
| const googleVideoModelOptionsSchema = lazySchema(() => | ||
| zodSchema( | ||
@@ -359,0 +359,0 @@ z |
+20
-4
| export type { GoogleErrorData } from './google-error'; | ||
| export type { GoogleGenerativeAIProviderOptions } from './google-generative-ai-options'; | ||
| export type { | ||
| GoogleLanguageModelOptions, | ||
| /** @deprecated Use `GoogleLanguageModelOptions` instead. */ | ||
| GoogleLanguageModelOptions as GoogleGenerativeAIProviderOptions, | ||
| } from './google-generative-ai-options'; | ||
| export type { GoogleGenerativeAIProviderMetadata } from './google-generative-ai-prompt'; | ||
| export type { GoogleGenerativeAIImageProviderOptions } from './google-generative-ai-image-model'; | ||
| export type { GoogleGenerativeAIEmbeddingProviderOptions } from './google-generative-ai-embedding-options'; | ||
| export type { GoogleGenerativeAIVideoProviderOptions } from './google-generative-ai-video-model'; | ||
| export type { | ||
| GoogleImageModelOptions, | ||
| /** @deprecated Use `GoogleImageModelOptions` instead. */ | ||
| GoogleImageModelOptions as GoogleGenerativeAIImageProviderOptions, | ||
| } from './google-generative-ai-image-model'; | ||
| export type { | ||
| GoogleEmbeddingModelOptions, | ||
| /** @deprecated Use `GoogleEmbeddingModelOptions` instead. */ | ||
| GoogleEmbeddingModelOptions as GoogleGenerativeAIEmbeddingProviderOptions, | ||
| } from './google-generative-ai-embedding-options'; | ||
| export type { | ||
| GoogleVideoModelOptions, | ||
| /** @deprecated Use `GoogleVideoModelOptions` instead. */ | ||
| GoogleVideoModelOptions as GoogleGenerativeAIVideoProviderOptions, | ||
| } from './google-generative-ai-video-model'; | ||
| export type { GoogleGenerativeAIVideoModelId } from './google-generative-ai-video-settings'; | ||
@@ -8,0 +24,0 @@ export { createGoogleGenerativeAI, google } from './google-provider'; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1026346
0.09%11351
0.15%