@ai-sdk/gateway 4.0.39 → 4.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/gateway-embedding-model-settings.ts +2 -0
- package/src/gateway-video-model.ts +8 -8
- package/src/index.ts +2 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/gateway",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.41",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"sideEffects": false,
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@vercel/oidc": "3.2.0",
|
|
34
34
|
"@ai-sdk/provider": "4.0.5",
|
|
35
|
-
"@ai-sdk/provider-utils": "5.0.
|
|
35
|
+
"@ai-sdk/provider-utils": "5.0.21"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "22.19.19",
|
|
@@ -13,6 +13,8 @@ export type GatewayEmbeddingModelId =
|
|
|
13
13
|
| 'openai/text-embedding-3-large'
|
|
14
14
|
| 'openai/text-embedding-3-small'
|
|
15
15
|
| 'openai/text-embedding-ada-002'
|
|
16
|
+
| 'perplexity/pplx-embed-v1-0.6b'
|
|
17
|
+
| 'perplexity/pplx-embed-v1-4b'
|
|
16
18
|
| 'voyage/voyage-3-large'
|
|
17
19
|
| 'voyage/voyage-3.5'
|
|
18
20
|
| 'voyage/voyage-3.5-lite'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
APICallError,
|
|
3
|
-
type Experimental_VideoModelV4,
|
|
4
|
-
type Experimental_VideoModelV4CallOptions,
|
|
5
|
-
type Experimental_VideoModelV4File,
|
|
6
|
-
type Experimental_VideoModelV4VideoData,
|
|
3
|
+
type Experimental_VideoModelV4 as VideoModelV4,
|
|
4
|
+
type Experimental_VideoModelV4CallOptions as VideoModelV4CallOptions,
|
|
5
|
+
type Experimental_VideoModelV4File as VideoModelV4File,
|
|
6
|
+
type Experimental_VideoModelV4VideoData as VideoModelV4VideoData,
|
|
7
7
|
type SharedV4ProviderMetadata,
|
|
8
8
|
type SharedV4Warning,
|
|
9
9
|
} from '@ai-sdk/provider';
|
|
@@ -21,7 +21,7 @@ import type { GatewayConfig } from './gateway-config';
|
|
|
21
21
|
import { asGatewayError } from './errors';
|
|
22
22
|
import { parseAuthMethod } from './errors/parse-auth-method';
|
|
23
23
|
|
|
24
|
-
export class GatewayVideoModel implements
|
|
24
|
+
export class GatewayVideoModel implements VideoModelV4 {
|
|
25
25
|
readonly specificationVersion = 'v4' as const;
|
|
26
26
|
// Set a very large number to prevent client-side splitting of requests
|
|
27
27
|
readonly maxVideosPerCall = Number.MAX_SAFE_INTEGER;
|
|
@@ -53,8 +53,8 @@ export class GatewayVideoModel implements Experimental_VideoModelV4 {
|
|
|
53
53
|
providerOptions,
|
|
54
54
|
headers,
|
|
55
55
|
abortSignal,
|
|
56
|
-
}:
|
|
57
|
-
videos: Array<
|
|
56
|
+
}: VideoModelV4CallOptions): Promise<{
|
|
57
|
+
videos: Array<VideoModelV4VideoData>;
|
|
58
58
|
warnings: Array<SharedV4Warning>;
|
|
59
59
|
providerMetadata?: SharedV4ProviderMetadata;
|
|
60
60
|
response: {
|
|
@@ -214,7 +214,7 @@ export class GatewayVideoModel implements Experimental_VideoModelV4 {
|
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
function maybeEncodeVideoFile(file:
|
|
217
|
+
function maybeEncodeVideoFile(file: VideoModelV4File) {
|
|
218
218
|
if (file.type === 'file' && file.data instanceof Uint8Array) {
|
|
219
219
|
return {
|
|
220
220
|
...file,
|
package/src/index.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export type { GatewayEmbeddingModelId } from './gateway-embedding-model-settings';
|
|
2
|
+
export type { GatewayImageModelId } from './gateway-image-model-settings';
|
|
1
3
|
export type { GatewayModelId } from './gateway-language-model-settings';
|
|
2
4
|
export {
|
|
3
5
|
GATEWAY_AUTH_SUBPROTOCOL_PREFIX,
|