@ai-sdk/google
Advanced tools
+5
-5
| { | ||
| "name": "@ai-sdk/google", | ||
| "version": "4.0.8", | ||
| "version": "4.0.9", | ||
| "type": "module", | ||
@@ -38,4 +38,4 @@ "license": "Apache-2.0", | ||
| "dependencies": { | ||
| "@ai-sdk/provider-utils": "5.0.5", | ||
| "@ai-sdk/provider": "4.0.2" | ||
| "@ai-sdk/provider": "4.0.2", | ||
| "@ai-sdk/provider-utils": "5.0.5" | ||
| }, | ||
@@ -47,4 +47,4 @@ "devDependencies": { | ||
| "zod": "3.25.76", | ||
| "@vercel/ai-tsconfig": "0.0.0", | ||
| "@ai-sdk/test-server": "2.0.0" | ||
| "@ai-sdk/test-server": "2.0.0", | ||
| "@vercel/ai-tsconfig": "0.0.0" | ||
| }, | ||
@@ -51,0 +51,0 @@ "peerDependencies": { |
@@ -162,2 +162,33 @@ import type { | ||
| const supportedExternalUrlMediaTypes = [ | ||
| 'text/html', | ||
| 'text/css', | ||
| 'text/plain', | ||
| 'text/xml', | ||
| 'text/csv', | ||
| 'text/rtf', | ||
| 'text/javascript', | ||
| 'application/json', | ||
| 'application/pdf', | ||
| 'image/bmp', | ||
| 'image/jpeg', | ||
| 'image/png', | ||
| 'image/webp', | ||
| 'video/mp4', | ||
| 'video/mpeg', | ||
| 'video/quicktime', | ||
| 'video/avi', | ||
| 'video/x-flv', | ||
| 'video/mpg', | ||
| 'video/webm', | ||
| 'video/wmv', | ||
| 'video/3gpp', | ||
| ]; | ||
| const externalHttpsUrlPattern = /^https:\/\/.*$/; | ||
| function supportsExternalFileUrls(modelId: string) { | ||
| return /(^|\/)gemini-/.test(modelId) && !/(^|\/)gemini-2\.0/.test(modelId); | ||
| } | ||
| /** | ||
@@ -205,2 +236,10 @@ * Create a Google provider instance. | ||
| ], | ||
| ...(supportsExternalFileUrls(modelId) | ||
| ? Object.fromEntries( | ||
| supportedExternalUrlMediaTypes.map(mediaType => [ | ||
| mediaType, | ||
| [externalHttpsUrlPattern], | ||
| ]), | ||
| ) | ||
| : {}), | ||
| }), | ||
@@ -207,0 +246,0 @@ fetch: options.fetch, |
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.
1982357
0.16%25060
0.28%