@slatesvideo/shared 0.7.16 → 0.7.18
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/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/manual/content.d.ts +1 -1
- package/dist/manual/content.js +1 -1
- package/dist/operations/index.d.ts +40 -14
- package/dist/operations/index.js +393 -132
- package/dist/prompts/generation-policy.d.ts +1 -1
- package/dist/prompts/generation-policy.js +7 -2
- package/dist/prompts/model-capabilities.d.ts +78 -6
- package/dist/prompts/model-capabilities.js +232 -48
- package/dist/prompts/model-facts.d.ts +1 -1
- package/dist/prompts/model-facts.js +36 -26
- package/dist/prompts/prompting-tips.d.ts +1 -1
- package/dist/prompts/prompting-tips.js +16 -11
- package/dist/prompts/reference-composer.d.ts +4 -0
- package/dist/prompts/reference-composer.js +14 -1
- package/dist/prompts/shot-spec.d.ts +1 -1
- package/dist/skills/content.js +2 -2
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* This is NOT a model capability or provider batch limit. Desktop mirror is
|
|
3
3
|
* generated by slate/scripts/sync-generation-policy.mjs; never edit it there. */
|
|
4
4
|
export declare const IMAGE_QUANTITIES: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
5
|
-
export declare const MAX_IMAGE_VARIATIONS:
|
|
5
|
+
export declare const MAX_IMAGE_VARIATIONS: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
|
|
6
6
|
export type ImageQuantity = typeof IMAGE_QUANTITIES[number];
|
|
7
7
|
export declare const clampImageQuantity: (count?: number) => ImageQuantity;
|
|
8
8
|
/** Default saved-recipe framing, shared by composer restore, quote and dispatch. */
|
|
@@ -26,8 +26,13 @@ export const DEFAULT_SHOT_ASPECT_RATIO = '16:9';
|
|
|
26
26
|
export const BUILT_IN_TOOLS = ['character-sheet', 'environment-plate', 'grid-extract', 'image-edit'];
|
|
27
27
|
export const DEFAULT_IMAGE_SEAT = 'default-image';
|
|
28
28
|
export const TOOL_SEAT = {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
// Pinned to the seat they ran on when Seedream 5.5 became the default image
|
|
30
|
+
// model (2026-11-16). A sheet is a panelled identity frame built from one base
|
|
31
|
+
// image, the layout work GPT Image is routed for, and on Seedream 5.5 every
|
|
32
|
+
// input image bills on its own; moving the sheets is a pick with a side-by-side
|
|
33
|
+
// of its own, not a side effect of the default changing.
|
|
34
|
+
'character-sheet': 'gpt-image-2-6-sunburst',
|
|
35
|
+
'environment-plate': 'gpt-image-2-6-sunburst',
|
|
31
36
|
// Pinned: the image viewer offers grid extraction a fixed short list of seats,
|
|
32
37
|
// and the cell-extraction prompt has a variant per seat family. Moving it is a
|
|
33
38
|
// picker and a prompt change first.
|
|
@@ -102,6 +102,45 @@ export declare const GPT_IMAGE_25_SIZES: Record<string, Record<string, {
|
|
|
102
102
|
width: number;
|
|
103
103
|
height: number;
|
|
104
104
|
}>>;
|
|
105
|
+
/**
|
|
106
|
+
* Seedream 5.5's output `size` (`WxH`) per Slates rung and aspect ratio, sent to
|
|
107
|
+
* BytePlus ModelArk direct (`dola-seedream-5-5-261028`).
|
|
108
|
+
*
|
|
109
|
+
* 🚨 A BILLING INPUT. BytePlus bills an output by its total pixels P: $0.020 when
|
|
110
|
+
* P ≤ 1536² × 1.05² (2,601,123.84), $0.035 up to 2048² × 1.05² (4,624,220.16)
|
|
111
|
+
* (pricing page, ripped 2026-11-16 to second-brain/business/projects/slates/
|
|
112
|
+
* provider-docs/byteplus-seedream-5-5-docs.md). The proxy derives the cost key's
|
|
113
|
+
* rung from the body's `size` by that same line (`seedream55RungOfSize`), so every
|
|
114
|
+
* size here must sit inside its rung's band.
|
|
115
|
+
*
|
|
116
|
+
* Rungs are named by pixel width, as GPT Image's are (`2k` ≈ 2048 px wide, `3k`
|
|
117
|
+
* ≈ 2816): `2k` is BytePlus's "1.5K" preset class, `3k` its "2K" class. The 1K
|
|
118
|
+
* preset is not offered: it bills the same $0.020 as 1.5K for a smaller picture.
|
|
119
|
+
* Eight aspects are BytePlus's own preset dimensions (API reference, `size`,
|
|
120
|
+
* "Seedream 5.5 (image generation)"); `4:5` and `5:4`, which it does not list,
|
|
121
|
+
* hold the 1:1 preset's pixel count in multiples of 8. Exact `WxH` is sent rather
|
|
122
|
+
* than a bare preset because a preset lets the prompt choose the aspect.
|
|
123
|
+
* BytePlus's band: total pixels [921,600, 4,624,220], aspect [1/16, 16].
|
|
124
|
+
*/
|
|
125
|
+
export declare const SEEDREAM_5_5_SIZES: Record<'2k' | '3k', Record<AspectRatio, {
|
|
126
|
+
width: number;
|
|
127
|
+
height: number;
|
|
128
|
+
}>>;
|
|
129
|
+
/** BytePlus's pixel line between Seedream 5.5's two price tiers, and its band. */
|
|
130
|
+
export declare const SEEDREAM_5_5_PIXEL_BOUNDS: {
|
|
131
|
+
readonly min: 921600;
|
|
132
|
+
readonly tierLine: 2601123;
|
|
133
|
+
readonly max: 4624220;
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* The rung a Seedream 5.5 `WxH` bills at, by BytePlus's pixel line, or null when
|
|
137
|
+
* the size is outside the band or malformed. The proxy's one reading of a 5.5
|
|
138
|
+
* request's price tier; the desktop's sizes come from `SEEDREAM_5_5_SIZES`.
|
|
139
|
+
*/
|
|
140
|
+
export declare function seedream55RungOfSize(size: unknown): '2k' | '3k' | null;
|
|
141
|
+
export declare function seedream55CostKey(resolution: string | undefined, referenceCount: number): string;
|
|
142
|
+
/** Seedream 5.5's `size` string for a rung and aspect ratio. */
|
|
143
|
+
export declare function seedream55Size(aspectRatio: string | undefined, resolution: string | undefined): string;
|
|
105
144
|
/**
|
|
106
145
|
* fal's named ~1MP presets per aspect ratio, with custom dims where fal has no
|
|
107
146
|
* preset. The `1k` rung of every non-GPT image model resolves through this.
|
|
@@ -190,6 +229,15 @@ export interface ModelCapability {
|
|
|
190
229
|
maxReferenceVideoSeconds?: number;
|
|
191
230
|
/** Combined seconds across every reference audio clip. */
|
|
192
231
|
maxReferenceAudioSeconds?: number;
|
|
232
|
+
/** Fewer reference videos on a longer output: above `aboveSeconds` of output,
|
|
233
|
+
* at most `max` (`maxReferenceVideosFor`). Absent = `maxReferenceVideos` at every length. */
|
|
234
|
+
longOutputReferenceVideos?: {
|
|
235
|
+
aboveSeconds: number;
|
|
236
|
+
max: number;
|
|
237
|
+
};
|
|
238
|
+
/** The longest output with a last frame, when shorter than `duration.max`
|
|
239
|
+
* (`lastFrameMaxSecondsFor`). Absent = the model's whole window. */
|
|
240
|
+
lastFrameMaxSeconds?: number;
|
|
193
241
|
/**
|
|
194
242
|
* Max characters in ONE synthesis request. Present ⟺ the surface is TTS.
|
|
195
243
|
* This is the number the character BILLING BUCKET is sized against, so it
|
|
@@ -214,12 +262,12 @@ export interface ModelCapability {
|
|
|
214
262
|
export declare const AGENT_ROUTE_PROVIDER = "fal";
|
|
215
263
|
export declare const MODEL_CAPABILITIES: Record<string, ModelCapability>;
|
|
216
264
|
/**
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
265
|
+
* Seats that left the roster, each with the seat that replaced it. The desktop
|
|
266
|
+
* moves a stored or sent id onto its replacement (slate `migrateRetiredModel`,
|
|
267
|
+
* which reads this map and adds the retired video seats this repo does not name).
|
|
268
|
+
* The server keeps their cost keys so desktops released before a retirement
|
|
269
|
+
* still bill; the list and estimate ops hide those keys and name the replacement
|
|
270
|
+
* instead.
|
|
223
271
|
*/
|
|
224
272
|
export declare const RETIRED_MODELS: Readonly<Record<string, string>>;
|
|
225
273
|
/**
|
|
@@ -260,6 +308,30 @@ export declare function durationsFor(model: string, opts?: {
|
|
|
260
308
|
videoResolution?: string;
|
|
261
309
|
promptMode?: string;
|
|
262
310
|
}): DurationCapability | undefined;
|
|
311
|
+
/**
|
|
312
|
+
* Reference videos a request may carry at `duration` seconds of output: fewer
|
|
313
|
+
* above the row's `longOutputReferenceVideos` threshold, else `maxReferenceVideos`.
|
|
314
|
+
* Without a duration the threshold cannot apply, so the row's full cap is returned.
|
|
315
|
+
*/
|
|
316
|
+
export declare function maxReferenceVideosFor(model: string, duration?: number): number;
|
|
317
|
+
/** The longest output a request with a last frame may ask for: the row's
|
|
318
|
+
* `lastFrameMaxSeconds`, else its duration maximum. */
|
|
319
|
+
export declare function lastFrameMaxSecondsFor(model: string): number | undefined;
|
|
320
|
+
/**
|
|
321
|
+
* The limits that move with the request rather than with the model alone: the
|
|
322
|
+
* output length a last frame allows, how many reference videos that length
|
|
323
|
+
* allows, and each reference video's length. `referenceVideoCount` defaults to
|
|
324
|
+
* the number of lengths given. A plain message naming `label`, or null. One
|
|
325
|
+
* function for the desktop's composer and the agent ops, so both refuse the same
|
|
326
|
+
* request before anything uploads or bills.
|
|
327
|
+
*/
|
|
328
|
+
export declare function checkReferenceShape(model: string, opts: {
|
|
329
|
+
duration?: number;
|
|
330
|
+
lastFrame?: boolean;
|
|
331
|
+
referenceVideoCount?: number;
|
|
332
|
+
referenceVideoSeconds?: readonly number[];
|
|
333
|
+
label?: string;
|
|
334
|
+
}): string | null;
|
|
263
335
|
/** Every legal whole-second duration. Mirrors `getAvailableDurations`. */
|
|
264
336
|
export declare function durationValuesFor(model: string, opts?: {
|
|
265
337
|
videoResolution?: string;
|
|
@@ -73,7 +73,7 @@ const KLING_FAL_ASPECT_RATIOS = ['16:9', '9:16', '1:1'];
|
|
|
73
73
|
* follows the input frames."
|
|
74
74
|
*/
|
|
75
75
|
const KLING_V4_ASPECT_RATIOS = ['16:9', '9:16', '1:1', '21:9'];
|
|
76
|
-
/** Gemini Omni Flash
|
|
76
|
+
/** Gemini Omni Flash 1.2: two, 16:9 default (fal's v1.2 schemas, all four endpoints, read 2026-11-10). */
|
|
77
77
|
const OMNI_FLASH_ASPECT_RATIOS = ['16:9', '9:16'];
|
|
78
78
|
/**
|
|
79
79
|
* Wan 3.0: five. Read off fal's live OpenAPI 2026-10-17 for all three
|
|
@@ -116,6 +116,8 @@ export const GPT_QUALITY_TIERS = ['low', 'medium', 'high', 'xhigh', 'max'];
|
|
|
116
116
|
export const DEFAULT_GPT_QUALITY = 'high';
|
|
117
117
|
export const GPT_BACKGROUNDS = ['auto', 'transparent', 'opaque'];
|
|
118
118
|
// Product output sizes; schema bounds and metering receipt live in the GPT harvest.
|
|
119
|
+
// GPT Image 2.6 keeps 2.5's size bounds (fal schema, 2026-11-10), so the table
|
|
120
|
+
// and its exported name carry over: slate and slates-api import it by that name.
|
|
119
121
|
export const GPT_IMAGE_25_SIZES = {
|
|
120
122
|
'1k': {
|
|
121
123
|
'1:1': { width: 1024, height: 1024 },
|
|
@@ -149,6 +151,100 @@ export const GPT_IMAGE_25_SIZES = {
|
|
|
149
151
|
'3:4': { width: 2448, height: 3264 },
|
|
150
152
|
},
|
|
151
153
|
};
|
|
154
|
+
/**
|
|
155
|
+
* Seedream 5.5's output `size` (`WxH`) per Slates rung and aspect ratio, sent to
|
|
156
|
+
* BytePlus ModelArk direct (`dola-seedream-5-5-261028`).
|
|
157
|
+
*
|
|
158
|
+
* 🚨 A BILLING INPUT. BytePlus bills an output by its total pixels P: $0.020 when
|
|
159
|
+
* P ≤ 1536² × 1.05² (2,601,123.84), $0.035 up to 2048² × 1.05² (4,624,220.16)
|
|
160
|
+
* (pricing page, ripped 2026-11-16 to second-brain/business/projects/slates/
|
|
161
|
+
* provider-docs/byteplus-seedream-5-5-docs.md). The proxy derives the cost key's
|
|
162
|
+
* rung from the body's `size` by that same line (`seedream55RungOfSize`), so every
|
|
163
|
+
* size here must sit inside its rung's band.
|
|
164
|
+
*
|
|
165
|
+
* Rungs are named by pixel width, as GPT Image's are (`2k` ≈ 2048 px wide, `3k`
|
|
166
|
+
* ≈ 2816): `2k` is BytePlus's "1.5K" preset class, `3k` its "2K" class. The 1K
|
|
167
|
+
* preset is not offered: it bills the same $0.020 as 1.5K for a smaller picture.
|
|
168
|
+
* Eight aspects are BytePlus's own preset dimensions (API reference, `size`,
|
|
169
|
+
* "Seedream 5.5 (image generation)"); `4:5` and `5:4`, which it does not list,
|
|
170
|
+
* hold the 1:1 preset's pixel count in multiples of 8. Exact `WxH` is sent rather
|
|
171
|
+
* than a bare preset because a preset lets the prompt choose the aspect.
|
|
172
|
+
* BytePlus's band: total pixels [921,600, 4,624,220], aspect [1/16, 16].
|
|
173
|
+
*/
|
|
174
|
+
export const SEEDREAM_5_5_SIZES = {
|
|
175
|
+
'2k': {
|
|
176
|
+
'1:1': { width: 1536, height: 1536 },
|
|
177
|
+
'16:9': { width: 2048, height: 1152 },
|
|
178
|
+
'9:16': { width: 1152, height: 2048 },
|
|
179
|
+
'4:3': { width: 1792, height: 1344 },
|
|
180
|
+
'3:4': { width: 1344, height: 1792 },
|
|
181
|
+
'3:2': { width: 1872, height: 1248 },
|
|
182
|
+
'2:3': { width: 1248, height: 1872 },
|
|
183
|
+
'5:4': { width: 1720, height: 1376 },
|
|
184
|
+
'4:5': { width: 1376, height: 1720 },
|
|
185
|
+
'21:9': { width: 2352, height: 1008 },
|
|
186
|
+
},
|
|
187
|
+
'3k': {
|
|
188
|
+
'1:1': { width: 2048, height: 2048 },
|
|
189
|
+
'16:9': { width: 2816, height: 1584 },
|
|
190
|
+
'9:16': { width: 1584, height: 2816 },
|
|
191
|
+
'4:3': { width: 2368, height: 1776 },
|
|
192
|
+
'3:4': { width: 1776, height: 2368 },
|
|
193
|
+
'3:2': { width: 2496, height: 1664 },
|
|
194
|
+
'2:3': { width: 1664, height: 2496 },
|
|
195
|
+
'5:4': { width: 2288, height: 1832 },
|
|
196
|
+
'4:5': { width: 1832, height: 2288 },
|
|
197
|
+
'21:9': { width: 3136, height: 1344 },
|
|
198
|
+
},
|
|
199
|
+
};
|
|
200
|
+
/** BytePlus's pixel line between Seedream 5.5's two price tiers, and its band. */
|
|
201
|
+
export const SEEDREAM_5_5_PIXEL_BOUNDS = { min: 921_600, tierLine: 2_601_123, max: 4_624_220 };
|
|
202
|
+
/**
|
|
203
|
+
* The rung a Seedream 5.5 `WxH` bills at, by BytePlus's pixel line, or null when
|
|
204
|
+
* the size is outside the band or malformed. The proxy's one reading of a 5.5
|
|
205
|
+
* request's price tier; the desktop's sizes come from `SEEDREAM_5_5_SIZES`.
|
|
206
|
+
*/
|
|
207
|
+
export function seedream55RungOfSize(size) {
|
|
208
|
+
if (typeof size !== 'string')
|
|
209
|
+
return null;
|
|
210
|
+
const m = /^(\d{2,5})x(\d{2,5})$/.exec(size);
|
|
211
|
+
if (!m)
|
|
212
|
+
return null;
|
|
213
|
+
const w = Number(m[1]);
|
|
214
|
+
const h = Number(m[2]);
|
|
215
|
+
const pixels = w * h;
|
|
216
|
+
if (w / h < 1 / 16 || w / h > 16)
|
|
217
|
+
return null;
|
|
218
|
+
if (pixels < SEEDREAM_5_5_PIXEL_BOUNDS.min || pixels > SEEDREAM_5_5_PIXEL_BOUNDS.max)
|
|
219
|
+
return null;
|
|
220
|
+
return pixels <= SEEDREAM_5_5_PIXEL_BOUNDS.tierLine ? '2k' : '3k';
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Seedream 5.5's billing key: its price rung, then the input-image count when
|
|
224
|
+
* there is one (`seedream-5-5-3k`, `seedream-5-5-3k-ref2`). BytePlus bills each
|
|
225
|
+
* input image ($0.008) on top of the output, so the count is part of the price.
|
|
226
|
+
* THE ONE HOME of the key's shape: the op quote, the desktop's `imageCreditKey`
|
|
227
|
+
* and the proxy's key derivation all call this. Counts clamp to the model's cap,
|
|
228
|
+
* which the proxy refuses past.
|
|
229
|
+
*/
|
|
230
|
+
/** A requested rung, or the model's default when none (or an unknown one) is named. */
|
|
231
|
+
function seedream55Rung(resolution) {
|
|
232
|
+
if (resolution === '2k' || resolution === '3k')
|
|
233
|
+
return resolution;
|
|
234
|
+
return MODEL_CAPABILITIES['seedream-5-5']?.defaultImageResolution === '3k' ? '3k' : '2k';
|
|
235
|
+
}
|
|
236
|
+
export function seedream55CostKey(resolution, referenceCount) {
|
|
237
|
+
const rung = seedream55Rung(resolution);
|
|
238
|
+
const cap = MODEL_CAPABILITIES['seedream-5-5']?.maxRefImages ?? 0;
|
|
239
|
+
const refs = Math.max(0, Math.min(cap, Number.isFinite(referenceCount) ? Math.floor(referenceCount) : 0));
|
|
240
|
+
return `seedream-5-5-${rung}${refs > 0 ? `-ref${refs}` : ''}`;
|
|
241
|
+
}
|
|
242
|
+
/** Seedream 5.5's `size` string for a rung and aspect ratio. */
|
|
243
|
+
export function seedream55Size(aspectRatio, resolution) {
|
|
244
|
+
const rung = seedream55Rung(resolution);
|
|
245
|
+
const dims = SEEDREAM_5_5_SIZES[rung][(aspectRatio ?? '16:9')] ?? SEEDREAM_5_5_SIZES[rung]['16:9'];
|
|
246
|
+
return `${dims.width}x${dims.height}`;
|
|
247
|
+
}
|
|
152
248
|
/**
|
|
153
249
|
* fal's named ~1MP presets per aspect ratio, with custom dims where fal has no
|
|
154
250
|
* preset. The `1k` rung of every non-GPT image model resolves through this.
|
|
@@ -201,8 +297,11 @@ export function falImageSize(model, aspectRatio, resolution) {
|
|
|
201
297
|
if (res === '1k') {
|
|
202
298
|
return FAL_1MP_SIZES[ar] || 'landscape_16_9';
|
|
203
299
|
}
|
|
204
|
-
// Seedream 5 Lite
|
|
205
|
-
//
|
|
300
|
+
// Seedream 5 Lite, retired 2026-11-16 for Seedream 5.5 (which never comes
|
|
301
|
+
// here: it runs on BytePlus with `seedream55Size`). Kept because slates-api
|
|
302
|
+
// still validates and bills 5 Lite requests from desktops 1.6.9 and older.
|
|
303
|
+
// Custom dims must be ≥3.69MP (2560×1440) and ≤9.44MP (3072×3072), so its
|
|
304
|
+
// three rungs target 4 / 7 / 9 MP, all inside that band.
|
|
206
305
|
if (isSeedream5) {
|
|
207
306
|
if (res === '4k')
|
|
208
307
|
return computeFalDimensions(ar, 9);
|
|
@@ -291,11 +390,15 @@ export const MODEL_CAPABILITIES = {
|
|
|
291
390
|
// becomes a Shot. That is strictly better than keeping the row — the Shot
|
|
292
391
|
// comes back FIREABLE on a live model, rather than merely openable on a dead
|
|
293
392
|
// one. Do not re-add this row to make a stale id resolve; migrate it.
|
|
294
|
-
// GPT Image 2.
|
|
295
|
-
//
|
|
296
|
-
//
|
|
297
|
-
//
|
|
298
|
-
//
|
|
393
|
+
// GPT Image 2.6 (fal `openai/gpt-image-2.6/{flare|sunburst}/{text-to-image|edit}`),
|
|
394
|
+
// replacing 2.5 on 2026-11-10 (Eric). Every field Slates sends has the same
|
|
395
|
+
// type, bounds and default as on 2.5 (fal OpenAPI, ripped verbatim to
|
|
396
|
+
// second-brain/business/projects/slates/provider-docs/fal-gpt-image-2-6-openapi-schemas.md;
|
|
397
|
+
// the diff is in second-brain plans/2026-11-10-slates-gpt-image-2-6-swap.md).
|
|
398
|
+
// The 2.5 ids are in RETIRED_MODELS below.
|
|
399
|
+
//
|
|
400
|
+
// 16 references IS fal's documented ceiling rather than a number of ours:
|
|
401
|
+
// `image_urls` carries `maxItems: 16` on both edit endpoints.
|
|
299
402
|
//
|
|
300
403
|
// 🚨 IT WAS 10 UNTIL 2026-09-09, AND 10 WAS NEVER ANYBODY'S LIMIT. The
|
|
301
404
|
// comment here used to call it "the 10-reference ceiling ... unchanged by the
|
|
@@ -310,13 +413,13 @@ export const MODEL_CAPABILITIES = {
|
|
|
310
413
|
// pricing.ts). Two SLATES caps sit outside this file and are not model
|
|
311
414
|
// limits either: the MCP's 4,000-character prompt against fal's 32,000, and
|
|
312
415
|
// image quantity, which is a fan-out and has no provider ceiling at all.
|
|
313
|
-
'gpt-image-2-
|
|
416
|
+
'gpt-image-2-6-flare': {
|
|
314
417
|
defaultImageResolution: '2k',
|
|
315
418
|
imageResolutions: ['2k', '3k', '4k'],
|
|
316
419
|
aspectRatios: ['1:1', '16:9', '9:16', '4:3', '3:4'],
|
|
317
420
|
maxRefImages: 16,
|
|
318
421
|
},
|
|
319
|
-
'gpt-image-2-
|
|
422
|
+
'gpt-image-2-6-sunburst': {
|
|
320
423
|
defaultImageResolution: '3k',
|
|
321
424
|
imageResolutions: ['2k', '3k', '4k'],
|
|
322
425
|
aspectRatios: ['1:1', '16:9', '9:16', '4:3', '3:4'],
|
|
@@ -335,9 +438,17 @@ export const MODEL_CAPABILITIES = {
|
|
|
335
438
|
aspectRatios: FULL_ASPECT_RATIOS,
|
|
336
439
|
maxRefImages: 10,
|
|
337
440
|
},
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
441
|
+
// Seedream 5.5 on BytePlus ModelArk direct (`dola-seedream-5-5-261028`),
|
|
442
|
+
// replacing Seedream 5 Lite 2026-11-16 (Eric) and THE DEFAULT IMAGE SEAT
|
|
443
|
+
// (MODEL_FACTS tier). Read off the ModelArk API reference, ripped 2026-11-16
|
|
444
|
+
// (provider-docs/byteplus-seedream-5-5-docs.md): "Seedream 5.5 ... support up
|
|
445
|
+
// to 10 reference images"; aspect ratio [1/16, 16] covers all ten of ours.
|
|
446
|
+
// Rungs and sizes: SEEDREAM_5_5_SIZES above. Default 3k (2816 px wide at
|
|
447
|
+
// 16:9; Eric, 2026-11-16: "Why wouldn't we make the default 3K? It's cheap
|
|
448
|
+
// enough"); 2k is the cheaper option. 5 Lite is in RETIRED_MODELS below.
|
|
449
|
+
'seedream-5-5': {
|
|
450
|
+
defaultImageResolution: '3k',
|
|
451
|
+
imageResolutions: ['2k', '3k'],
|
|
341
452
|
aspectRatios: FULL_ASPECT_RATIOS,
|
|
342
453
|
maxRefImages: 10,
|
|
343
454
|
},
|
|
@@ -404,44 +515,59 @@ export const MODEL_CAPABILITIES = {
|
|
|
404
515
|
videoResolution: { options: ['720p', '1080p'], default: '720p' },
|
|
405
516
|
duration: { min: 3, max: 30, mode: 'continuous' },
|
|
406
517
|
},
|
|
407
|
-
// ── Gemini Omni Flash 1.
|
|
518
|
+
// ── Gemini Omni Flash 1.2 ──────────────────────────────────────────────────
|
|
408
519
|
//
|
|
409
|
-
//
|
|
410
|
-
//
|
|
411
|
-
//
|
|
412
|
-
//
|
|
413
|
-
//
|
|
520
|
+
// fal `google/gemini-omni-flash/v1.2/{text-to-video,image-to-video,
|
|
521
|
+
// reference-to-video,edit}`, replacing 1.1 on 2026-11-10 (Eric: "Yes, same
|
|
522
|
+
// release"). The 1.1 ids `omni-flash` / `omni-flash-edit` are in
|
|
523
|
+
// RETIRED_MODELS below. Rips, read 2026-11-10: second-brain/business/projects/
|
|
524
|
+
// slates/provider-docs/fal-gemini-omni-flash-1-2-openapi-schemas.md (fal) and
|
|
525
|
+
// google-gemini-omni-1-2-flash-docs.md (Google, the higher rung: where the two
|
|
526
|
+
// differ, Google's narrower limit is the one sold). `v1.2/extend` and
|
|
527
|
+
// `v1.2/upscale` are not sold.
|
|
414
528
|
//
|
|
415
529
|
// Resolution: fal's enum is 360p / 720p / 1080p / 4k, default 720p, on all
|
|
416
530
|
// four endpoints. Google: "1080p output (upscaled)", "4K output (upscaled)".
|
|
417
531
|
// 360p is NOT offered: it sits below every other row's floor and would need
|
|
418
|
-
// a new resolution token in every exhaustive map.
|
|
419
|
-
'omni-flash': {
|
|
532
|
+
// a new resolution token in every exhaustive map.
|
|
533
|
+
'omni-flash-1-2': {
|
|
420
534
|
aspectRatios: OMNI_FLASH_ASPECT_RATIOS,
|
|
421
535
|
videoResolution: { options: ['720p', '1080p', '4k'], default: '720p' },
|
|
422
|
-
|
|
423
|
-
//
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
//
|
|
427
|
-
// seconds
|
|
428
|
-
|
|
429
|
-
//
|
|
430
|
-
//
|
|
536
|
+
// fal: `duration` integer, minimum 3, maximum 15. Google: "any whole second
|
|
537
|
+
// from 3 to 15 seconds".
|
|
538
|
+
duration: { min: 3, max: 15, mode: 'continuous' },
|
|
539
|
+
// Google: "First and last frame interpolation supports video durations from
|
|
540
|
+
// 3 to 10 seconds" (fal's `end_image_url`: "the duration is capped at 10
|
|
541
|
+
// seconds").
|
|
542
|
+
lastFrameMaxSeconds: 10,
|
|
543
|
+
// Google: "up to 6 reference images per request (up to 3 images per
|
|
544
|
+
// character for up to 2 characters)". fal's `image_urls` says 10; Google's
|
|
545
|
+
// six is sold. The per-character split cannot be checked (nothing says which
|
|
546
|
+
// character an image shows), so the guide carries it as craft.
|
|
547
|
+
maxIngredientImages: 6,
|
|
548
|
+
// Google: "Videos from 11 to 15 seconds support 1 reference video (up to 3
|
|
549
|
+
// seconds long), while videos from 3 to 10 seconds support up to 3 reference
|
|
550
|
+
// videos (up to 3 seconds each)". fal's `reference_video_urls` says three of
|
|
551
|
+
// up to 15 seconds; Google's bounds are sold. The 1-second floor is ours.
|
|
431
552
|
maxReferenceVideos: 3,
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
//
|
|
436
|
-
|
|
553
|
+
longOutputReferenceVideos: { aboveSeconds: 10, max: 1 },
|
|
554
|
+
referenceVideoDuration: { min: 1, max: 3 },
|
|
555
|
+
maxReferenceVideoSeconds: 9,
|
|
556
|
+
// No combined ceiling is published, so the total is the two arms summed.
|
|
557
|
+
// Google: "Uploading audio inputs or audio references is unsupported".
|
|
558
|
+
maxReferenceFilesTotal: 9,
|
|
437
559
|
},
|
|
438
|
-
'omni-flash-edit': {
|
|
560
|
+
'omni-flash-1-2-edit': {
|
|
439
561
|
aspectRatios: OMNI_FLASH_ASPECT_RATIOS,
|
|
440
|
-
//
|
|
562
|
+
// fal's v1.2 edit takes `resolution`, same enum and default; no duration
|
|
563
|
+
// parameter, so the output follows the source clip.
|
|
441
564
|
videoResolution: { options: ['720p', '1080p', '4k'], default: '720p' },
|
|
442
|
-
// Source clip:
|
|
443
|
-
// seconds or less
|
|
444
|
-
|
|
565
|
+
// Source clip: fal, "Must be at most 15 seconds long"; Google, "input videos
|
|
566
|
+
// for editing must be 15 seconds or less". The 3-second floor is Google's
|
|
567
|
+
// output minimum ("Output video 3s-15s").
|
|
568
|
+
duration: { min: 3, max: 15, mode: 'continuous' },
|
|
569
|
+
// fal's v1.2 edit has no reference field. Google: reference videos "are only
|
|
570
|
+
// supported when generating a new video, not when editing".
|
|
445
571
|
maxIngredientImages: 0,
|
|
446
572
|
},
|
|
447
573
|
// ── Wan 3.0 (Alibaba, on fal — added 2026-10-17) ──────────────────────────
|
|
@@ -790,21 +916,29 @@ export const MODEL_CAPABILITIES = {
|
|
|
790
916
|
};
|
|
791
917
|
// ── Retired seats ────────────────────────────────────────────────────────────
|
|
792
918
|
/**
|
|
793
|
-
*
|
|
794
|
-
*
|
|
795
|
-
*
|
|
796
|
-
*
|
|
797
|
-
*
|
|
798
|
-
*
|
|
919
|
+
* Seats that left the roster, each with the seat that replaced it. The desktop
|
|
920
|
+
* moves a stored or sent id onto its replacement (slate `migrateRetiredModel`,
|
|
921
|
+
* which reads this map and adds the retired video seats this repo does not name).
|
|
922
|
+
* The server keeps their cost keys so desktops released before a retirement
|
|
923
|
+
* still bill; the list and estimate ops hide those keys and name the replacement
|
|
924
|
+
* instead.
|
|
799
925
|
*/
|
|
800
926
|
export const RETIRED_MODELS = {
|
|
801
|
-
// 2026-09-09: GPT Image 2.5 replaced it; Sunburst is the seat that does not
|
|
802
|
-
|
|
927
|
+
// 2026-09-09: GPT Image 2.5 replaced it; Sunburst is the seat that does not
|
|
928
|
+
// downgrade. 2026-11-10 (Eric): GPT Image 2.6 replaced 2.5, seat for seat.
|
|
929
|
+
'gpt-image-2': 'gpt-image-2-6-sunburst',
|
|
930
|
+
'gpt-image-2-5-flare': 'gpt-image-2-6-flare',
|
|
931
|
+
'gpt-image-2-5-sunburst': 'gpt-image-2-6-sunburst',
|
|
803
932
|
// 2026-10-23 (Eric): Nano Banana 2.1 replaced every Nano Banana row, FLUX 3 Image replaced FLUX.2 Max.
|
|
804
933
|
'nano-banana-2': 'nano-banana-2-1',
|
|
805
934
|
'nano-banana-2-lite': 'nano-banana-2-1',
|
|
806
935
|
'nano-banana-pro': 'nano-banana-2-1',
|
|
807
936
|
'flux-2-max': 'flux-3',
|
|
937
|
+
// 2026-11-10 (Eric, "Yes, same release"): Gemini Omni Flash 1.2 replaced 1.1, seat for seat.
|
|
938
|
+
'omni-flash': 'omni-flash-1-2',
|
|
939
|
+
'omni-flash-edit': 'omni-flash-1-2-edit',
|
|
940
|
+
// 2026-11-16 (Eric): Seedream 5.5 replaced Seedream 5 Lite and became the default image seat.
|
|
941
|
+
'seedream-5-lite': 'seedream-5-5',
|
|
808
942
|
};
|
|
809
943
|
/**
|
|
810
944
|
* The retired seat a cost key bills, or null when the key belongs to a current
|
|
@@ -885,6 +1019,56 @@ export function durationsFor(model, opts = {}) {
|
|
|
885
1019
|
}
|
|
886
1020
|
return base;
|
|
887
1021
|
}
|
|
1022
|
+
/**
|
|
1023
|
+
* Reference videos a request may carry at `duration` seconds of output: fewer
|
|
1024
|
+
* above the row's `longOutputReferenceVideos` threshold, else `maxReferenceVideos`.
|
|
1025
|
+
* Without a duration the threshold cannot apply, so the row's full cap is returned.
|
|
1026
|
+
*/
|
|
1027
|
+
export function maxReferenceVideosFor(model, duration) {
|
|
1028
|
+
const cap = MODEL_CAPABILITIES[model];
|
|
1029
|
+
const max = cap?.maxReferenceVideos ?? 0;
|
|
1030
|
+
const long = cap?.longOutputReferenceVideos;
|
|
1031
|
+
return long && duration != null && duration > long.aboveSeconds ? Math.min(max, long.max) : max;
|
|
1032
|
+
}
|
|
1033
|
+
/** The longest output a request with a last frame may ask for: the row's
|
|
1034
|
+
* `lastFrameMaxSeconds`, else its duration maximum. */
|
|
1035
|
+
export function lastFrameMaxSecondsFor(model) {
|
|
1036
|
+
const cap = MODEL_CAPABILITIES[model];
|
|
1037
|
+
return cap?.lastFrameMaxSeconds ?? cap?.duration?.max;
|
|
1038
|
+
}
|
|
1039
|
+
/**
|
|
1040
|
+
* The limits that move with the request rather than with the model alone: the
|
|
1041
|
+
* output length a last frame allows, how many reference videos that length
|
|
1042
|
+
* allows, and each reference video's length. `referenceVideoCount` defaults to
|
|
1043
|
+
* the number of lengths given. A plain message naming `label`, or null. One
|
|
1044
|
+
* function for the desktop's composer and the agent ops, so both refuse the same
|
|
1045
|
+
* request before anything uploads or bills.
|
|
1046
|
+
*/
|
|
1047
|
+
export function checkReferenceShape(model, opts) {
|
|
1048
|
+
const cap = MODEL_CAPABILITIES[model];
|
|
1049
|
+
if (!cap)
|
|
1050
|
+
return null;
|
|
1051
|
+
const name = opts.label ?? model;
|
|
1052
|
+
const lastMax = cap.lastFrameMaxSeconds;
|
|
1053
|
+
if (opts.lastFrame && lastMax != null && opts.duration != null && opts.duration > lastMax) {
|
|
1054
|
+
return `${name} takes ${cap.duration?.min ?? 3}-${lastMax}s with a last frame, and ${opts.duration}s is longer. Set ${lastMax}s or less, or drop the last frame.`;
|
|
1055
|
+
}
|
|
1056
|
+
const clips = opts.referenceVideoSeconds ?? [];
|
|
1057
|
+
const count = opts.referenceVideoCount ?? clips.length;
|
|
1058
|
+
const maxClips = maxReferenceVideosFor(model, opts.duration);
|
|
1059
|
+
if (count > maxClips) {
|
|
1060
|
+
const long = cap.longOutputReferenceVideos;
|
|
1061
|
+
const s = (n) => `${n} reference video${n === 1 ? '' : 's'}`;
|
|
1062
|
+
return long && opts.duration != null && opts.duration > long.aboveSeconds && count <= (cap.maxReferenceVideos ?? 0)
|
|
1063
|
+
? `${name} takes ${s(long.max)} on a clip over ${long.aboveSeconds}s (up to ${cap.maxReferenceVideos} at ${long.aboveSeconds}s or less), and this has ${count}. Set ${long.aboveSeconds}s or less, or remove ${count - maxClips}.`
|
|
1064
|
+
: `${name} takes at most ${s(maxClips)}, and this has ${count}.`;
|
|
1065
|
+
}
|
|
1066
|
+
const bounds = cap.referenceVideoDuration;
|
|
1067
|
+
if (bounds && clips.some((sec) => !Number.isFinite(sec) || sec > bounds.max + 0.05 || sec < bounds.min)) {
|
|
1068
|
+
return `Each ${name} reference video must be ${bounds.min}-${bounds.max}s long. Trim it first.`;
|
|
1069
|
+
}
|
|
1070
|
+
return null;
|
|
1071
|
+
}
|
|
888
1072
|
/** Every legal whole-second duration. Mirrors `getAvailableDurations`. */
|
|
889
1073
|
export function durationValuesFor(model, opts = {}) {
|
|
890
1074
|
const d = durationsFor(model, opts);
|
|
@@ -45,7 +45,7 @@ export interface ModelFact {
|
|
|
45
45
|
* performance and lip-sync work and the only engine behind Motion Transfer and
|
|
46
46
|
* Lip Sync. Recorded in the vault's prompting-ssot.md the same day.
|
|
47
47
|
*
|
|
48
|
-
* IMAGE (Eric, 2026-09-15): GPT IMAGE
|
|
48
|
+
* IMAGE (Eric, 2026-09-15; 2.6 since 2026-11-10): GPT IMAGE SUNBURST IS THE DEFAULT IMAGE MODEL, at
|
|
49
49
|
* `high` and 3k, in agent routing as it has been in the app picker since
|
|
50
50
|
* 2026-09-09. Nano Banana 2.1 keeps the only headless path, so an image call
|
|
51
51
|
* with no project still runs there. Changing the
|