@ai-sdk/google
Advanced tools
+2
-2
| { | ||
| "name": "@ai-sdk/google", | ||
| "version": "4.0.56", | ||
| "version": "4.0.57", | ||
| "type": "module", | ||
@@ -39,3 +39,3 @@ "license": "Apache-2.0", | ||
| "@ai-sdk/provider": "4.0.8", | ||
| "@ai-sdk/provider-utils": "5.0.32" | ||
| "@ai-sdk/provider-utils": "5.0.33" | ||
| }, | ||
@@ -42,0 +42,0 @@ "devDependencies": { |
@@ -52,2 +52,6 @@ import type { | ||
| const DEFAULT_BASE_URL = 'https://generativelanguage.googleapis.com/v1beta'; | ||
| const googleFilesUrlPattern = | ||
| /^https:\/\/generativelanguage\.googleapis\.com\/v1beta\/files\/.*$/; | ||
| export interface GoogleProvider extends ProviderV4 { | ||
@@ -241,5 +245,3 @@ (modelId: GoogleModelId): BatchLanguageModelV4; | ||
| ): GoogleProvider { | ||
| const baseURL = | ||
| withoutTrailingSlash(options.baseURL) ?? | ||
| 'https://generativelanguage.googleapis.com/v1beta'; | ||
| const baseURL = withoutTrailingSlash(options.baseURL) ?? DEFAULT_BASE_URL; | ||
@@ -269,4 +271,6 @@ const providerName = options.name ?? 'google.generative-ai'; | ||
| '*': [ | ||
| // Google Generative Language "files" endpoint | ||
| // Default Google Generative Language "files" endpoint | ||
| // e.g. https://generativelanguage.googleapis.com/v1beta/files/... | ||
| googleFilesUrlPattern, | ||
| // Configured Google Generative Language "files" endpoint | ||
| new RegExp(`^${baseURL}/files/.*$`), | ||
@@ -273,0 +277,0 @@ // YouTube URLs (public or unlisted videos) |
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
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
2321851
0.04%29971
0.02%+ Added
- Removed