@ai-sdk/gateway 4.0.44 → 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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ai-sdk/gateway",
3
3
  "private": false,
4
- "version": "4.0.44",
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.6",
35
- "@ai-sdk/provider-utils": "5.0.23"
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",
@@ -1,4 +1,4 @@
1
- import { z } from 'zod/v4';
1
+ import { z } from '../zod';
2
2
  import type { GatewayError } from './gateway-error';
3
3
  import { GatewayAuthenticationError } from './gateway-authentication-error';
4
4
  import { GatewayInvalidRequestError } from './gateway-invalid-request-error';
@@ -1,4 +1,4 @@
1
- import { z } from 'zod/v4';
1
+ import { z } from '../zod';
2
2
  import { GatewayError } from './gateway-error';
3
3
  import { lazySchema, zodSchema } from '@ai-sdk/provider-utils';
4
4
 
@@ -1,4 +1,4 @@
1
- import { z } from 'zod/v4';
1
+ import { z } from '../zod';
2
2
  import { GatewayError } from './gateway-error';
3
3
  import { lazySchema, zodSchema } from '@ai-sdk/provider-utils';
4
4
 
@@ -1,4 +1,4 @@
1
- import { z } from 'zod/v4';
1
+ import { z } from '../zod';
2
2
  import {
3
3
  lazySchema,
4
4
  safeValidateTypes,
@@ -15,7 +15,7 @@ import {
15
15
  zodSchema,
16
16
  type Resolvable,
17
17
  } from '@ai-sdk/provider-utils';
18
- import { z } from 'zod/v4';
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';
@@ -6,7 +6,7 @@ import {
6
6
  resolve,
7
7
  zodSchema,
8
8
  } from '@ai-sdk/provider-utils';
9
- import { z } from 'zod/v4';
9
+ import { z } from './zod';
10
10
  import { asGatewayError } from './errors';
11
11
  import type { GatewayConfig } from './gateway-config';
12
12
  import {
@@ -6,7 +6,7 @@ import {
6
6
  resolve,
7
7
  zodSchema,
8
8
  } from '@ai-sdk/provider-utils';
9
- import { z } from 'zod/v4';
9
+ import { z } from './zod';
10
10
  import { asGatewayError } from './errors';
11
11
  import type { GatewayConfig } from './gateway-config';
12
12
 
@@ -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/v4';
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-free'
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/v4';
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';
@@ -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/v4';
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/v4';
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';
@@ -1,4 +1,7 @@
1
1
  export type GatewaySpeechModelId =
2
+ | 'fish-audio/s1'
3
+ | 'fish-audio/s2-pro'
4
+ | 'fish-audio/s2.1-pro'
2
5
  | 'openai/tts-1'
3
6
  | 'openai/tts-1-hd'
4
7
  | 'xai/grok-tts'
@@ -11,7 +11,7 @@ import {
11
11
  resolve,
12
12
  type Resolvable,
13
13
  } from '@ai-sdk/provider-utils';
14
- import { z } from 'zod/v4';
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';
@@ -6,7 +6,7 @@ import {
6
6
  resolve,
7
7
  zodSchema,
8
8
  } from '@ai-sdk/provider-utils';
9
- import { z } from 'zod/v4';
9
+ import { z } from './zod';
10
10
  import { asGatewayError } from './errors';
11
11
  import type { GatewayConfig } from './gateway-config';
12
12
 
@@ -1,4 +1,5 @@
1
1
  export type GatewayTranscriptionModelId =
2
+ | 'fish-audio/transcribe-1'
2
3
  | 'openai/gpt-4o-mini-transcribe'
3
4
  | 'openai/gpt-4o-transcribe'
4
5
  | 'openai/gpt-realtime-whisper'
@@ -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/v4';
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/v4';
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';
@@ -3,7 +3,7 @@ import {
3
3
  lazySchema,
4
4
  zodSchema,
5
5
  } from '@ai-sdk/provider-utils';
6
- import { z } from 'zod/v4';
6
+ import { z } from '../zod';
7
7
 
8
8
  export type ExaSearchType = 'auto' | 'fast' | 'instant';
9
9
 
@@ -3,7 +3,7 @@ import {
3
3
  lazySchema,
4
4
  zodSchema,
5
5
  } from '@ai-sdk/provider-utils';
6
- import { z } from 'zod/v4';
6
+ import { z } from '../zod';
7
7
 
8
8
  export interface ParallelSearchSourcePolicy {
9
9
  /**
@@ -3,7 +3,7 @@ import {
3
3
  lazySchema,
4
4
  zodSchema,
5
5
  } from '@ai-sdk/provider-utils';
6
- import { z } from 'zod/v4';
6
+ import { z } from '../zod';
7
7
 
8
8
  export interface PerplexitySearchConfig {
9
9
  /**
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
+ };