@ai-sdk/gateway 4.0.154 → 4.0.155
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 +14 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/gateway-model-catalog.ts +3 -2
- package/src/gateway-video-model.ts +10 -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.155",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"sideEffects": false,
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@ai-sdk/provider": "4.0.39",
|
|
34
|
-
"@ai-sdk/provider-utils": "5.0.
|
|
34
|
+
"@ai-sdk/provider-utils": "5.0.84",
|
|
35
35
|
"@vercel/oidc": "3.2.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
@@ -5,7 +5,6 @@ export const gatewayModelIds = {
|
|
|
5
5
|
'alibaba/qwen-3-32b',
|
|
6
6
|
'alibaba/qwen3-coder-30b-a3b',
|
|
7
7
|
'alibaba/qwen3-coder-next',
|
|
8
|
-
'alibaba/qwen3-max-thinking',
|
|
9
8
|
'alibaba/qwen3-next-80b-a3b-instruct',
|
|
10
9
|
'alibaba/qwen3-vl-instruct',
|
|
11
10
|
'alibaba/qwen3.5-flash',
|
|
@@ -299,6 +298,7 @@ export const gatewayModelIds = {
|
|
|
299
298
|
'tencent/hy4-flash',
|
|
300
299
|
'tencent/hy4-preview',
|
|
301
300
|
'thinkingmachines/inkling',
|
|
301
|
+
'thinkingmachines/inkling-2-mini',
|
|
302
302
|
'thinkingmachines/inkling-2-small',
|
|
303
303
|
'thinkingmachines/inkling-small',
|
|
304
304
|
'xiaomi/mimo-v2.6-flash',
|
|
@@ -354,14 +354,15 @@ export const gatewayModelIds = {
|
|
|
354
354
|
'voyage/voyage-law-2',
|
|
355
355
|
],
|
|
356
356
|
decision: [
|
|
357
|
+
'baseten/bison-1',
|
|
357
358
|
'baseten/elephant-1',
|
|
359
|
+
'baseten/groundhog-1',
|
|
358
360
|
'baseten/joey-1',
|
|
359
361
|
'baseten/mammoth-1',
|
|
360
362
|
'convaiinnovations/laya',
|
|
361
363
|
'google/gemini-decision-1',
|
|
362
364
|
'heygen/heygen-decision-1',
|
|
363
365
|
'heygen/heygen-decision-1-turbo',
|
|
364
|
-
'liquid/d1-ultra',
|
|
365
366
|
'liquid/d1.2',
|
|
366
367
|
'liquid/d1.2-ultra',
|
|
367
368
|
'microsoft/decision-1.1',
|
|
@@ -30,6 +30,15 @@ import { asGatewayError } from './errors';
|
|
|
30
30
|
import { parseAuthMethod } from './errors/parse-auth-method';
|
|
31
31
|
import { withGatewayRequestTelemetryRedaction } from './redact-gateway-request-credentials';
|
|
32
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Maximum size of the result event: 512 * 1024 * 1024 characters.
|
|
35
|
+
*
|
|
36
|
+
* The result event contains all generated videos, which can be base64 encoded,
|
|
37
|
+
* so it can be much larger than the default maximum event size. The limit is
|
|
38
|
+
* about the maximum length of a string in V8.
|
|
39
|
+
*/
|
|
40
|
+
const MAX_RESULT_EVENT_SIZE = 512 * 1024 * 1024;
|
|
41
|
+
|
|
33
42
|
export class GatewayVideoModel implements VideoModelV4 {
|
|
34
43
|
readonly specificationVersion = 'v4' as const;
|
|
35
44
|
// Set a very large number to prevent client-side splitting of requests
|
|
@@ -95,6 +104,7 @@ export class GatewayVideoModel implements VideoModelV4 {
|
|
|
95
104
|
const eventStream = parseJsonEventStream({
|
|
96
105
|
stream: response.body,
|
|
97
106
|
schema: gatewayVideoEventSchema,
|
|
107
|
+
maxEventSize: MAX_RESULT_EVENT_SIZE,
|
|
98
108
|
});
|
|
99
109
|
|
|
100
110
|
const reader = eventStream.getReader();
|