@tanstack/ai-byteplus 0.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/LICENSE +21 -0
- package/README.md +202 -0
- package/dist/esm/adapters/image.d.ts +89 -0
- package/dist/esm/adapters/image.js +229 -0
- package/dist/esm/adapters/image.js.map +1 -0
- package/dist/esm/adapters/text.d.ts +163 -0
- package/dist/esm/adapters/text.js +347 -0
- package/dist/esm/adapters/text.js.map +1 -0
- package/dist/esm/adapters/transcription.d.ts +102 -0
- package/dist/esm/adapters/transcription.js +274 -0
- package/dist/esm/adapters/transcription.js.map +1 -0
- package/dist/esm/adapters/tts.d.ts +143 -0
- package/dist/esm/adapters/tts.js +307 -0
- package/dist/esm/adapters/tts.js.map +1 -0
- package/dist/esm/adapters/video.d.ts +182 -0
- package/dist/esm/adapters/video.js +442 -0
- package/dist/esm/adapters/video.js.map +1 -0
- package/dist/esm/audio/transcription-provider-options.d.ts +46 -0
- package/dist/esm/audio/tts-provider-options.d.ts +114 -0
- package/dist/esm/audio/wire-types.d.ts +261 -0
- package/dist/esm/audio/wire-types.js +28 -0
- package/dist/esm/audio/wire-types.js.map +1 -0
- package/dist/esm/image/image-provider-options.d.ts +165 -0
- package/dist/esm/image/image-provider-options.js +134 -0
- package/dist/esm/image/image-provider-options.js.map +1 -0
- package/dist/esm/image/wire-types.d.ts +149 -0
- package/dist/esm/index.d.ts +25 -0
- package/dist/esm/index.js +11 -0
- package/dist/esm/message-types.d.ts +154 -0
- package/dist/esm/model-meta.d.ts +594 -0
- package/dist/esm/model-meta.js +619 -0
- package/dist/esm/model-meta.js.map +1 -0
- package/dist/esm/text/text-provider-options.d.ts +109 -0
- package/dist/esm/utils/client.d.ts +183 -0
- package/dist/esm/utils/client.js +253 -0
- package/dist/esm/utils/client.js.map +1 -0
- package/dist/esm/video/video-provider-options.d.ts +197 -0
- package/dist/esm/video/video-provider-options.js +191 -0
- package/dist/esm/video/video-provider-options.js.map +1 -0
- package/dist/esm/video/wire-types.d.ts +248 -0
- package/package.json +77 -0
- package/src/adapters/image.ts +409 -0
- package/src/adapters/text.ts +539 -0
- package/src/adapters/transcription.ts +479 -0
- package/src/adapters/tts.ts +447 -0
- package/src/adapters/video.ts +732 -0
- package/src/audio/transcription-provider-options.ts +46 -0
- package/src/audio/tts-provider-options.ts +122 -0
- package/src/audio/wire-types.ts +290 -0
- package/src/image/image-provider-options.ts +288 -0
- package/src/image/wire-types.ts +169 -0
- package/src/index.ts +222 -0
- package/src/message-types.ts +169 -0
- package/src/model-meta.ts +954 -0
- package/src/text/text-provider-options.ts +151 -0
- package/src/utils/client.ts +377 -0
- package/src/video/video-provider-options.ts +361 -0
- package/src/video/wire-types.ts +293 -0
|
@@ -0,0 +1,619 @@
|
|
|
1
|
+
//#region src/model-meta.ts
|
|
2
|
+
var DOLA_SEED_2_1_TURBO = {
|
|
3
|
+
name: "dola-seed-2-1-turbo-260628",
|
|
4
|
+
context_window: 256e3,
|
|
5
|
+
max_input_tokens: 256e3,
|
|
6
|
+
max_output_tokens: 256e3,
|
|
7
|
+
supports: {
|
|
8
|
+
input: [
|
|
9
|
+
"text",
|
|
10
|
+
"image",
|
|
11
|
+
"video"
|
|
12
|
+
],
|
|
13
|
+
output: ["text"],
|
|
14
|
+
capabilities: [
|
|
15
|
+
"reasoning",
|
|
16
|
+
"tool_calling",
|
|
17
|
+
"structured_outputs"
|
|
18
|
+
],
|
|
19
|
+
tools: []
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
var SEED_2_0_LITE_260428 = {
|
|
23
|
+
name: "seed-2-0-lite-260428",
|
|
24
|
+
context_window: 256e3,
|
|
25
|
+
max_input_tokens: 256e3,
|
|
26
|
+
max_output_tokens: 128e3,
|
|
27
|
+
supports: {
|
|
28
|
+
input: [
|
|
29
|
+
"text",
|
|
30
|
+
"image",
|
|
31
|
+
"video",
|
|
32
|
+
"audio"
|
|
33
|
+
],
|
|
34
|
+
output: ["text"],
|
|
35
|
+
capabilities: ["reasoning", "tool_calling"],
|
|
36
|
+
tools: []
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
var SEED_2_0_MINI_260428 = {
|
|
40
|
+
name: "seed-2-0-mini-260428",
|
|
41
|
+
context_window: 256e3,
|
|
42
|
+
max_input_tokens: 256e3,
|
|
43
|
+
max_output_tokens: 128e3,
|
|
44
|
+
supports: {
|
|
45
|
+
input: [
|
|
46
|
+
"text",
|
|
47
|
+
"image",
|
|
48
|
+
"video",
|
|
49
|
+
"audio"
|
|
50
|
+
],
|
|
51
|
+
output: ["text"],
|
|
52
|
+
capabilities: ["reasoning", "tool_calling"],
|
|
53
|
+
tools: []
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
var SEED_2_0_PRO_260328 = {
|
|
57
|
+
name: "seed-2-0-pro-260328",
|
|
58
|
+
context_window: 256e3,
|
|
59
|
+
max_input_tokens: 224e3,
|
|
60
|
+
max_output_tokens: 128e3,
|
|
61
|
+
supports: {
|
|
62
|
+
input: [
|
|
63
|
+
"text",
|
|
64
|
+
"image",
|
|
65
|
+
"video"
|
|
66
|
+
],
|
|
67
|
+
output: ["text"],
|
|
68
|
+
capabilities: [
|
|
69
|
+
"reasoning",
|
|
70
|
+
"tool_calling",
|
|
71
|
+
"structured_outputs"
|
|
72
|
+
],
|
|
73
|
+
tools: []
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
var SEED_2_0_LITE_260228 = {
|
|
77
|
+
name: "seed-2-0-lite-260228",
|
|
78
|
+
context_window: 256e3,
|
|
79
|
+
max_input_tokens: 224e3,
|
|
80
|
+
max_output_tokens: 128e3,
|
|
81
|
+
supports: {
|
|
82
|
+
input: [
|
|
83
|
+
"text",
|
|
84
|
+
"image",
|
|
85
|
+
"video"
|
|
86
|
+
],
|
|
87
|
+
output: ["text"],
|
|
88
|
+
capabilities: [
|
|
89
|
+
"reasoning",
|
|
90
|
+
"tool_calling",
|
|
91
|
+
"structured_outputs"
|
|
92
|
+
],
|
|
93
|
+
tools: []
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
var SEED_2_0_MINI_260215 = {
|
|
97
|
+
name: "seed-2-0-mini-260215",
|
|
98
|
+
context_window: 256e3,
|
|
99
|
+
max_input_tokens: 224e3,
|
|
100
|
+
max_output_tokens: 128e3,
|
|
101
|
+
supports: {
|
|
102
|
+
input: [
|
|
103
|
+
"text",
|
|
104
|
+
"image",
|
|
105
|
+
"video"
|
|
106
|
+
],
|
|
107
|
+
output: ["text"],
|
|
108
|
+
capabilities: [
|
|
109
|
+
"reasoning",
|
|
110
|
+
"tool_calling",
|
|
111
|
+
"structured_outputs"
|
|
112
|
+
],
|
|
113
|
+
tools: []
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
var SEED_2_0_CODE_PREVIEW_260328 = {
|
|
117
|
+
name: "seed-2-0-code-preview-260328",
|
|
118
|
+
context_window: 256e3,
|
|
119
|
+
max_input_tokens: 224e3,
|
|
120
|
+
max_output_tokens: 128e3,
|
|
121
|
+
supports: {
|
|
122
|
+
input: [
|
|
123
|
+
"text",
|
|
124
|
+
"image",
|
|
125
|
+
"video"
|
|
126
|
+
],
|
|
127
|
+
output: ["text"],
|
|
128
|
+
capabilities: ["reasoning", "tool_calling"],
|
|
129
|
+
tools: []
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
var SEED_1_8_251228 = {
|
|
133
|
+
name: "seed-1-8-251228",
|
|
134
|
+
context_window: 256e3,
|
|
135
|
+
max_input_tokens: 224e3,
|
|
136
|
+
max_output_tokens: 64e3,
|
|
137
|
+
supports: {
|
|
138
|
+
input: [
|
|
139
|
+
"text",
|
|
140
|
+
"image",
|
|
141
|
+
"video"
|
|
142
|
+
],
|
|
143
|
+
output: ["text"],
|
|
144
|
+
capabilities: [
|
|
145
|
+
"reasoning",
|
|
146
|
+
"tool_calling",
|
|
147
|
+
"structured_outputs"
|
|
148
|
+
],
|
|
149
|
+
tools: []
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
var SEED_1_6_250915 = {
|
|
153
|
+
name: "seed-1-6-250915",
|
|
154
|
+
context_window: 256e3,
|
|
155
|
+
max_input_tokens: 224e3,
|
|
156
|
+
max_output_tokens: 32e3,
|
|
157
|
+
supports: {
|
|
158
|
+
input: [
|
|
159
|
+
"text",
|
|
160
|
+
"image",
|
|
161
|
+
"video"
|
|
162
|
+
],
|
|
163
|
+
output: ["text"],
|
|
164
|
+
capabilities: [
|
|
165
|
+
"reasoning",
|
|
166
|
+
"tool_calling",
|
|
167
|
+
"structured_outputs"
|
|
168
|
+
],
|
|
169
|
+
tools: []
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
var SEED_1_6_250615 = {
|
|
173
|
+
name: "seed-1-6-250615",
|
|
174
|
+
context_window: 256e3,
|
|
175
|
+
max_input_tokens: 224e3,
|
|
176
|
+
max_output_tokens: 32e3,
|
|
177
|
+
supports: {
|
|
178
|
+
input: [
|
|
179
|
+
"text",
|
|
180
|
+
"image",
|
|
181
|
+
"video"
|
|
182
|
+
],
|
|
183
|
+
output: ["text"],
|
|
184
|
+
capabilities: [
|
|
185
|
+
"reasoning",
|
|
186
|
+
"tool_calling",
|
|
187
|
+
"structured_outputs"
|
|
188
|
+
],
|
|
189
|
+
tools: []
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
var SEED_1_6_FLASH_250715 = {
|
|
193
|
+
name: "seed-1-6-flash-250715",
|
|
194
|
+
context_window: 256e3,
|
|
195
|
+
max_input_tokens: 224e3,
|
|
196
|
+
max_output_tokens: 32e3,
|
|
197
|
+
supports: {
|
|
198
|
+
input: [
|
|
199
|
+
"text",
|
|
200
|
+
"image",
|
|
201
|
+
"video"
|
|
202
|
+
],
|
|
203
|
+
output: ["text"],
|
|
204
|
+
capabilities: [
|
|
205
|
+
"reasoning",
|
|
206
|
+
"tool_calling",
|
|
207
|
+
"structured_outputs"
|
|
208
|
+
],
|
|
209
|
+
tools: []
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
var SEED_1_6_FLASH_250615 = {
|
|
213
|
+
name: "seed-1-6-flash-250615",
|
|
214
|
+
context_window: 256e3,
|
|
215
|
+
max_input_tokens: 224e3,
|
|
216
|
+
max_output_tokens: 32e3,
|
|
217
|
+
supports: {
|
|
218
|
+
input: [
|
|
219
|
+
"text",
|
|
220
|
+
"image",
|
|
221
|
+
"video"
|
|
222
|
+
],
|
|
223
|
+
output: ["text"],
|
|
224
|
+
capabilities: [
|
|
225
|
+
"reasoning",
|
|
226
|
+
"tool_calling",
|
|
227
|
+
"structured_outputs"
|
|
228
|
+
],
|
|
229
|
+
tools: []
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
var GLM_5_2_260617 = {
|
|
233
|
+
name: "glm-5-2-260617",
|
|
234
|
+
context_window: 1024e3,
|
|
235
|
+
max_input_tokens: 1024e3,
|
|
236
|
+
max_output_tokens: 128e3,
|
|
237
|
+
supports: {
|
|
238
|
+
input: ["text"],
|
|
239
|
+
output: ["text"],
|
|
240
|
+
capabilities: [
|
|
241
|
+
"reasoning",
|
|
242
|
+
"tool_calling",
|
|
243
|
+
"structured_outputs"
|
|
244
|
+
],
|
|
245
|
+
tools: []
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
/**
|
|
249
|
+
* All supported BytePlus chat model identifiers.
|
|
250
|
+
*/
|
|
251
|
+
var BYTEPLUS_CHAT_MODELS = [
|
|
252
|
+
DOLA_SEED_2_1_TURBO.name,
|
|
253
|
+
SEED_2_0_LITE_260428.name,
|
|
254
|
+
SEED_2_0_MINI_260428.name,
|
|
255
|
+
SEED_2_0_PRO_260328.name,
|
|
256
|
+
SEED_2_0_LITE_260228.name,
|
|
257
|
+
SEED_2_0_MINI_260215.name,
|
|
258
|
+
SEED_2_0_CODE_PREVIEW_260328.name,
|
|
259
|
+
SEED_1_8_251228.name,
|
|
260
|
+
SEED_1_6_250915.name,
|
|
261
|
+
SEED_1_6_250615.name,
|
|
262
|
+
SEED_1_6_FLASH_250715.name,
|
|
263
|
+
SEED_1_6_FLASH_250615.name,
|
|
264
|
+
GLM_5_2_260617.name,
|
|
265
|
+
{
|
|
266
|
+
name: "glm-4-7-251222",
|
|
267
|
+
context_window: 256e3,
|
|
268
|
+
max_input_tokens: 224e3,
|
|
269
|
+
max_output_tokens: 128e3,
|
|
270
|
+
supports: {
|
|
271
|
+
input: ["text"],
|
|
272
|
+
output: ["text"],
|
|
273
|
+
capabilities: ["reasoning", "tool_calling"],
|
|
274
|
+
tools: []
|
|
275
|
+
}
|
|
276
|
+
}.name,
|
|
277
|
+
{
|
|
278
|
+
name: "deepseek-v4-pro-260425",
|
|
279
|
+
context_window: 1024e3,
|
|
280
|
+
max_input_tokens: 1024e3,
|
|
281
|
+
max_output_tokens: 384e3,
|
|
282
|
+
supports: {
|
|
283
|
+
input: ["text"],
|
|
284
|
+
output: ["text"],
|
|
285
|
+
capabilities: ["reasoning", "tool_calling"],
|
|
286
|
+
tools: []
|
|
287
|
+
}
|
|
288
|
+
}.name,
|
|
289
|
+
{
|
|
290
|
+
name: "deepseek-v4-flash-260425",
|
|
291
|
+
context_window: 1024e3,
|
|
292
|
+
max_input_tokens: 1024e3,
|
|
293
|
+
max_output_tokens: 384e3,
|
|
294
|
+
supports: {
|
|
295
|
+
input: ["text"],
|
|
296
|
+
output: ["text"],
|
|
297
|
+
capabilities: ["reasoning", "tool_calling"],
|
|
298
|
+
tools: []
|
|
299
|
+
}
|
|
300
|
+
}.name,
|
|
301
|
+
{
|
|
302
|
+
name: "deepseek-v3-2-251201",
|
|
303
|
+
context_window: 128e3,
|
|
304
|
+
max_input_tokens: 128e3,
|
|
305
|
+
max_output_tokens: 32e3,
|
|
306
|
+
supports: {
|
|
307
|
+
input: ["text"],
|
|
308
|
+
output: ["text"],
|
|
309
|
+
capabilities: ["reasoning", "tool_calling"],
|
|
310
|
+
tools: []
|
|
311
|
+
}
|
|
312
|
+
}.name,
|
|
313
|
+
{
|
|
314
|
+
name: "gpt-oss-120b-250805",
|
|
315
|
+
context_window: 128e3,
|
|
316
|
+
max_input_tokens: 96e3,
|
|
317
|
+
max_output_tokens: 64e3,
|
|
318
|
+
supports: {
|
|
319
|
+
input: ["text"],
|
|
320
|
+
output: ["text"],
|
|
321
|
+
capabilities: ["reasoning"],
|
|
322
|
+
tools: []
|
|
323
|
+
}
|
|
324
|
+
}.name
|
|
325
|
+
];
|
|
326
|
+
/**
|
|
327
|
+
* Chat models that emit a `encrypted_content` blob alongside
|
|
328
|
+
* `reasoning_content` when thinking is enabled ("thinking summary" models).
|
|
329
|
+
*
|
|
330
|
+
* The blob is an opaque signature over the reasoning trace: when it is
|
|
331
|
+
* present it must be echoed back verbatim on the assistant message in the
|
|
332
|
+
* next turn. Live probing showed omitting it did *not* fail a simple tool
|
|
333
|
+
* round-trip, so adapters preserve and replay it when present but must never
|
|
334
|
+
* treat its absence as an error.
|
|
335
|
+
*/
|
|
336
|
+
var BYTEPLUS_THINKING_SUMMARY_MODELS = [
|
|
337
|
+
DOLA_SEED_2_1_TURBO.name,
|
|
338
|
+
SEED_2_0_LITE_260428.name,
|
|
339
|
+
SEED_2_0_MINI_260428.name,
|
|
340
|
+
SEED_2_0_PRO_260328.name
|
|
341
|
+
];
|
|
342
|
+
var THINKING_SUMMARY_MODEL_SET = new Set(BYTEPLUS_THINKING_SUMMARY_MODELS);
|
|
343
|
+
/**
|
|
344
|
+
* True when the model emits `encrypted_content` that should be round-tripped
|
|
345
|
+
* on subsequent turns.
|
|
346
|
+
*/
|
|
347
|
+
function emitsEncryptedContent(model) {
|
|
348
|
+
return THINKING_SUMMARY_MODEL_SET.has(model);
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Chat models that accept `response_format: {type: 'json_schema'}`.
|
|
352
|
+
*
|
|
353
|
+
* Live-probed against all 18 chat models on 2026-07-31, not docs-derived — the
|
|
354
|
+
* BytePlus capability tables are wrong here in both directions.
|
|
355
|
+
*
|
|
356
|
+
* Membership needs TWO things, because the API has both failure modes:
|
|
357
|
+
* 1. The request is accepted. Seven models (`seed-2-0-lite-260428`,
|
|
358
|
+
* `seed-2-0-mini-260428`, `seed-2-0-code-preview-260328`, both
|
|
359
|
+
* `deepseek-v4-*`, `deepseek-v3-2-251201`, `gpt-oss-120b-250805`) answer a
|
|
360
|
+
* JSON schema with 400 InvalidParameter — and reject
|
|
361
|
+
* `{type: 'json_object'}` too, so there is no JSON-mode fallback.
|
|
362
|
+
* 2. The schema is actually honoured. `glm-4-7-251222` accepts the request
|
|
363
|
+
* with 200 and then ignores the schema, answering in prose (reproduced
|
|
364
|
+
* twice by the adherence probe). A status-code-only probe wrongly reads
|
|
365
|
+
* that as support, so it is excluded.
|
|
366
|
+
*
|
|
367
|
+
* Models that fail either check need tool-shaped extraction instead.
|
|
368
|
+
*
|
|
369
|
+
* Note that the default chat model `seed-2-0-lite-260428` is one of the
|
|
370
|
+
* rejecting models: structured-output work needs `seed-2-0-lite-260228` or
|
|
371
|
+
* `dola-seed-2-1-turbo-260628`.
|
|
372
|
+
*/
|
|
373
|
+
var BYTEPLUS_STRUCTURED_OUTPUT_CHAT_MODELS = [
|
|
374
|
+
DOLA_SEED_2_1_TURBO.name,
|
|
375
|
+
SEED_2_0_PRO_260328.name,
|
|
376
|
+
SEED_2_0_LITE_260228.name,
|
|
377
|
+
SEED_2_0_MINI_260215.name,
|
|
378
|
+
SEED_1_8_251228.name,
|
|
379
|
+
SEED_1_6_250915.name,
|
|
380
|
+
SEED_1_6_250615.name,
|
|
381
|
+
SEED_1_6_FLASH_250715.name,
|
|
382
|
+
SEED_1_6_FLASH_250615.name,
|
|
383
|
+
GLM_5_2_260617.name
|
|
384
|
+
];
|
|
385
|
+
var STRUCTURED_OUTPUT_MODEL_SET = new Set(BYTEPLUS_STRUCTURED_OUTPUT_CHAT_MODELS);
|
|
386
|
+
/**
|
|
387
|
+
* True when the model supports native JSON-schema structured output.
|
|
388
|
+
*/
|
|
389
|
+
function supportsStructuredOutput(model) {
|
|
390
|
+
return STRUCTURED_OUTPUT_MODEL_SET.has(model);
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* All supported Seedance video model identifiers.
|
|
394
|
+
*/
|
|
395
|
+
var BYTEPLUS_VIDEO_MODELS = [
|
|
396
|
+
{
|
|
397
|
+
name: "dreamina-seedance-2-0-260128",
|
|
398
|
+
supports: {
|
|
399
|
+
input: [
|
|
400
|
+
"text",
|
|
401
|
+
"image",
|
|
402
|
+
"video",
|
|
403
|
+
"audio"
|
|
404
|
+
],
|
|
405
|
+
output: ["video", "audio"]
|
|
406
|
+
}
|
|
407
|
+
}.name,
|
|
408
|
+
{
|
|
409
|
+
name: "dreamina-seedance-2-0-fast-260128",
|
|
410
|
+
supports: {
|
|
411
|
+
input: [
|
|
412
|
+
"text",
|
|
413
|
+
"image",
|
|
414
|
+
"video",
|
|
415
|
+
"audio"
|
|
416
|
+
],
|
|
417
|
+
output: ["video", "audio"]
|
|
418
|
+
}
|
|
419
|
+
}.name,
|
|
420
|
+
{
|
|
421
|
+
name: "dreamina-seedance-2-0-mini-260615",
|
|
422
|
+
supports: {
|
|
423
|
+
input: [
|
|
424
|
+
"text",
|
|
425
|
+
"image",
|
|
426
|
+
"video",
|
|
427
|
+
"audio"
|
|
428
|
+
],
|
|
429
|
+
output: ["video", "audio"]
|
|
430
|
+
}
|
|
431
|
+
}.name,
|
|
432
|
+
{
|
|
433
|
+
name: "seedance-1-5-pro-251215",
|
|
434
|
+
supports: {
|
|
435
|
+
input: ["text", "image"],
|
|
436
|
+
output: ["video", "audio"]
|
|
437
|
+
}
|
|
438
|
+
}.name,
|
|
439
|
+
{
|
|
440
|
+
name: "seedance-1-0-pro-250528",
|
|
441
|
+
supports: {
|
|
442
|
+
input: ["text", "image"],
|
|
443
|
+
output: ["video"]
|
|
444
|
+
}
|
|
445
|
+
}.name,
|
|
446
|
+
{
|
|
447
|
+
name: "seedance-1-0-pro-fast-251015",
|
|
448
|
+
supports: {
|
|
449
|
+
input: ["text", "image"],
|
|
450
|
+
output: ["video"]
|
|
451
|
+
}
|
|
452
|
+
}.name
|
|
453
|
+
];
|
|
454
|
+
var VIDEO_MODEL_SET = new Set(BYTEPLUS_VIDEO_MODELS);
|
|
455
|
+
/**
|
|
456
|
+
* True when the id is one this package has probe-verified metadata for.
|
|
457
|
+
*
|
|
458
|
+
* The adapter uses this to decide whether its model-specific guards apply:
|
|
459
|
+
* see {@link BytePlusVideoModelOrString}.
|
|
460
|
+
*/
|
|
461
|
+
function isKnownBytePlusVideoModel(model) {
|
|
462
|
+
return VIDEO_MODEL_SET.has(model);
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Runtime duration table backing `availableDurations()` / `snapDuration()`.
|
|
466
|
+
*/
|
|
467
|
+
var BYTEPLUS_VIDEO_DURATIONS = {
|
|
468
|
+
"dreamina-seedance-2-0-260128": {
|
|
469
|
+
kind: "range",
|
|
470
|
+
min: 4,
|
|
471
|
+
max: 15,
|
|
472
|
+
step: 1,
|
|
473
|
+
unit: "seconds"
|
|
474
|
+
},
|
|
475
|
+
"dreamina-seedance-2-0-fast-260128": {
|
|
476
|
+
kind: "range",
|
|
477
|
+
min: 4,
|
|
478
|
+
max: 15,
|
|
479
|
+
step: 1,
|
|
480
|
+
unit: "seconds"
|
|
481
|
+
},
|
|
482
|
+
"dreamina-seedance-2-0-mini-260615": {
|
|
483
|
+
kind: "range",
|
|
484
|
+
min: 4,
|
|
485
|
+
max: 15,
|
|
486
|
+
step: 1,
|
|
487
|
+
unit: "seconds"
|
|
488
|
+
},
|
|
489
|
+
"seedance-1-5-pro-251215": {
|
|
490
|
+
kind: "range",
|
|
491
|
+
min: 4,
|
|
492
|
+
max: 12,
|
|
493
|
+
step: 1,
|
|
494
|
+
unit: "seconds"
|
|
495
|
+
},
|
|
496
|
+
"seedance-1-0-pro-250528": {
|
|
497
|
+
kind: "range",
|
|
498
|
+
min: 2,
|
|
499
|
+
max: 12,
|
|
500
|
+
step: 1,
|
|
501
|
+
unit: "seconds"
|
|
502
|
+
},
|
|
503
|
+
"seedance-1-0-pro-fast-251015": {
|
|
504
|
+
kind: "range",
|
|
505
|
+
min: 2,
|
|
506
|
+
max: 12,
|
|
507
|
+
step: 1,
|
|
508
|
+
unit: "seconds"
|
|
509
|
+
}
|
|
510
|
+
};
|
|
511
|
+
/**
|
|
512
|
+
* Duration hint for a model this package has no table for.
|
|
513
|
+
*
|
|
514
|
+
* Spans every range Seedance has shipped so far (2s on the 1.0 models through
|
|
515
|
+
* 15s on the 2.0 family) so `availableDurations()` can still drive a UI. It is
|
|
516
|
+
* a hint, not a contract: the adapter does **not** snap an unknown model's
|
|
517
|
+
* duration against it, because clamping a future model's legitimate 20-second
|
|
518
|
+
* request down to 15 would corrupt the request rather than protect it.
|
|
519
|
+
*/
|
|
520
|
+
var BYTEPLUS_VIDEO_FALLBACK_DURATIONS = {
|
|
521
|
+
kind: "range",
|
|
522
|
+
min: 2,
|
|
523
|
+
max: 15,
|
|
524
|
+
step: 1,
|
|
525
|
+
unit: "seconds"
|
|
526
|
+
};
|
|
527
|
+
/**
|
|
528
|
+
* Look up the duration options for a Seedance video model, falling back to
|
|
529
|
+
* {@link BYTEPLUS_VIDEO_FALLBACK_DURATIONS} for an id this package does not
|
|
530
|
+
* know.
|
|
531
|
+
*/
|
|
532
|
+
function getBytePlusVideoDurationOptions(model) {
|
|
533
|
+
return isKnownBytePlusVideoModel(model) ? BYTEPLUS_VIDEO_DURATIONS[model] : BYTEPLUS_VIDEO_FALLBACK_DURATIONS;
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* All supported Seedream image model identifiers.
|
|
537
|
+
*/
|
|
538
|
+
var BYTEPLUS_IMAGE_MODELS = [
|
|
539
|
+
{
|
|
540
|
+
name: "dola-seedream-5-0-pro-260628",
|
|
541
|
+
supports: {
|
|
542
|
+
input: ["text", "image"],
|
|
543
|
+
output: ["image"]
|
|
544
|
+
}
|
|
545
|
+
}.name,
|
|
546
|
+
{
|
|
547
|
+
name: "seedream-5-0-260128",
|
|
548
|
+
supports: {
|
|
549
|
+
input: ["text", "image"],
|
|
550
|
+
output: ["image"]
|
|
551
|
+
}
|
|
552
|
+
}.name,
|
|
553
|
+
{
|
|
554
|
+
name: "seedream-5-0-lite-260128",
|
|
555
|
+
supports: {
|
|
556
|
+
input: ["text", "image"],
|
|
557
|
+
output: ["image"]
|
|
558
|
+
}
|
|
559
|
+
}.name,
|
|
560
|
+
{
|
|
561
|
+
name: "seedream-4-5-251128",
|
|
562
|
+
supports: {
|
|
563
|
+
input: ["text", "image"],
|
|
564
|
+
output: ["image"]
|
|
565
|
+
}
|
|
566
|
+
}.name,
|
|
567
|
+
{
|
|
568
|
+
name: "seedream-4-0-250828",
|
|
569
|
+
supports: {
|
|
570
|
+
input: ["text", "image"],
|
|
571
|
+
output: ["image"]
|
|
572
|
+
}
|
|
573
|
+
}.name
|
|
574
|
+
];
|
|
575
|
+
/**
|
|
576
|
+
* Maximum number of reference images accepted per editing request.
|
|
577
|
+
* Seedream 5.0 Pro caps at 10 references; the other editing-capable models
|
|
578
|
+
* accept up to 14.
|
|
579
|
+
*
|
|
580
|
+
* Docs-derived, not live-probed. The 14 for `seedream-5-0-260128` is weaker
|
|
581
|
+
* still — the docs never state a cap for that model, so it is inferred from
|
|
582
|
+
* the rest of the family.
|
|
583
|
+
*/
|
|
584
|
+
var BYTEPLUS_IMAGE_MAX_REFERENCE_IMAGES = {
|
|
585
|
+
"dola-seedream-5-0-pro-260628": 10,
|
|
586
|
+
"seedream-5-0-260128": 14,
|
|
587
|
+
"seedream-5-0-lite-260128": 14,
|
|
588
|
+
"seedream-4-5-251128": 14,
|
|
589
|
+
"seedream-4-0-250828": 14
|
|
590
|
+
};
|
|
591
|
+
var SEED_AUDIO_1_0 = {
|
|
592
|
+
name: "seed-audio-1.0",
|
|
593
|
+
supports: {
|
|
594
|
+
input: ["text", "audio"],
|
|
595
|
+
output: ["audio"]
|
|
596
|
+
}
|
|
597
|
+
};
|
|
598
|
+
var SEED_ASR = {
|
|
599
|
+
name: "seed-asr",
|
|
600
|
+
supports: {
|
|
601
|
+
input: ["audio"],
|
|
602
|
+
output: ["text"]
|
|
603
|
+
}
|
|
604
|
+
};
|
|
605
|
+
/**
|
|
606
|
+
* All supported Seed Speech TTS model identifiers.
|
|
607
|
+
*
|
|
608
|
+
* Note: TTS runs on `voice.ap-southeast-1.bytepluses.com` with an
|
|
609
|
+
* `X-Api-Key` header and a *different* API key from Ark.
|
|
610
|
+
*/
|
|
611
|
+
var BYTEPLUS_TTS_MODELS = [SEED_AUDIO_1_0.name];
|
|
612
|
+
/**
|
|
613
|
+
* All supported Seed Speech transcription model identifiers.
|
|
614
|
+
*/
|
|
615
|
+
var BYTEPLUS_TRANSCRIPTION_MODELS = [SEED_ASR.name];
|
|
616
|
+
//#endregion
|
|
617
|
+
export { BYTEPLUS_CHAT_MODELS, BYTEPLUS_IMAGE_MAX_REFERENCE_IMAGES, BYTEPLUS_IMAGE_MODELS, BYTEPLUS_STRUCTURED_OUTPUT_CHAT_MODELS, BYTEPLUS_THINKING_SUMMARY_MODELS, BYTEPLUS_TRANSCRIPTION_MODELS, BYTEPLUS_TTS_MODELS, BYTEPLUS_VIDEO_DURATIONS, BYTEPLUS_VIDEO_FALLBACK_DURATIONS, BYTEPLUS_VIDEO_MODELS, emitsEncryptedContent, getBytePlusVideoDurationOptions, isKnownBytePlusVideoModel, supportsStructuredOutput };
|
|
618
|
+
|
|
619
|
+
//# sourceMappingURL=model-meta.js.map
|