@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,594 @@
|
|
|
1
|
+
import { DurationOptions } from '@tanstack/ai/adapters';
|
|
2
|
+
import { BytePlusTextProviderOptions } from './text/text-provider-options.js';
|
|
3
|
+
/**
|
|
4
|
+
* BytePlus exposes no server-side provider tools (no hosted web search, code
|
|
5
|
+
* interpreter, …) on the international Ark endpoint, so every chat model
|
|
6
|
+
* advertises an empty tool set. Typing it as `never` makes passing another
|
|
7
|
+
* provider's `ProviderTool` to a BytePlus adapter a compile-time error.
|
|
8
|
+
*/
|
|
9
|
+
export type BytePlusProviderToolKind = never;
|
|
10
|
+
declare const DOLA_SEED_2_1_TURBO: {
|
|
11
|
+
readonly name: "dola-seed-2-1-turbo-260628";
|
|
12
|
+
readonly context_window: 256000;
|
|
13
|
+
readonly max_input_tokens: 256000;
|
|
14
|
+
readonly max_output_tokens: 256000;
|
|
15
|
+
readonly supports: {
|
|
16
|
+
readonly input: readonly ["text", "image", "video"];
|
|
17
|
+
readonly output: readonly ["text"];
|
|
18
|
+
readonly capabilities: readonly ["reasoning", "tool_calling", "structured_outputs"];
|
|
19
|
+
readonly tools: readonly [];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
declare const SEED_2_0_LITE_260428: {
|
|
23
|
+
readonly name: "seed-2-0-lite-260428";
|
|
24
|
+
readonly context_window: 256000;
|
|
25
|
+
readonly max_input_tokens: 256000;
|
|
26
|
+
readonly max_output_tokens: 128000;
|
|
27
|
+
readonly supports: {
|
|
28
|
+
readonly input: readonly ["text", "image", "video", "audio"];
|
|
29
|
+
readonly output: readonly ["text"];
|
|
30
|
+
readonly capabilities: readonly ["reasoning", "tool_calling"];
|
|
31
|
+
readonly tools: readonly [];
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
declare const SEED_2_0_MINI_260428: {
|
|
35
|
+
readonly name: "seed-2-0-mini-260428";
|
|
36
|
+
readonly context_window: 256000;
|
|
37
|
+
readonly max_input_tokens: 256000;
|
|
38
|
+
readonly max_output_tokens: 128000;
|
|
39
|
+
readonly supports: {
|
|
40
|
+
readonly input: readonly ["text", "image", "video", "audio"];
|
|
41
|
+
readonly output: readonly ["text"];
|
|
42
|
+
readonly capabilities: readonly ["reasoning", "tool_calling"];
|
|
43
|
+
readonly tools: readonly [];
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
declare const SEED_2_0_PRO_260328: {
|
|
47
|
+
readonly name: "seed-2-0-pro-260328";
|
|
48
|
+
readonly context_window: 256000;
|
|
49
|
+
readonly max_input_tokens: 224000;
|
|
50
|
+
readonly max_output_tokens: 128000;
|
|
51
|
+
readonly supports: {
|
|
52
|
+
readonly input: readonly ["text", "image", "video"];
|
|
53
|
+
readonly output: readonly ["text"];
|
|
54
|
+
readonly capabilities: readonly ["reasoning", "tool_calling", "structured_outputs"];
|
|
55
|
+
readonly tools: readonly [];
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
declare const SEED_2_0_LITE_260228: {
|
|
59
|
+
readonly name: "seed-2-0-lite-260228";
|
|
60
|
+
readonly context_window: 256000;
|
|
61
|
+
readonly max_input_tokens: 224000;
|
|
62
|
+
readonly max_output_tokens: 128000;
|
|
63
|
+
readonly supports: {
|
|
64
|
+
readonly input: readonly ["text", "image", "video"];
|
|
65
|
+
readonly output: readonly ["text"];
|
|
66
|
+
readonly capabilities: readonly ["reasoning", "tool_calling", "structured_outputs"];
|
|
67
|
+
readonly tools: readonly [];
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
declare const SEED_2_0_MINI_260215: {
|
|
71
|
+
readonly name: "seed-2-0-mini-260215";
|
|
72
|
+
readonly context_window: 256000;
|
|
73
|
+
readonly max_input_tokens: 224000;
|
|
74
|
+
readonly max_output_tokens: 128000;
|
|
75
|
+
readonly supports: {
|
|
76
|
+
readonly input: readonly ["text", "image", "video"];
|
|
77
|
+
readonly output: readonly ["text"];
|
|
78
|
+
readonly capabilities: readonly ["reasoning", "tool_calling", "structured_outputs"];
|
|
79
|
+
readonly tools: readonly [];
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
declare const SEED_2_0_CODE_PREVIEW_260328: {
|
|
83
|
+
readonly name: "seed-2-0-code-preview-260328";
|
|
84
|
+
readonly context_window: 256000;
|
|
85
|
+
readonly max_input_tokens: 224000;
|
|
86
|
+
readonly max_output_tokens: 128000;
|
|
87
|
+
readonly supports: {
|
|
88
|
+
readonly input: readonly ["text", "image", "video"];
|
|
89
|
+
readonly output: readonly ["text"];
|
|
90
|
+
readonly capabilities: readonly ["reasoning", "tool_calling"];
|
|
91
|
+
readonly tools: readonly [];
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
declare const SEED_1_8_251228: {
|
|
95
|
+
readonly name: "seed-1-8-251228";
|
|
96
|
+
readonly context_window: 256000;
|
|
97
|
+
readonly max_input_tokens: 224000;
|
|
98
|
+
readonly max_output_tokens: 64000;
|
|
99
|
+
readonly supports: {
|
|
100
|
+
readonly input: readonly ["text", "image", "video"];
|
|
101
|
+
readonly output: readonly ["text"];
|
|
102
|
+
readonly capabilities: readonly ["reasoning", "tool_calling", "structured_outputs"];
|
|
103
|
+
readonly tools: readonly [];
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
declare const SEED_1_6_250915: {
|
|
107
|
+
readonly name: "seed-1-6-250915";
|
|
108
|
+
readonly context_window: 256000;
|
|
109
|
+
readonly max_input_tokens: 224000;
|
|
110
|
+
readonly max_output_tokens: 32000;
|
|
111
|
+
readonly supports: {
|
|
112
|
+
readonly input: readonly ["text", "image", "video"];
|
|
113
|
+
readonly output: readonly ["text"];
|
|
114
|
+
readonly capabilities: readonly ["reasoning", "tool_calling", "structured_outputs"];
|
|
115
|
+
readonly tools: readonly [];
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
declare const SEED_1_6_250615: {
|
|
119
|
+
readonly name: "seed-1-6-250615";
|
|
120
|
+
readonly context_window: 256000;
|
|
121
|
+
readonly max_input_tokens: 224000;
|
|
122
|
+
readonly max_output_tokens: 32000;
|
|
123
|
+
readonly supports: {
|
|
124
|
+
readonly input: readonly ["text", "image", "video"];
|
|
125
|
+
readonly output: readonly ["text"];
|
|
126
|
+
readonly capabilities: readonly ["reasoning", "tool_calling", "structured_outputs"];
|
|
127
|
+
readonly tools: readonly [];
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
declare const SEED_1_6_FLASH_250715: {
|
|
131
|
+
readonly name: "seed-1-6-flash-250715";
|
|
132
|
+
readonly context_window: 256000;
|
|
133
|
+
readonly max_input_tokens: 224000;
|
|
134
|
+
readonly max_output_tokens: 32000;
|
|
135
|
+
readonly supports: {
|
|
136
|
+
readonly input: readonly ["text", "image", "video"];
|
|
137
|
+
readonly output: readonly ["text"];
|
|
138
|
+
readonly capabilities: readonly ["reasoning", "tool_calling", "structured_outputs"];
|
|
139
|
+
readonly tools: readonly [];
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
declare const SEED_1_6_FLASH_250615: {
|
|
143
|
+
readonly name: "seed-1-6-flash-250615";
|
|
144
|
+
readonly context_window: 256000;
|
|
145
|
+
readonly max_input_tokens: 224000;
|
|
146
|
+
readonly max_output_tokens: 32000;
|
|
147
|
+
readonly supports: {
|
|
148
|
+
readonly input: readonly ["text", "image", "video"];
|
|
149
|
+
readonly output: readonly ["text"];
|
|
150
|
+
readonly capabilities: readonly ["reasoning", "tool_calling", "structured_outputs"];
|
|
151
|
+
readonly tools: readonly [];
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
declare const GLM_5_2_260617: {
|
|
155
|
+
readonly name: "glm-5-2-260617";
|
|
156
|
+
readonly context_window: 1024000;
|
|
157
|
+
readonly max_input_tokens: 1024000;
|
|
158
|
+
readonly max_output_tokens: 128000;
|
|
159
|
+
readonly supports: {
|
|
160
|
+
readonly input: readonly ["text"];
|
|
161
|
+
readonly output: readonly ["text"];
|
|
162
|
+
readonly capabilities: readonly ["reasoning", "tool_calling", "structured_outputs"];
|
|
163
|
+
readonly tools: readonly [];
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
declare const GLM_4_7_251222: {
|
|
167
|
+
readonly name: "glm-4-7-251222";
|
|
168
|
+
readonly context_window: 256000;
|
|
169
|
+
readonly max_input_tokens: 224000;
|
|
170
|
+
readonly max_output_tokens: 128000;
|
|
171
|
+
readonly supports: {
|
|
172
|
+
readonly input: readonly ["text"];
|
|
173
|
+
readonly output: readonly ["text"];
|
|
174
|
+
readonly capabilities: readonly ["reasoning", "tool_calling"];
|
|
175
|
+
readonly tools: readonly [];
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
declare const DEEPSEEK_V4_PRO_260425: {
|
|
179
|
+
readonly name: "deepseek-v4-pro-260425";
|
|
180
|
+
readonly context_window: 1024000;
|
|
181
|
+
readonly max_input_tokens: 1024000;
|
|
182
|
+
readonly max_output_tokens: 384000;
|
|
183
|
+
readonly supports: {
|
|
184
|
+
readonly input: readonly ["text"];
|
|
185
|
+
readonly output: readonly ["text"];
|
|
186
|
+
readonly capabilities: readonly ["reasoning", "tool_calling"];
|
|
187
|
+
readonly tools: readonly [];
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
declare const DEEPSEEK_V4_FLASH_260425: {
|
|
191
|
+
readonly name: "deepseek-v4-flash-260425";
|
|
192
|
+
readonly context_window: 1024000;
|
|
193
|
+
readonly max_input_tokens: 1024000;
|
|
194
|
+
readonly max_output_tokens: 384000;
|
|
195
|
+
readonly supports: {
|
|
196
|
+
readonly input: readonly ["text"];
|
|
197
|
+
readonly output: readonly ["text"];
|
|
198
|
+
readonly capabilities: readonly ["reasoning", "tool_calling"];
|
|
199
|
+
readonly tools: readonly [];
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
declare const DEEPSEEK_V3_2_251201: {
|
|
203
|
+
readonly name: "deepseek-v3-2-251201";
|
|
204
|
+
readonly context_window: 128000;
|
|
205
|
+
readonly max_input_tokens: 128000;
|
|
206
|
+
readonly max_output_tokens: 32000;
|
|
207
|
+
readonly supports: {
|
|
208
|
+
readonly input: readonly ["text"];
|
|
209
|
+
readonly output: readonly ["text"];
|
|
210
|
+
readonly capabilities: readonly ["reasoning", "tool_calling"];
|
|
211
|
+
readonly tools: readonly [];
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
declare const GPT_OSS_120B_250805: {
|
|
215
|
+
readonly name: "gpt-oss-120b-250805";
|
|
216
|
+
readonly context_window: 128000;
|
|
217
|
+
readonly max_input_tokens: 96000;
|
|
218
|
+
readonly max_output_tokens: 64000;
|
|
219
|
+
readonly supports: {
|
|
220
|
+
readonly input: readonly ["text"];
|
|
221
|
+
readonly output: readonly ["text"];
|
|
222
|
+
readonly capabilities: readonly ["reasoning"];
|
|
223
|
+
readonly tools: readonly [];
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
/**
|
|
227
|
+
* All supported BytePlus chat model identifiers.
|
|
228
|
+
*/
|
|
229
|
+
export declare const BYTEPLUS_CHAT_MODELS: readonly ["dola-seed-2-1-turbo-260628", "seed-2-0-lite-260428", "seed-2-0-mini-260428", "seed-2-0-pro-260328", "seed-2-0-lite-260228", "seed-2-0-mini-260215", "seed-2-0-code-preview-260328", "seed-1-8-251228", "seed-1-6-250915", "seed-1-6-250615", "seed-1-6-flash-250715", "seed-1-6-flash-250615", "glm-5-2-260617", "glm-4-7-251222", "deepseek-v4-pro-260425", "deepseek-v4-flash-260425", "deepseek-v3-2-251201", "gpt-oss-120b-250805"];
|
|
230
|
+
/**
|
|
231
|
+
* Union of all supported BytePlus chat model names.
|
|
232
|
+
*/
|
|
233
|
+
export type BytePlusChatModel = (typeof BYTEPLUS_CHAT_MODELS)[number];
|
|
234
|
+
/**
|
|
235
|
+
* Chat models that emit a `encrypted_content` blob alongside
|
|
236
|
+
* `reasoning_content` when thinking is enabled ("thinking summary" models).
|
|
237
|
+
*
|
|
238
|
+
* The blob is an opaque signature over the reasoning trace: when it is
|
|
239
|
+
* present it must be echoed back verbatim on the assistant message in the
|
|
240
|
+
* next turn. Live probing showed omitting it did *not* fail a simple tool
|
|
241
|
+
* round-trip, so adapters preserve and replay it when present but must never
|
|
242
|
+
* treat its absence as an error.
|
|
243
|
+
*/
|
|
244
|
+
export declare const BYTEPLUS_THINKING_SUMMARY_MODELS: readonly ["dola-seed-2-1-turbo-260628", "seed-2-0-lite-260428", "seed-2-0-mini-260428", "seed-2-0-pro-260328"];
|
|
245
|
+
/**
|
|
246
|
+
* Union of chat models that emit `encrypted_content`.
|
|
247
|
+
*/
|
|
248
|
+
export type BytePlusThinkingSummaryModel = (typeof BYTEPLUS_THINKING_SUMMARY_MODELS)[number];
|
|
249
|
+
/**
|
|
250
|
+
* True when the model emits `encrypted_content` that should be round-tripped
|
|
251
|
+
* on subsequent turns.
|
|
252
|
+
*/
|
|
253
|
+
export declare function emitsEncryptedContent(model: string): boolean;
|
|
254
|
+
/**
|
|
255
|
+
* Chat models that accept `response_format: {type: 'json_schema'}`.
|
|
256
|
+
*
|
|
257
|
+
* Live-probed against all 18 chat models on 2026-07-31, not docs-derived — the
|
|
258
|
+
* BytePlus capability tables are wrong here in both directions.
|
|
259
|
+
*
|
|
260
|
+
* Membership needs TWO things, because the API has both failure modes:
|
|
261
|
+
* 1. The request is accepted. Seven models (`seed-2-0-lite-260428`,
|
|
262
|
+
* `seed-2-0-mini-260428`, `seed-2-0-code-preview-260328`, both
|
|
263
|
+
* `deepseek-v4-*`, `deepseek-v3-2-251201`, `gpt-oss-120b-250805`) answer a
|
|
264
|
+
* JSON schema with 400 InvalidParameter — and reject
|
|
265
|
+
* `{type: 'json_object'}` too, so there is no JSON-mode fallback.
|
|
266
|
+
* 2. The schema is actually honoured. `glm-4-7-251222` accepts the request
|
|
267
|
+
* with 200 and then ignores the schema, answering in prose (reproduced
|
|
268
|
+
* twice by the adherence probe). A status-code-only probe wrongly reads
|
|
269
|
+
* that as support, so it is excluded.
|
|
270
|
+
*
|
|
271
|
+
* Models that fail either check need tool-shaped extraction instead.
|
|
272
|
+
*
|
|
273
|
+
* Note that the default chat model `seed-2-0-lite-260428` is one of the
|
|
274
|
+
* rejecting models: structured-output work needs `seed-2-0-lite-260228` or
|
|
275
|
+
* `dola-seed-2-1-turbo-260628`.
|
|
276
|
+
*/
|
|
277
|
+
export declare const BYTEPLUS_STRUCTURED_OUTPUT_CHAT_MODELS: readonly ["dola-seed-2-1-turbo-260628", "seed-2-0-pro-260328", "seed-2-0-lite-260228", "seed-2-0-mini-260215", "seed-1-8-251228", "seed-1-6-250915", "seed-1-6-250615", "seed-1-6-flash-250715", "seed-1-6-flash-250615", "glm-5-2-260617"];
|
|
278
|
+
/**
|
|
279
|
+
* True when the model supports native JSON-schema structured output.
|
|
280
|
+
*/
|
|
281
|
+
export declare function supportsStructuredOutput(model: string): boolean;
|
|
282
|
+
/**
|
|
283
|
+
* Type-only map from chat model name to whether it supports native
|
|
284
|
+
* JSON-schema structured output.
|
|
285
|
+
*/
|
|
286
|
+
export type BytePlusChatModelStructuredOutputByName = {
|
|
287
|
+
[K in BytePlusChatModel]: K extends BytePlusStructuredOutputChatModel ? true : false;
|
|
288
|
+
};
|
|
289
|
+
/**
|
|
290
|
+
* Union of chat models supporting native JSON-schema structured output.
|
|
291
|
+
*/
|
|
292
|
+
export type BytePlusStructuredOutputChatModel = (typeof BYTEPLUS_STRUCTURED_OUTPUT_CHAT_MODELS)[number];
|
|
293
|
+
/**
|
|
294
|
+
* Type-only map from chat model name to its supported input modalities.
|
|
295
|
+
* Used for type inference when constructing multimodal messages.
|
|
296
|
+
*/
|
|
297
|
+
export type BytePlusModelInputModalitiesByName = {
|
|
298
|
+
[DOLA_SEED_2_1_TURBO.name]: typeof DOLA_SEED_2_1_TURBO.supports.input;
|
|
299
|
+
[SEED_2_0_LITE_260428.name]: typeof SEED_2_0_LITE_260428.supports.input;
|
|
300
|
+
[SEED_2_0_MINI_260428.name]: typeof SEED_2_0_MINI_260428.supports.input;
|
|
301
|
+
[SEED_2_0_PRO_260328.name]: typeof SEED_2_0_PRO_260328.supports.input;
|
|
302
|
+
[SEED_2_0_LITE_260228.name]: typeof SEED_2_0_LITE_260228.supports.input;
|
|
303
|
+
[SEED_2_0_MINI_260215.name]: typeof SEED_2_0_MINI_260215.supports.input;
|
|
304
|
+
[SEED_2_0_CODE_PREVIEW_260328.name]: typeof SEED_2_0_CODE_PREVIEW_260328.supports.input;
|
|
305
|
+
[SEED_1_8_251228.name]: typeof SEED_1_8_251228.supports.input;
|
|
306
|
+
[SEED_1_6_250915.name]: typeof SEED_1_6_250915.supports.input;
|
|
307
|
+
[SEED_1_6_250615.name]: typeof SEED_1_6_250615.supports.input;
|
|
308
|
+
[SEED_1_6_FLASH_250715.name]: typeof SEED_1_6_FLASH_250715.supports.input;
|
|
309
|
+
[SEED_1_6_FLASH_250615.name]: typeof SEED_1_6_FLASH_250615.supports.input;
|
|
310
|
+
[GLM_5_2_260617.name]: typeof GLM_5_2_260617.supports.input;
|
|
311
|
+
[GLM_4_7_251222.name]: typeof GLM_4_7_251222.supports.input;
|
|
312
|
+
[DEEPSEEK_V4_PRO_260425.name]: typeof DEEPSEEK_V4_PRO_260425.supports.input;
|
|
313
|
+
[DEEPSEEK_V4_FLASH_260425.name]: typeof DEEPSEEK_V4_FLASH_260425.supports.input;
|
|
314
|
+
[DEEPSEEK_V3_2_251201.name]: typeof DEEPSEEK_V3_2_251201.supports.input;
|
|
315
|
+
[GPT_OSS_120B_250805.name]: typeof GPT_OSS_120B_250805.supports.input;
|
|
316
|
+
};
|
|
317
|
+
/**
|
|
318
|
+
* Type-only map from chat model name to its supported provider tools.
|
|
319
|
+
* BytePlus exposes no provider-tool factories, so every model gets an empty
|
|
320
|
+
* tuple — passing another provider's tool is then a compile-time error.
|
|
321
|
+
*/
|
|
322
|
+
export type BytePlusChatModelToolCapabilitiesByName = {
|
|
323
|
+
[K in BytePlusChatModel]: ReadonlyArray<BytePlusProviderToolKind>;
|
|
324
|
+
};
|
|
325
|
+
/**
|
|
326
|
+
* Type-only map from chat model name to its provider options type.
|
|
327
|
+
*/
|
|
328
|
+
export type BytePlusChatModelProviderOptionsByName = {
|
|
329
|
+
[K in BytePlusChatModel]: BytePlusTextProviderOptions;
|
|
330
|
+
};
|
|
331
|
+
/**
|
|
332
|
+
* Output aspect ratios accepted by the Seedance task API. `adaptive` is only
|
|
333
|
+
* meaningful for image-to-video, where the ratio follows the input frame.
|
|
334
|
+
*/
|
|
335
|
+
export type BytePlusVideoRatio = '16:9' | '9:16' | '4:3' | '3:4' | '1:1' | '21:9' | 'adaptive';
|
|
336
|
+
/**
|
|
337
|
+
* Resolution tiers accepted by the Seedance task API.
|
|
338
|
+
*
|
|
339
|
+
* All four are probe-verified per model (2026-07-31). Two findings contradict
|
|
340
|
+
* the BytePlus prose docs: there is **no 2K tier on any Seedance model** —
|
|
341
|
+
* `2k`/`2K` is rejected everywhere, including on the 2.0 flagship documented
|
|
342
|
+
* as reaching 4K — and `4k` exists only on `dreamina-seedance-2-0-260128`.
|
|
343
|
+
*
|
|
344
|
+
* The API matches this field case-insensitively (`4K`, `4k` and `1080P` are
|
|
345
|
+
* all accepted), so this package standardizes on the lowercase spelling.
|
|
346
|
+
*/
|
|
347
|
+
export type BytePlusVideoResolution = '480p' | '720p' | '1080p' | '4k';
|
|
348
|
+
/**
|
|
349
|
+
* Generic `size` template for Seedance models: either a bare aspect ratio
|
|
350
|
+
* ("16:9") or `ratio_resolution` ("16:9_720p"). The Seedance API takes the
|
|
351
|
+
* two as separate `ratio` / `resolution` fields; the adapter splits this
|
|
352
|
+
* template back apart.
|
|
353
|
+
*/
|
|
354
|
+
export type BytePlusVideoSize<TResolution extends BytePlusVideoResolution = BytePlusVideoResolution> = BytePlusVideoRatio | `${BytePlusVideoRatio}_${TResolution}`;
|
|
355
|
+
declare const DREAMINA_SEEDANCE_2_0: {
|
|
356
|
+
readonly name: "dreamina-seedance-2-0-260128";
|
|
357
|
+
readonly supports: {
|
|
358
|
+
readonly input: readonly ["text", "image", "video", "audio"];
|
|
359
|
+
readonly output: readonly ["video", "audio"];
|
|
360
|
+
};
|
|
361
|
+
};
|
|
362
|
+
declare const DREAMINA_SEEDANCE_2_0_FAST: {
|
|
363
|
+
readonly name: "dreamina-seedance-2-0-fast-260128";
|
|
364
|
+
readonly supports: {
|
|
365
|
+
readonly input: readonly ["text", "image", "video", "audio"];
|
|
366
|
+
readonly output: readonly ["video", "audio"];
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
declare const DREAMINA_SEEDANCE_2_0_MINI: {
|
|
370
|
+
readonly name: "dreamina-seedance-2-0-mini-260615";
|
|
371
|
+
readonly supports: {
|
|
372
|
+
readonly input: readonly ["text", "image", "video", "audio"];
|
|
373
|
+
readonly output: readonly ["video", "audio"];
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
declare const SEEDANCE_1_5_PRO: {
|
|
377
|
+
readonly name: "seedance-1-5-pro-251215";
|
|
378
|
+
readonly supports: {
|
|
379
|
+
readonly input: readonly ["text", "image"];
|
|
380
|
+
readonly output: readonly ["video", "audio"];
|
|
381
|
+
};
|
|
382
|
+
};
|
|
383
|
+
declare const SEEDANCE_1_0_PRO: {
|
|
384
|
+
readonly name: "seedance-1-0-pro-250528";
|
|
385
|
+
readonly supports: {
|
|
386
|
+
readonly input: readonly ["text", "image"];
|
|
387
|
+
readonly output: readonly ["video"];
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
declare const SEEDANCE_1_0_PRO_FAST: {
|
|
391
|
+
readonly name: "seedance-1-0-pro-fast-251015";
|
|
392
|
+
readonly supports: {
|
|
393
|
+
readonly input: readonly ["text", "image"];
|
|
394
|
+
readonly output: readonly ["video"];
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
/**
|
|
398
|
+
* All supported Seedance video model identifiers.
|
|
399
|
+
*/
|
|
400
|
+
export declare const BYTEPLUS_VIDEO_MODELS: readonly ["dreamina-seedance-2-0-260128", "dreamina-seedance-2-0-fast-260128", "dreamina-seedance-2-0-mini-260615", "seedance-1-5-pro-251215", "seedance-1-0-pro-250528", "seedance-1-0-pro-fast-251015"];
|
|
401
|
+
/**
|
|
402
|
+
* Union of all supported Seedance video model names.
|
|
403
|
+
*/
|
|
404
|
+
export type BytePlusVideoModel = (typeof BYTEPLUS_VIDEO_MODELS)[number];
|
|
405
|
+
/**
|
|
406
|
+
* Type-only map from video model name to the non-text prompt modalities it
|
|
407
|
+
* accepts. The Seedance 2.0 family takes multimodal references (start/end
|
|
408
|
+
* frames, reference images, reference video and audio); the 1.x models take
|
|
409
|
+
* start/end frames only.
|
|
410
|
+
*/
|
|
411
|
+
export type BytePlusVideoModelInputModalitiesByName = {
|
|
412
|
+
[DREAMINA_SEEDANCE_2_0.name]: readonly ['image', 'video', 'audio'];
|
|
413
|
+
[DREAMINA_SEEDANCE_2_0_FAST.name]: readonly ['image', 'video', 'audio'];
|
|
414
|
+
[DREAMINA_SEEDANCE_2_0_MINI.name]: readonly ['image', 'video', 'audio'];
|
|
415
|
+
[SEEDANCE_1_5_PRO.name]: readonly ['image'];
|
|
416
|
+
[SEEDANCE_1_0_PRO.name]: readonly ['image'];
|
|
417
|
+
[SEEDANCE_1_0_PRO_FAST.name]: readonly ['image'];
|
|
418
|
+
};
|
|
419
|
+
/**
|
|
420
|
+
* Type-only map from video model name to the resolutions it accepts.
|
|
421
|
+
*
|
|
422
|
+
* Probe-verified per model on 2026-07-31. Note `seedance-1-0-pro-fast-251015`
|
|
423
|
+
* does accept `1080p`, despite the BytePlus docs listing it as 480p/720p.
|
|
424
|
+
*/
|
|
425
|
+
export type BytePlusVideoModelResolutionByName = {
|
|
426
|
+
[DREAMINA_SEEDANCE_2_0.name]: '480p' | '720p' | '1080p' | '4k';
|
|
427
|
+
[DREAMINA_SEEDANCE_2_0_FAST.name]: '480p' | '720p';
|
|
428
|
+
[DREAMINA_SEEDANCE_2_0_MINI.name]: '480p' | '720p';
|
|
429
|
+
[SEEDANCE_1_5_PRO.name]: '480p' | '720p' | '1080p';
|
|
430
|
+
[SEEDANCE_1_0_PRO.name]: '480p' | '720p' | '1080p';
|
|
431
|
+
[SEEDANCE_1_0_PRO_FAST.name]: '480p' | '720p' | '1080p';
|
|
432
|
+
};
|
|
433
|
+
/**
|
|
434
|
+
* Type-only map from video model name to its accepted `size` strings.
|
|
435
|
+
*/
|
|
436
|
+
export type BytePlusVideoModelSizeByName = {
|
|
437
|
+
[K in BytePlusVideoModel]: BytePlusVideoSize<BytePlusVideoModelResolutionByName[K]>;
|
|
438
|
+
};
|
|
439
|
+
/**
|
|
440
|
+
* A Seedance model id: one this package knows, or any other string.
|
|
441
|
+
*
|
|
442
|
+
* The open half is a deliberate escape hatch for models BytePlus ships between
|
|
443
|
+
* releases of this package. **Seedance 2.5 is the live example.** Its real id
|
|
444
|
+
* is `dreamina-seedance-2-5-260628` — note the June date suffix, which is why
|
|
445
|
+
* guessing ids around its 2026-07-31 announcement never landed. It is absent
|
|
446
|
+
* from the table below because its capability cells are unverified, not
|
|
447
|
+
* because it is unreachable: probing it returns 404 `ModelNotOpen` ("your
|
|
448
|
+
* account has not activated the model"), so no capability question can be
|
|
449
|
+
* answered until someone enables it in the Ark Console. Passing it through
|
|
450
|
+
* the escape hatch works today for an account that has.
|
|
451
|
+
*
|
|
452
|
+
* Adding a model here *narrows* it — the adapter's guards switch on and reject
|
|
453
|
+
* against this file's tables. For a model whose real limits are unknown that
|
|
454
|
+
* is strictly worse than the open path, which lets Ark judge. So an id lands
|
|
455
|
+
* here only once probed.
|
|
456
|
+
*
|
|
457
|
+
* Discovering ids: `GET /models` on the Ark data plane enumerates the catalog
|
|
458
|
+
* (id, `task_type`, `modalities`, `status`) and is how 2.5 was found. It is
|
|
459
|
+
* not exhaustive — `seedream-5-0-lite-260128` answers requests but is missing
|
|
460
|
+
* from the listing — so absence there is not evidence of absence. The ModelArk
|
|
461
|
+
* release notes (https://docs.byteplus.com/en/docs/ModelArk/1159178) are the
|
|
462
|
+
* other watch surface.
|
|
463
|
+
*
|
|
464
|
+
* To probe an id, POST `/contents/generations/tasks` with only
|
|
465
|
+
* `{"model": "<id>"}`. Three outcomes, all live-verified:
|
|
466
|
+
* - 400 `MissingParameter` (about `content`) — live and usable.
|
|
467
|
+
* - 404 `ModelNotOpen` — real, but not activated on this account.
|
|
468
|
+
* - 404 `InvalidEndpointOrModel.NotFound` — no such model.
|
|
469
|
+
*
|
|
470
|
+
* Unknown ids trade compile-time narrowing for reach: the full size surface is
|
|
471
|
+
* accepted, provider options are ungated, and the adapter's model-specific
|
|
472
|
+
* runtime guards stand down so a new model's legitimate request reaches Ark.
|
|
473
|
+
* Known ids keep their probe-verified narrowing.
|
|
474
|
+
*/
|
|
475
|
+
export type BytePlusVideoModelOrString = BytePlusVideoModel | (string & {});
|
|
476
|
+
/**
|
|
477
|
+
* Resolve the `size` type for a video model: the model's probe-verified
|
|
478
|
+
* template union when known, otherwise the full template surface plus any
|
|
479
|
+
* string (a future model may bring ratios or resolution tiers that do not
|
|
480
|
+
* exist today).
|
|
481
|
+
*/
|
|
482
|
+
export type ResolveBytePlusVideoSize<TModel extends string> = TModel extends BytePlusVideoModel ? BytePlusVideoModelSizeByName[TModel] : BytePlusVideoSize | (string & {});
|
|
483
|
+
/**
|
|
484
|
+
* Resolve the accepted non-text prompt modalities for a video model. Unknown
|
|
485
|
+
* models accept all three rather than none, so a new model's reference media
|
|
486
|
+
* is not a compile error.
|
|
487
|
+
*/
|
|
488
|
+
export type ResolveBytePlusVideoInputModalities<TModel extends string> = TModel extends BytePlusVideoModel ? BytePlusVideoModelInputModalitiesByName[TModel] : readonly ['image', 'video', 'audio'];
|
|
489
|
+
/**
|
|
490
|
+
* True when the id is one this package has probe-verified metadata for.
|
|
491
|
+
*
|
|
492
|
+
* The adapter uses this to decide whether its model-specific guards apply:
|
|
493
|
+
* see {@link BytePlusVideoModelOrString}.
|
|
494
|
+
*/
|
|
495
|
+
export declare function isKnownBytePlusVideoModel(model: string): model is BytePlusVideoModel;
|
|
496
|
+
/**
|
|
497
|
+
* Per-model duration type. Seedance accepts any integer second inside the
|
|
498
|
+
* model's range, so this is a continuous range expressed as `number` — a
|
|
499
|
+
* literal union cannot represent it. (The API also accepts `duration: -1` on
|
|
500
|
+
* Seedance 2.0 and 1.5-pro to let the model choose; that is reachable through
|
|
501
|
+
* provider options, not through the generic `duration`.)
|
|
502
|
+
*/
|
|
503
|
+
export type BytePlusVideoModelDurationByName = {
|
|
504
|
+
[K in BytePlusVideoModel]: number;
|
|
505
|
+
};
|
|
506
|
+
/**
|
|
507
|
+
* Runtime duration table backing `availableDurations()` / `snapDuration()`.
|
|
508
|
+
*/
|
|
509
|
+
export declare const BYTEPLUS_VIDEO_DURATIONS: {
|
|
510
|
+
readonly [TModel in BytePlusVideoModel]: DurationOptions<BytePlusVideoModelDurationByName[TModel]>;
|
|
511
|
+
};
|
|
512
|
+
/**
|
|
513
|
+
* Duration hint for a model this package has no table for.
|
|
514
|
+
*
|
|
515
|
+
* Spans every range Seedance has shipped so far (2s on the 1.0 models through
|
|
516
|
+
* 15s on the 2.0 family) so `availableDurations()` can still drive a UI. It is
|
|
517
|
+
* a hint, not a contract: the adapter does **not** snap an unknown model's
|
|
518
|
+
* duration against it, because clamping a future model's legitimate 20-second
|
|
519
|
+
* request down to 15 would corrupt the request rather than protect it.
|
|
520
|
+
*/
|
|
521
|
+
export declare const BYTEPLUS_VIDEO_FALLBACK_DURATIONS: DurationOptions<number>;
|
|
522
|
+
/**
|
|
523
|
+
* Look up the duration options for a Seedance video model, falling back to
|
|
524
|
+
* {@link BYTEPLUS_VIDEO_FALLBACK_DURATIONS} for an id this package does not
|
|
525
|
+
* know.
|
|
526
|
+
*/
|
|
527
|
+
export declare function getBytePlusVideoDurationOptions(model: BytePlusVideoModelOrString): DurationOptions<number>;
|
|
528
|
+
/**
|
|
529
|
+
* Shorthand size tokens accepted by `/images/generations`. A request uses
|
|
530
|
+
* either a token or an explicit `WxH` string — never both.
|
|
531
|
+
*/
|
|
532
|
+
export type BytePlusImageSizeToken = '1K' | '2K' | '4K';
|
|
533
|
+
/**
|
|
534
|
+
* Accepted `size` values for Seedream models: a shorthand token or an
|
|
535
|
+
* explicit pixel size such as `2048x2048`.
|
|
536
|
+
*/
|
|
537
|
+
export type BytePlusImageSize = BytePlusImageSizeToken | `${number}x${number}`;
|
|
538
|
+
/**
|
|
539
|
+
* All supported Seedream image model identifiers.
|
|
540
|
+
*/
|
|
541
|
+
export declare const BYTEPLUS_IMAGE_MODELS: readonly ["dola-seedream-5-0-pro-260628", "seedream-5-0-260128", "seedream-5-0-lite-260128", "seedream-4-5-251128", "seedream-4-0-250828"];
|
|
542
|
+
/**
|
|
543
|
+
* Union of all supported Seedream image model names.
|
|
544
|
+
*/
|
|
545
|
+
export type BytePlusImageModel = (typeof BYTEPLUS_IMAGE_MODELS)[number];
|
|
546
|
+
/**
|
|
547
|
+
* Type-only map from image model name to its accepted `size` strings.
|
|
548
|
+
*/
|
|
549
|
+
export type BytePlusImageModelSizeByName = {
|
|
550
|
+
[K in BytePlusImageModel]: BytePlusImageSize;
|
|
551
|
+
};
|
|
552
|
+
/**
|
|
553
|
+
* Maximum number of reference images accepted per editing request.
|
|
554
|
+
* Seedream 5.0 Pro caps at 10 references; the other editing-capable models
|
|
555
|
+
* accept up to 14.
|
|
556
|
+
*
|
|
557
|
+
* Docs-derived, not live-probed. The 14 for `seedream-5-0-260128` is weaker
|
|
558
|
+
* still — the docs never state a cap for that model, so it is inferred from
|
|
559
|
+
* the rest of the family.
|
|
560
|
+
*/
|
|
561
|
+
export declare const BYTEPLUS_IMAGE_MAX_REFERENCE_IMAGES: {
|
|
562
|
+
readonly [K in BytePlusImageModel]: number;
|
|
563
|
+
};
|
|
564
|
+
/**
|
|
565
|
+
* All supported Seed Speech TTS model identifiers.
|
|
566
|
+
*
|
|
567
|
+
* Note: TTS runs on `voice.ap-southeast-1.bytepluses.com` with an
|
|
568
|
+
* `X-Api-Key` header and a *different* API key from Ark.
|
|
569
|
+
*/
|
|
570
|
+
export declare const BYTEPLUS_TTS_MODELS: readonly ["seed-audio-1.0"];
|
|
571
|
+
/**
|
|
572
|
+
* All supported Seed Speech transcription model identifiers.
|
|
573
|
+
*/
|
|
574
|
+
export declare const BYTEPLUS_TRANSCRIPTION_MODELS: readonly ["seed-asr"];
|
|
575
|
+
/**
|
|
576
|
+
* Union of all supported Seed Speech TTS model names.
|
|
577
|
+
*/
|
|
578
|
+
export type BytePlusTTSModel = (typeof BYTEPLUS_TTS_MODELS)[number];
|
|
579
|
+
/**
|
|
580
|
+
* Union of all supported Seed Speech transcription model names.
|
|
581
|
+
*/
|
|
582
|
+
export type BytePlusTranscriptionModel = (typeof BYTEPLUS_TRANSCRIPTION_MODELS)[number];
|
|
583
|
+
/**
|
|
584
|
+
* Resolve provider options for a specific model. Models listed in the chat
|
|
585
|
+
* map get their explicit options; anything else falls back to the base chat
|
|
586
|
+
* options.
|
|
587
|
+
*/
|
|
588
|
+
export type ResolveProviderOptions<TModel extends string> = TModel extends keyof BytePlusChatModelProviderOptionsByName ? BytePlusChatModelProviderOptionsByName[TModel] : BytePlusTextProviderOptions;
|
|
589
|
+
/**
|
|
590
|
+
* Resolve input modalities for a specific model. Models missing from the map
|
|
591
|
+
* are treated as text-only.
|
|
592
|
+
*/
|
|
593
|
+
export type ResolveInputModalities<TModel extends string> = TModel extends keyof BytePlusModelInputModalitiesByName ? BytePlusModelInputModalitiesByName[TModel] : readonly ['text'];
|
|
594
|
+
export {};
|