@ai-sdk/gateway 4.0.45 → 4.0.46
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 +11 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +416 -406
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/errors/create-gateway-error.ts +1 -1
- package/src/errors/gateway-forbidden-error.ts +1 -1
- package/src/errors/gateway-model-not-found-error.ts +1 -1
- package/src/errors/parse-auth-method.ts +1 -1
- package/src/gateway-embedding-model.ts +1 -1
- package/src/gateway-fetch-metadata.ts +1 -1
- package/src/gateway-generation-info.ts +1 -1
- package/src/gateway-image-model.ts +1 -1
- package/src/gateway-language-model-settings.ts +4 -2
- package/src/gateway-language-model.ts +1 -1
- package/src/gateway-provider.ts +1 -1
- package/src/gateway-reranking-model.ts +1 -1
- package/src/gateway-speech-model-settings.ts +3 -0
- package/src/gateway-speech-model.ts +1 -1
- package/src/gateway-spend-report.ts +1 -1
- package/src/gateway-transcription-model-settings.ts +1 -0
- package/src/gateway-transcription-model.ts +1 -1
- package/src/gateway-video-model-settings.ts +1 -0
- package/src/gateway-video-model.ts +1 -1
- package/src/tool/exa-search.ts +1 -1
- package/src/tool/parallel-search.ts +1 -1
- package/src/tool/perplexity-search.ts +1 -1
- package/src/zod.ts +31 -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.46",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"sideEffects": false,
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@vercel/oidc": "3.2.0",
|
|
34
|
-
"@ai-sdk/provider": "4.0.
|
|
35
|
-
"@ai-sdk/provider-utils": "5.0.
|
|
34
|
+
"@ai-sdk/provider": "4.0.7",
|
|
35
|
+
"@ai-sdk/provider-utils": "5.0.25"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "22.19.19",
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
zodSchema,
|
|
16
16
|
type Resolvable,
|
|
17
17
|
} from '@ai-sdk/provider-utils';
|
|
18
|
-
import { z } from 'zod
|
|
18
|
+
import { z } from './zod';
|
|
19
19
|
import { asGatewayError } from './errors';
|
|
20
20
|
import { parseAuthMethod } from './errors/parse-auth-method';
|
|
21
21
|
import type { GatewayConfig } from './gateway-config';
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
WORKFLOW_DESERIALIZE,
|
|
16
16
|
type Resolvable,
|
|
17
17
|
} from '@ai-sdk/provider-utils';
|
|
18
|
-
import { z } from 'zod
|
|
18
|
+
import { z } from './zod';
|
|
19
19
|
import type { GatewayConfig } from './gateway-config';
|
|
20
20
|
import { asGatewayError } from './errors';
|
|
21
21
|
import { parseAuthMethod } from './errors/parse-auth-method';
|
|
@@ -39,7 +39,6 @@ export type GatewayModelId =
|
|
|
39
39
|
| 'anthropic/claude-opus-4.8'
|
|
40
40
|
| 'anthropic/claude-opus-4.8-fast'
|
|
41
41
|
| 'anthropic/claude-opus-5'
|
|
42
|
-
| 'anthropic/claude-opus-5-fast'
|
|
43
42
|
| 'anthropic/claude-sonnet-4'
|
|
44
43
|
| 'anthropic/claude-sonnet-4.5'
|
|
45
44
|
| 'anthropic/claude-sonnet-4.6'
|
|
@@ -77,7 +76,8 @@ export type GatewayModelId =
|
|
|
77
76
|
| 'google/gemma-4-31b-it'
|
|
78
77
|
| 'inception/mercury-2'
|
|
79
78
|
| 'inception/mercury-coder-small'
|
|
80
|
-
| 'inclusionai/ling-3.0-flash
|
|
79
|
+
| 'inclusionai/ling-3.0-flash'
|
|
80
|
+
| 'inclusionai/ling-3.0-tiny-free'
|
|
81
81
|
| 'interfaze/interfaze-beta'
|
|
82
82
|
| 'kwaipilot/kat-coder-air-v2.5'
|
|
83
83
|
| 'kwaipilot/kat-coder-pro-v1'
|
|
@@ -89,6 +89,8 @@ export type GatewayModelId =
|
|
|
89
89
|
| 'meta/llama-4-maverick'
|
|
90
90
|
| 'meta/llama-4-scout'
|
|
91
91
|
| 'meta/muse-spark-1.1'
|
|
92
|
+
| 'meta/muse-spark-1.2'
|
|
93
|
+
| 'meta/muse-spark-1.2-contributor'
|
|
92
94
|
| 'minimax/minimax-m2'
|
|
93
95
|
| 'minimax/minimax-m2.1'
|
|
94
96
|
| 'minimax/minimax-m2.1-lightning'
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
type ParseResult,
|
|
19
19
|
type Resolvable,
|
|
20
20
|
} from '@ai-sdk/provider-utils';
|
|
21
|
-
import { z } from 'zod
|
|
21
|
+
import { z } from './zod';
|
|
22
22
|
import type { GatewayConfig } from './gateway-config';
|
|
23
23
|
import type { GatewayModelId } from './gateway-language-model-settings';
|
|
24
24
|
import { asGatewayError } from './errors';
|
package/src/gateway-provider.ts
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
type FetchFunction,
|
|
9
9
|
type WebSocketConstructor,
|
|
10
10
|
} from '@ai-sdk/provider-utils';
|
|
11
|
-
import { z } from 'zod
|
|
11
|
+
import { z } from './zod';
|
|
12
12
|
import { asGatewayError, GatewayAuthenticationError } from './errors';
|
|
13
13
|
import {
|
|
14
14
|
GATEWAY_AUTH_METHOD_HEADER,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
zodSchema,
|
|
13
13
|
type Resolvable,
|
|
14
14
|
} from '@ai-sdk/provider-utils';
|
|
15
|
-
import { z } from 'zod
|
|
15
|
+
import { z } from './zod';
|
|
16
16
|
import { asGatewayError } from './errors';
|
|
17
17
|
import { parseAuthMethod } from './errors/parse-auth-method';
|
|
18
18
|
import type { GatewayConfig } from './gateway-config';
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
resolve,
|
|
12
12
|
type Resolvable,
|
|
13
13
|
} from '@ai-sdk/provider-utils';
|
|
14
|
-
import { z } from 'zod
|
|
14
|
+
import { z } from './zod';
|
|
15
15
|
import { asGatewayError } from './errors';
|
|
16
16
|
import { parseAuthMethod } from './errors/parse-auth-method';
|
|
17
17
|
import type { GatewayConfig } from './gateway-config';
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
type WebSocketConstructor,
|
|
28
28
|
type WebSocketLike,
|
|
29
29
|
} from '@ai-sdk/provider-utils';
|
|
30
|
-
import { z } from 'zod
|
|
30
|
+
import { z } from './zod';
|
|
31
31
|
import { asGatewayError, createGatewayErrorFromResponse } from './errors';
|
|
32
32
|
import { parseAuthMethod } from './errors/parse-auth-method';
|
|
33
33
|
import type { GatewayConfig } from './gateway-config';
|
|
@@ -10,6 +10,7 @@ export type GatewayVideoModelId =
|
|
|
10
10
|
| 'bfl/flux-3-video'
|
|
11
11
|
| 'bytedance/seedance-2.0'
|
|
12
12
|
| 'bytedance/seedance-2.0-fast'
|
|
13
|
+
| 'bytedance/seedance-2.5'
|
|
13
14
|
| 'bytedance/seedance-v1.0-pro'
|
|
14
15
|
| 'bytedance/seedance-v1.0-pro-fast'
|
|
15
16
|
| 'bytedance/seedance-v1.5-pro'
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
resolve,
|
|
21
21
|
type Resolvable,
|
|
22
22
|
} from '@ai-sdk/provider-utils';
|
|
23
|
-
import { z } from 'zod
|
|
23
|
+
import { z } from './zod';
|
|
24
24
|
import type { GatewayConfig } from './gateway-config';
|
|
25
25
|
import { asGatewayError } from './errors';
|
|
26
26
|
import { parseAuthMethod } from './errors/parse-auth-method';
|
package/src/tool/exa-search.ts
CHANGED
package/src/zod.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
any,
|
|
3
|
+
array,
|
|
4
|
+
boolean,
|
|
5
|
+
discriminatedUnion,
|
|
6
|
+
enum as enumType,
|
|
7
|
+
literal,
|
|
8
|
+
number,
|
|
9
|
+
object,
|
|
10
|
+
record,
|
|
11
|
+
string,
|
|
12
|
+
union,
|
|
13
|
+
unknown,
|
|
14
|
+
} from 'zod/v4';
|
|
15
|
+
|
|
16
|
+
// Import individual Zod factories so bundlers do not retain the full `z`
|
|
17
|
+
// namespace and all of its locale exports.
|
|
18
|
+
export const z = {
|
|
19
|
+
any,
|
|
20
|
+
array,
|
|
21
|
+
boolean,
|
|
22
|
+
discriminatedUnion,
|
|
23
|
+
enum: enumType,
|
|
24
|
+
literal,
|
|
25
|
+
number,
|
|
26
|
+
object,
|
|
27
|
+
record,
|
|
28
|
+
string,
|
|
29
|
+
union,
|
|
30
|
+
unknown,
|
|
31
|
+
};
|