🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@ai-sdk/gateway

Package Overview
Dependencies
Maintainers
3
Versions
620
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ai-sdk/gateway - npm Package Compare versions

Comparing version
3.0.161
to
3.0.162
+6
-0
CHANGELOG.md
# @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>;

@@ -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