@ai-sdk/gateway 4.0.0-canary.99 → 4.0.1

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