@ai-sdk/gateway 4.0.0-canary.98 → 4.0.0

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 CHANGED
@@ -1,5 +1,306 @@
1
1
  # @ai-sdk/gateway
2
2
 
3
+ ## 4.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only (`"type": "module"`). Consumers using `require()` must switch to ESM `import` syntax.
8
+ - 8359612: Start v7 pre-release
9
+ - 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols
10
+
11
+ For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases.
12
+
13
+ ### Patch Changes
14
+
15
+ - bba5250: chore(provider/gateway): update gateway model settings files
16
+ - 94c6edc: Add `qwen3.7-max` model ID to Alibaba and AI Gateway.
17
+ - 980f777: chore(provider/gateway): update gateway model settings files
18
+ - 11746ca: chore(provider/gateway): update gateway model settings files
19
+ - fb0c233: chore(provider/gateway): update gateway model settings files
20
+ - e02f041: feat(provider/anthropic): add support for `claude-opus-4-8`
21
+ - 6b0a40d: feat (provider/gateway): add sort options
22
+ - 435895b: feat (provider/gateway): add get-generation support
23
+ - 38ca8dc: fix(gateway): enable retry support for gateway errors
24
+ - 7185ba2: bump `@vercel/oidc` dependency to 3.2.0
25
+ - 4d6ab9a: chore(provider/gateway): update gateway model settings files
26
+ - 7afaece: feat(provider/openai): add GPT-5.4 model support
27
+ - 7943a4b: chore(provider/gateway): update gateway model settings files
28
+ - aa5a583: chore(provider/xai): remove obsolete Grok 2 models now that they are shut down in their API
29
+ - a403276: chore(provider/gateway): update gateway model settings files
30
+ - 70a9aae: feat (provider/gateway): add disallowPromptTraining gateway provider option
31
+ - 8c17bf8: fix(gateway): surface provider warnings in embedding and reranking responses
32
+ - 8b7af75: chore(provider/gateway): update gateway model settings files
33
+ - 8e990ff: feat (provider/gateway): add Exa search tool support
34
+ - ba2e254: fix (provider/gateway): add 'reranking' to modelType validation schema and type so getAvailableModels() accepts reranking models from the gateway API
35
+ - 5f380c0: chore(provider/gateway): update gateway model settings files
36
+ - 4552cbf: chore(provider/gateway): update gateway model settings files
37
+ - bf837fe: feat(provider/gateway): add speech and transcription model support
38
+ - ca2cf45: fix(provider/gateway): map `forbidden` error responses to GatewayForbiddenError instead of GatewayInternalServerError
39
+ - 15eb253: feat(gateway): mint short-lived client secrets for experimental realtime
40
+
41
+ `gateway.experimental_realtime.getToken()` now mints a single-use, short-lived
42
+ client secret (`vcst_`) via the Gateway's `POST /v1/realtime/client-secrets`
43
+ endpoint instead of returning the long-lived Gateway credential. The customer's
44
+ server calls `getToken()` and hands the returned token to the browser, which
45
+ opens the realtime WebSocket with it through the existing
46
+ `ai-gateway-auth.<token>` subprotocol — the API key / OIDC token never reaches
47
+ the client. `expiresAfterSeconds` is forwarded to the mint endpoint and the
48
+ returned `expiresAt` is surfaced on the result.
49
+
50
+ The server-environment guard moves from realtime model construction to minting:
51
+ the browser can now build the realtime event codec it needs to drive the
52
+ transport, while minting (which requires the Gateway credential) stays
53
+ server-side.
54
+
55
+ - a3bb04a: feat(gateway): add experimental realtime model support
56
+
57
+ Adds `gateway.experimental_realtime()` for bidirectional audio/text realtime
58
+ sessions routed through the AI Gateway. Like every other Gateway modality, the
59
+ client speaks the normalized AI SDK realtime protocol and the Gateway
60
+ translates to/from the upstream provider server-side, so `GatewayRealtimeModel`
61
+ is a thin identity codec. Gateway realtime is server-side only for v0 and throws
62
+ if used in a browser because it returns the resolved Gateway auth token rather
63
+ than a minted ephemeral client secret. Because the browser `WebSocket` API
64
+ cannot set request headers, the Gateway auth token is carried via the
65
+ `Sec-WebSocket-Protocol` subprotocol (the same workaround used for OpenAI) and
66
+ the model id rides the `?ai-model-id=` query — the WS transport of the
67
+ `ai-model-id` header used by the HTTP routes. The model id is passed through
68
+ verbatim; the Gateway owns resolution. Provider options (including BYOK) flow
69
+ through the normalized `session.update`, exactly as they ride the request body
70
+ on the non-realtime routes.
71
+
72
+ The versioned subprotocol auth contract is centralized so the client and the
73
+ Gateway server share one definition: `getGatewayRealtimeProtocols` (client
74
+ encode) and `getGatewayRealtimeAuthToken` (server decode), plus the
75
+ `GATEWAY_REALTIME_SUBPROTOCOL` / `GATEWAY_AUTH_SUBPROTOCOL_PREFIX` constants.
76
+
77
+ `GatewayProviderOptions` documents the stable client-facing option fields while
78
+ remaining open to service-owned options. Runtime validation lives in the Gateway
79
+ service so the server can evolve without requiring an SDK release for every new
80
+ option.
81
+
82
+ - d4d4a5e: Add `serviceTier: 'flex' | 'priority'` to `GatewayProviderOptions`.
83
+ - 8b811d8: feat(provider/gateway): add optional Vercel team scoping for Gateway authentication. The existing `apiKey` option can be used with AI Gateway API keys, Vercel personal access tokens, and Vercel app access tokens.
84
+ - ead9144: chore(provider/gateway): update gateway model settings files
85
+ - 712873e: chore(provider/gateway): update gateway model settings files
86
+ - d5b8263: chore(provider/gateway): update gateway model settings files
87
+ - 71b0e7d: feat (provider/gateway): add hipaaCompliant gateway provider option
88
+ - 987d9e4: chore(provider/gateway): update gateway model settings files
89
+ - eb024b6: chore(provider/gateway): update gateway model settings files
90
+ - e7e8f42: chore(provider/gateway): update gateway model settings files
91
+ - 77cc1af: chore(provider/gateway): update gateway model settings files
92
+ - d30466c: feat (provider/gateway): add spend reporting support
93
+ - 72889f8: chore(provider/gateway): update gateway model settings files
94
+ - 9f0e36c: trigger release for all packages after provenance setup
95
+ - 2095655: chore(provider/gateway): update gateway model settings files
96
+ - e046ea3: chore(provider/gateway): update gateway model settings files
97
+ - 4adc485: chore(provider/gateway): update gateway model settings files
98
+ - f32d84a: chore(provider/gateway): update gateway model settings files
99
+ - 82288b0: feat(provider/google): add `gemini-embedding-2-preview` and fix multimodal embedding support with `embedMany`
100
+ - 03dc15c: chore(provider/gateway): update gateway model settings files
101
+ - 5df9b6f: feat (provider/gateway): make model list resilient to unknown model types
102
+ - 0457e45: chore(provider/gateway): update gateway model settings files
103
+ - 0694029: chore(provider/gateway): update gateway model settings files
104
+ - 8e53eb7: chore(provider/gateway): update gateway model settings files
105
+ - 1464561: chore(provider/gateway): update gateway model settings files
106
+ - c949e25: chore(provider/gateway): update gateway model settings files
107
+ - 558777f: fix(gateway): accept deprecated warnings in image, speech, transcription, and video responses
108
+ - d1f0d2b: feat (provider/gateway): add quotaEntityId gateway provider option
109
+ - 7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
110
+ - 939171f: feat (provider/gateway): add reranking model support with `rerankingModel()` and `reranking()` methods
111
+ - 294cbe7: chore(provider/gateway): update gateway model settings files
112
+ - bdbd322: fix (packages/gateway): clarify sort docs
113
+ - 0c4c275: trigger initial canary release
114
+ - a3261db: chore(provider/gateway): update gateway model settings files
115
+ - 8f53ccf: chore(provider/gateway): update gateway model settings files
116
+ - 4f91b5d: chore(provider/xai): update Grok 4.20 model IDs to their non-beta versions
117
+ - f16c103: chore(provider/gateway): update gateway model settings files
118
+ - 67c4011: fix(gateway): encode inline v4 file part bytes as { type: 'data' } instead of a data: URL
119
+ - 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type
120
+ - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
121
+ - 546cefe: feat(provider/google): add `gemini-3.5-flash`
122
+ - 24bb123: fix(gateway): base64-encode inline Uint8Array data on reasoning-file and tool-result file parts
123
+ - b8396f0: trigger initial beta release
124
+ - 6b4d325: feat(provider/anthropic): add support for `claude-fable-5` and the `fallbacks` API parameter
125
+ - c44fcc8: feat(gateway): add GatewayFailedDependencyError (424)
126
+ - 90e2d8a: chore: fix unused vars not being flagged by our lint tooling
127
+ - 165b97a: chore(provider/gateway): update gateway model settings files
128
+ - baa5f20: chore(provider/gateway): update gateway model settings files
129
+ - 4ec78cd: chore(provider/gateway): rename GatewayLanguageModelOptions back to GatewayProviderOptions
130
+ - 9876183: chore(provider/gateway): update gateway model settings files
131
+ - 0416e3e: feat (video): add first-class `generateAudio` call option
132
+ - 97e480a: chore(provider/gateway): update gateway model settings files
133
+ - b3976a2: Add workflow serialization support to all provider models.
134
+
135
+ **`@ai-sdk/provider-utils`:** New `serializeModel()` helper that extracts only serializable properties from a model instance, filtering out functions and objects containing functions. Third-party provider authors can use this to add workflow support to their own models.
136
+
137
+ **All providers:** `headers` is now optional in provider config types. This is non-breaking — existing code that passes `headers` continues to work. Custom provider implementations that construct model configs manually can now omit `headers`, which is useful when models are deserialized from a workflow step boundary where auth is provided separately.
138
+
139
+ All provider model classes now include `WORKFLOW_SERIALIZE` and `WORKFLOW_DESERIALIZE` static methods, enabling them to cross workflow step boundaries without serialization errors.
140
+
141
+ - efec111: chore(provider/gateway): update gateway model settings files
142
+ - accaca0: chore(provider/gateway): update gateway model settings files
143
+ - cdcdec2: chore(provider/gateway): update gateway model settings files
144
+ - 0d8f107: feat(provider/anthropic): add support for Opus 4.7 and relevant API enhancements
145
+ - f9acbc0: feat(provider/openai): add gpt-image-2 model support
146
+ - be09425: chore(provider/gateway): update gateway model settings files
147
+ - 7ceff62: chore(provider/gateway): update gateway model settings files
148
+ - 83877a1: chore(provider/gateway): update gateway model settings files
149
+ - 1d6fb7f: chore(provider/gateway): update gateway model settings files
150
+ - 032c4a5: chore(provider/gateway): update gateway model settings files
151
+
152
+ ## 4.0.0-beta.114
153
+
154
+ ### Patch Changes
155
+
156
+ - 77cc1af: chore(provider/gateway): update gateway model settings files
157
+
158
+ ## 4.0.0-beta.113
159
+
160
+ ### Patch Changes
161
+
162
+ - eb024b6: chore(provider/gateway): update gateway model settings files
163
+
164
+ ## 4.0.0-beta.112
165
+
166
+ ### Patch Changes
167
+
168
+ - a403276: chore(provider/gateway): update gateway model settings files
169
+ - 0416e3e: feat (video): add first-class `generateAudio` call option
170
+ - Updated dependencies [0416e3e]
171
+ - @ai-sdk/provider@4.0.0-beta.20
172
+ - @ai-sdk/provider-utils@5.0.0-beta.50
173
+
174
+ ## 4.0.0-beta.111
175
+
176
+ ### Patch Changes
177
+
178
+ - 8e990ff: feat (provider/gateway): add Exa search tool support
179
+
180
+ ## 4.0.0-beta.110
181
+
182
+ ### Patch Changes
183
+
184
+ - 987d9e4: chore(provider/gateway): update gateway model settings files
185
+
186
+ ## 4.0.0-beta.109
187
+
188
+ ### Patch Changes
189
+
190
+ - 15eb253: feat(gateway): mint short-lived client secrets for experimental realtime
191
+
192
+ `gateway.experimental_realtime.getToken()` now mints a single-use, short-lived
193
+ client secret (`vcst_`) via the Gateway's `POST /v1/realtime/client-secrets`
194
+ endpoint instead of returning the long-lived Gateway credential. The customer's
195
+ server calls `getToken()` and hands the returned token to the browser, which
196
+ opens the realtime WebSocket with it through the existing
197
+ `ai-gateway-auth.<token>` subprotocol — the API key / OIDC token never reaches
198
+ the client. `expiresAfterSeconds` is forwarded to the mint endpoint and the
199
+ returned `expiresAt` is surfaced on the result.
200
+
201
+ The server-environment guard moves from realtime model construction to minting:
202
+ the browser can now build the realtime event codec it needs to drive the
203
+ transport, while minting (which requires the Gateway credential) stays
204
+ server-side.
205
+
206
+ ## 4.0.0-beta.108
207
+
208
+ ### Patch Changes
209
+
210
+ - b8396f0: trigger initial beta release
211
+ - Updated dependencies [b8396f0]
212
+ - @ai-sdk/provider-utils@5.0.0-beta.49
213
+ - @ai-sdk/provider@4.0.0-beta.19
214
+
215
+ ## 4.0.0-canary.107
216
+
217
+ ### Patch Changes
218
+
219
+ - d5b8263: chore(provider/gateway): update gateway model settings files
220
+
221
+ ## 4.0.0-canary.106
222
+
223
+ ### Patch Changes
224
+
225
+ - ca2cf45: fix(provider/gateway): map `forbidden` error responses to GatewayForbiddenError instead of GatewayInternalServerError
226
+
227
+ ## 4.0.0-canary.105
228
+
229
+ ### Patch Changes
230
+
231
+ - efec111: chore(provider/gateway): update gateway model settings files
232
+
233
+ ## 4.0.0-canary.104
234
+
235
+ ### Patch Changes
236
+
237
+ - 8c17bf8: fix(gateway): surface provider warnings in embedding and reranking responses
238
+ - 558777f: fix(gateway): accept deprecated warnings in image, speech, transcription, and video responses
239
+ - Updated dependencies [aeda373]
240
+ - Updated dependencies [375fdd7]
241
+ - Updated dependencies [b4507d5]
242
+ - @ai-sdk/provider-utils@5.0.0-canary.48
243
+
244
+ ## 4.0.0-canary.103
245
+
246
+ ### Patch Changes
247
+
248
+ - Updated dependencies [bae5e2b]
249
+ - @ai-sdk/provider-utils@5.0.0-canary.47
250
+
251
+ ## 4.0.0-canary.102
252
+
253
+ ### Patch Changes
254
+
255
+ - a3bb04a: feat(gateway): add experimental realtime model support
256
+
257
+ Adds `gateway.experimental_realtime()` for bidirectional audio/text realtime
258
+ sessions routed through the AI Gateway. Like every other Gateway modality, the
259
+ client speaks the normalized AI SDK realtime protocol and the Gateway
260
+ translates to/from the upstream provider server-side, so `GatewayRealtimeModel`
261
+ is a thin identity codec. Gateway realtime is server-side only for v0 and throws
262
+ if used in a browser because it returns the resolved Gateway auth token rather
263
+ than a minted ephemeral client secret. Because the browser `WebSocket` API
264
+ cannot set request headers, the Gateway auth token is carried via the
265
+ `Sec-WebSocket-Protocol` subprotocol (the same workaround used for OpenAI) and
266
+ the model id rides the `?ai-model-id=` query — the WS transport of the
267
+ `ai-model-id` header used by the HTTP routes. The model id is passed through
268
+ verbatim; the Gateway owns resolution. Provider options (including BYOK) flow
269
+ through the normalized `session.update`, exactly as they ride the request body
270
+ on the non-realtime routes.
271
+
272
+ The versioned subprotocol auth contract is centralized so the client and the
273
+ Gateway server share one definition: `getGatewayRealtimeProtocols` (client
274
+ encode) and `getGatewayRealtimeAuthToken` (server decode), plus the
275
+ `GATEWAY_REALTIME_SUBPROTOCOL` / `GATEWAY_AUTH_SUBPROTOCOL_PREFIX` constants.
276
+
277
+ `GatewayProviderOptions` documents the stable client-facing option fields while
278
+ remaining open to service-owned options. Runtime validation lives in the Gateway
279
+ service so the server can evolve without requiring an SDK release for every new
280
+ option.
281
+
282
+ ## 4.0.0-canary.101
283
+
284
+ ### Patch Changes
285
+
286
+ - 6b4d325: feat(provider/anthropic): add support for `claude-fable-5` and the `fallbacks` API parameter
287
+
288
+ ## 4.0.0-canary.100
289
+
290
+ ### Patch Changes
291
+
292
+ - 24bb123: fix(gateway): base64-encode inline Uint8Array data on reasoning-file and tool-result file parts
293
+ - c44fcc8: feat(gateway): add GatewayFailedDependencyError (424)
294
+ - 97e480a: chore(provider/gateway): update gateway model settings files
295
+
296
+ ## 4.0.0-canary.99
297
+
298
+ ### Patch Changes
299
+
300
+ - Updated dependencies [ce769dd]
301
+ - @ai-sdk/provider@4.0.0-canary.18
302
+ - @ai-sdk/provider-utils@5.0.0-canary.46
303
+
3
304
  ## 4.0.0-canary.98
4
305
 
5
306
  ### Patch Changes