@ai-sdk/gateway 3.0.241 → 3.0.242

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": "3.0.241",
4
+ "version": "3.0.242",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
7
7
  "main": "./dist/index.js",
@@ -32,7 +32,7 @@
32
32
  "dependencies": {
33
33
  "@vercel/oidc": "3.2.0",
34
34
  "@ai-sdk/provider": "3.0.19",
35
- "@ai-sdk/provider-utils": "4.0.67"
35
+ "@ai-sdk/provider-utils": "4.0.68"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/node": "18.15.11",
@@ -4,7 +4,6 @@ export type GatewayModelId =
4
4
  | 'alibaba/qwen-3-32b'
5
5
  | 'alibaba/qwen3-coder-30b-a3b'
6
6
  | 'alibaba/qwen3-coder-next'
7
- | 'alibaba/qwen3-max-thinking'
8
7
  | 'alibaba/qwen3-next-80b-a3b-instruct'
9
8
  | 'alibaba/qwen3-vl-instruct'
10
9
  | 'alibaba/qwen3.5-flash'
@@ -298,6 +297,7 @@ export type GatewayModelId =
298
297
  | 'tencent/hy4-flash'
299
298
  | 'tencent/hy4-preview'
300
299
  | 'thinkingmachines/inkling'
300
+ | 'thinkingmachines/inkling-2-mini'
301
301
  | 'thinkingmachines/inkling-2-small'
302
302
  | 'thinkingmachines/inkling-small'
303
303
  | 'xiaomi/mimo-v2.6-flash'
@@ -25,6 +25,15 @@ import type { GatewayConfig } from './gateway-config';
25
25
  import { asGatewayError } from './errors';
26
26
  import { parseAuthMethod } from './errors/parse-auth-method';
27
27
 
28
+ /**
29
+ * Maximum size of the result event: 512 * 1024 * 1024 characters.
30
+ *
31
+ * The result event contains all generated videos, which can be base64 encoded,
32
+ * so it can be much larger than the default maximum event size. The limit is
33
+ * about the maximum length of a string in V8.
34
+ */
35
+ const MAX_RESULT_EVENT_SIZE = 512 * 1024 * 1024;
36
+
28
37
  export class GatewayVideoModel implements Experimental_VideoModelV3 {
29
38
  readonly specificationVersion = 'v3' as const;
30
39
  // Set a very large number to prevent client-side splitting of requests
@@ -122,6 +131,7 @@ export class GatewayVideoModel implements Experimental_VideoModelV3 {
122
131
  const eventStream = parseJsonEventStream({
123
132
  stream: response.body,
124
133
  schema: gatewayVideoEventSchema,
134
+ maxEventSize: MAX_RESULT_EVENT_SIZE,
125
135
  });
126
136
 
127
137
  const reader = eventStream.getReader();