@ai-sdk/gateway
Advanced tools
+6
-0
| # @ai-sdk/gateway | ||
| ## 3.0.162 | ||
| ### Patch Changes | ||
| - b28367e: feat(provider/gateway): add `has` provider option for model capability filtering, supporting `'implicit-caching'` and `'vision'` (image input) | ||
| ## 3.0.161 | ||
@@ -4,0 +10,0 @@ |
+1
-0
@@ -727,2 +727,3 @@ import { LanguageModelV3, ProviderV3, EmbeddingModelV3, ImageModelV3, Experimental_VideoModelV3, RerankingModelV3, SpeechModelV3, TranscriptionModelV3, TypeValidationError } from '@ai-sdk/provider'; | ||
| caching?: "auto" | undefined; | ||
| has?: ("implicit-caching" | "vision")[] | undefined; | ||
| }>; | ||
@@ -729,0 +730,0 @@ type GatewayProviderOptions = InferSchema<typeof gatewayProviderOptions>; |
+1
-0
@@ -727,2 +727,3 @@ import { LanguageModelV3, ProviderV3, EmbeddingModelV3, ImageModelV3, Experimental_VideoModelV3, RerankingModelV3, SpeechModelV3, TranscriptionModelV3, TypeValidationError } from '@ai-sdk/provider'; | ||
| caching?: "auto" | undefined; | ||
| has?: ("implicit-caching" | "vision")[] | undefined; | ||
| }>; | ||
@@ -729,0 +730,0 @@ type GatewayProviderOptions = InferSchema<typeof gatewayProviderOptions>; |
+1
-1
| { | ||
| "name": "@ai-sdk/gateway", | ||
| "private": false, | ||
| "version": "3.0.161", | ||
| "version": "3.0.162", | ||
| "license": "Apache-2.0", | ||
@@ -6,0 +6,0 @@ "sideEffects": false, |
@@ -114,2 +114,15 @@ import { | ||
| caching: z.literal('auto').optional(), | ||
| /** | ||
| * Restrict routing to provider models that have all of the given | ||
| * capabilities: | ||
| * | ||
| * - `'implicit-caching'`: models that perform automatic (implicit) | ||
| * prompt caching | ||
| * - `'vision'`: models that accept image input | ||
| * | ||
| * The capability is a property of the model, so the filter applies to | ||
| * both BYOK and system credentials. If no provider model for the | ||
| * requested model satisfies the capabilities, the request fails. | ||
| */ | ||
| has: z.array(z.enum(['implicit-caching', 'vision'])).optional(), | ||
| }), | ||
@@ -116,0 +129,0 @@ ), |
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
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.
794301
0.4%9819
0.14%