@nodaro/shared 1.9.0 → 1.11.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/dist/index.cjs CHANGED
@@ -35,7 +35,7 @@ var MODEL_RECOMMENDATIONS = [
35
35
  { intent: "best for typography / logos / text-heavy", modelIds: ["nano-banana-pro", "gpt-image-2"], note: "Nano Banana Pro for diagrams / complex text; GPT Image 2 for logos and short copy." },
36
36
  { intent: "cheapest realistic image", modelIds: ["z-image", "qwen", "imagen4-fast"], note: "Z-Image is the cheapest at 1 credit. Qwen / Imagen4 Fast for slightly higher quality." },
37
37
  { intent: "highest fidelity image", modelIds: ["nano-banana-pro", "imagen4-ultra", "flux-flex"], note: "Pick by family preference; all three are premium tiers." },
38
- { intent: "image edit / restyle", modelIds: ["flux-kontext", "ideogram-remix", "seedream-5-lite-i2i"], note: "Flux Kontext preserves identity; Ideogram Remix is character-aware; Seedream 5 Lite for instruction-based edits." },
38
+ { intent: "image edit / restyle", modelIds: ["flux-kontext", "ideogram-remix", "seedream-5-pro-i2i"], note: "Flux Kontext preserves identity; Ideogram Remix is character-aware; Seedream 5 Pro for instruction-based edits (5 Lite is the budget option)." },
39
39
  { intent: "highest-resolution image (4K / 8K)", modelIds: ["topaz-image-upscale", "nano-banana-pro", "gpt-image-2"], note: "Generate at native then Topaz upscale for 8K." },
40
40
  { intent: "background removal / cutout", modelIds: ["recraft-remove-bg"], note: "1 credit, no prompt needed." },
41
41
  // video
@@ -49,6 +49,7 @@ var MODEL_RECOMMENDATIONS = [
49
49
  { intent: "motion transfer (drive a subject by another video)", modelIds: ["motion-transfer", "kling-3.0-motion"], note: "Kling 2.6 base is cheap; Kling 3.0 is premium." }
50
50
  ];
51
51
  var NANO_BANANA_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "4:5", "5:4", "21:9"];
52
+ var NANO_BANANA_2_LITE_RATIOS = ["auto", "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "4:5", "5:4", "21:9", "4:1", "1:4", "8:1", "1:8"];
52
53
  var FLUX_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3"];
53
54
  var KONTEXT_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4", "21:9"];
54
55
  var GROK_RATIOS = ["1:1", "16:9", "9:16", "3:2", "2:3"];
@@ -102,6 +103,22 @@ var IMAGE_MODELS = {
102
103
  { identifier: "nano-banana-2:4K", credits: 5, note: "4K" }
103
104
  ]
104
105
  },
106
+ "nano-banana-2-lite": {
107
+ id: "nano-banana-2-lite",
108
+ kind: "image",
109
+ // Same single-id shape as nano-banana-2: optional input images on the one
110
+ // endpoint (via image_urls, up to 10), so reachable for both t2i and i2i.
111
+ modes: ["t2i", "i2i"],
112
+ family: "Google",
113
+ label: "Nano Banana 2 Lite",
114
+ series: "Nano Banana",
115
+ description: "Lightweight Nano Banana 2 (Gemini 3.1 Flash-Lite) \u2014 fast, low-cost 1K generation and editing.",
116
+ useCases: ["realistic", "drafts", "iteration"],
117
+ features: ["reference-image"],
118
+ aspectRatios: NANO_BANANA_2_LITE_RATIOS,
119
+ // 1K only — no resolution lever, flat pricing.
120
+ pricing: [{ identifier: "nano-banana-2-lite", credits: 2, note: "1K flat" }]
121
+ },
105
122
  "nano-banana-pro": {
106
123
  id: "nano-banana-pro",
107
124
  kind: "image",
@@ -564,6 +581,40 @@ var IMAGE_MODELS = {
564
581
  { identifier: "seedream-5-lite-i2i:high", credits: 5, note: "high quality" }
565
582
  ]
566
583
  },
584
+ "seedream-5-pro": {
585
+ id: "seedream-5-pro",
586
+ kind: "image",
587
+ modes: ["t2i"],
588
+ family: "Bytedance",
589
+ label: "Seedream 5 Pro",
590
+ series: "Seedream",
591
+ description: "Flagship Seedream 5 Pro \u2014 strongest instruction following and visual reasoning. Basic = 1K, high = 2K.",
592
+ useCases: ["realistic", "instruction"],
593
+ features: ["reference-image"],
594
+ aspectRatios: SEEDREAM_RATIOS,
595
+ qualities: ["basic", "high"],
596
+ pricing: [
597
+ { identifier: "seedream-5-pro", credits: 3, note: "basic / 1K default" },
598
+ { identifier: "seedream-5-pro:high", credits: 6, note: "high / 2K" }
599
+ ]
600
+ },
601
+ "seedream-5-pro-i2i": {
602
+ id: "seedream-5-pro-i2i",
603
+ kind: "image",
604
+ modes: ["i2i"],
605
+ family: "Bytedance",
606
+ label: "Seedream 5 Pro (I2I)",
607
+ series: "Seedream",
608
+ description: "Image-to-image with Seedream 5 Pro \u2014 multi-reference instruction edits. Basic = 1K, high = 2K.",
609
+ useCases: ["edit", "instruction"],
610
+ features: ["reference-image"],
611
+ aspectRatios: SEEDREAM_RATIOS,
612
+ qualities: ["basic", "high"],
613
+ pricing: [
614
+ { identifier: "seedream-5-pro-i2i", credits: 3, note: "basic / 1K default" },
615
+ { identifier: "seedream-5-pro-i2i:high", credits: 6, note: "high / 2K" }
616
+ ]
617
+ },
567
618
  // ── Alibaba Qwen ──
568
619
  "qwen": {
569
620
  id: "qwen",
@@ -1610,10 +1661,10 @@ var VIDEO_MODELS = {
1610
1661
  id: "gemini-3-flash-video-analysis",
1611
1662
  kind: "video",
1612
1663
  modes: ["video-analysis"],
1613
- family: "Google",
1614
- label: "Video Analysis (Gemini 3 Flash)",
1615
- series: "Gemini",
1616
- description: "Analyze a video into a structured shot list (scenes, camera, audio) \u2014 fast Gemini tier. Billed per duration bucket.",
1664
+ family: "Nodaro",
1665
+ label: "Video Analysis (Fast)",
1666
+ series: "Video Analysis",
1667
+ description: "Analyze a video into a structured shot list (scenes, camera, audio) \u2014 fast, economy tier. Billed per duration bucket.",
1617
1668
  useCases: ["video-analysis", "shot-list", "fast"],
1618
1669
  pricing: [
1619
1670
  { identifier: "video-analysis:gemini-3-flash", credits: 3, note: "10-min ceiling (no duration given)" },
@@ -1627,10 +1678,10 @@ var VIDEO_MODELS = {
1627
1678
  id: "gemini-3.1-pro-video-analysis",
1628
1679
  kind: "video",
1629
1680
  modes: ["video-analysis"],
1630
- family: "Google",
1631
- label: "Video Analysis (Gemini 3.1 Pro)",
1632
- series: "Gemini",
1633
- description: "Analyze a video into a structured shot list (scenes, camera, audio) \u2014 high-fidelity Gemini tier. Billed per duration bucket.",
1681
+ family: "Nodaro",
1682
+ label: "Video Analysis (Pro)",
1683
+ series: "Video Analysis",
1684
+ description: "Analyze a video into a structured shot list (scenes, camera, audio) \u2014 higher-fidelity, default tier. Billed per duration bucket.",
1634
1685
  useCases: ["video-analysis", "shot-list", "cinematic"],
1635
1686
  pricing: [
1636
1687
  { identifier: "video-analysis:gemini-3.1-pro", credits: 11, note: "10-min ceiling (no duration given)" },
@@ -2064,6 +2115,8 @@ var MAX_IMAGE_PROMPT_CHARS_BY_PROVIDER = {
2064
2115
  // ── higher than the 5000 default ──
2065
2116
  "nano-banana-2": 2e4,
2066
2117
  // docs.kie.ai/market/google/nano-banana-2
2118
+ "nano-banana-2-lite": 2e4,
2119
+ // docs.kie.ai/market/google/nano-banana-2-lite
2067
2120
  "nano-banana-pro": 2e4,
2068
2121
  // docs.kie.ai/market/google/pro-image-to-image
2069
2122
  "gpt-image-2-i2i": 2e4,
@@ -2083,7 +2136,8 @@ var MAX_IMAGE_PROMPT_CHARS_BY_PROVIDER = {
2083
2136
  // docs.kie.ai/market/qwen/image-edit
2084
2137
  // verified == 5000 default (no entry needed): imagen4(-fast/-ultra), nano-banana,
2085
2138
  // nano-banana-edit, flux, flux-flex, gpt-image-2, ideogram-v3/-edit/-remix,
2086
- // z-image, grok, qwen-i2i.
2139
+ // z-image, grok, qwen-i2i, seedream-5-pro, seedream-5-pro-i2i
2140
+ // (docs.kie.ai/market/seedream/5-pro-text-to-image + 5-pro-image-to-image).
2087
2141
  // grok-i2i: doc states 390000 (78× its t2i sibling) — treated as a KIE schema
2088
2142
  // typo and left at the 5000 default per the sanity-cap decision.
2089
2143
  // UNVERIFIED (no limit stated in schema) → 5000 default: flux-kontext(-max)
@@ -2095,6 +2149,7 @@ function getMaxImagePromptChars(provider) {
2095
2149
  var VIDEO_PROMPT_MAX = 8e3;
2096
2150
  var SUNO_TEXT_MAX = 5e3;
2097
2151
  var PROMPT_HARD_CEILING = 2e4;
2152
+ var LLM_TEXT_INPUT_MAX = 1e5;
2098
2153
  var MAX_VIDEO_PROMPT_CHARS_BY_PROVIDER = {
2099
2154
  // Kling family — our `kling`→kling-2.6 (1000), `kling-turbo`→v2.5-turbo-pro (2500)
2100
2155
  "kling": 1e3,
@@ -2233,6 +2288,7 @@ var MODELS_WITH_REFERENCE_IMAGE_SUPPORT = /* @__PURE__ */ new Set([
2233
2288
  "nano-banana",
2234
2289
  "nano-banana-pro",
2235
2290
  "nano-banana-2",
2291
+ "nano-banana-2-lite",
2236
2292
  // T2I providers that auto-route to their i2i sibling when refs are attached
2237
2293
  "gpt-image",
2238
2294
  "gpt-image-2",
@@ -2240,6 +2296,7 @@ var MODELS_WITH_REFERENCE_IMAGE_SUPPORT = /* @__PURE__ */ new Set([
2240
2296
  "qwen",
2241
2297
  "seedream",
2242
2298
  "seedream-5-lite",
2299
+ "seedream-5-pro",
2243
2300
  "flux",
2244
2301
  "flux-flex",
2245
2302
  // Image editing / image-to-image (reference = source image)
@@ -2257,6 +2314,7 @@ var MODELS_WITH_REFERENCE_IMAGE_SUPPORT = /* @__PURE__ */ new Set([
2257
2314
  "qwen-edit",
2258
2315
  "seedream-edit",
2259
2316
  "seedream-5-lite-i2i",
2317
+ "seedream-5-pro-i2i",
2260
2318
  "grok-i2i",
2261
2319
  // Upscale / background ops (source acts as the reference)
2262
2320
  "recraft-remove-bg",
@@ -2277,6 +2335,7 @@ var T2I_TO_I2I_VARIANT = {
2277
2335
  "qwen": "qwen-i2i",
2278
2336
  "seedream": "seedream-edit",
2279
2337
  "seedream-5-lite": "seedream-5-lite-i2i",
2338
+ "seedream-5-pro": "seedream-5-pro-i2i",
2280
2339
  "flux": "flux-pro-i2i",
2281
2340
  "flux-flex": "flux-i2i"
2282
2341
  };
@@ -2286,6 +2345,7 @@ var REF_IMAGE_MAX_LIMITS = {
2286
2345
  "nano-banana": 8,
2287
2346
  "nano-banana-pro": 8,
2288
2347
  "nano-banana-2": 4,
2348
+ "nano-banana-2-lite": 10,
2289
2349
  "wan-2.7": 9,
2290
2350
  // Image-to-image (multi-source array)
2291
2351
  "nano-banana-edit": 8,
@@ -2295,6 +2355,7 @@ var REF_IMAGE_MAX_LIMITS = {
2295
2355
  "flux-pro-i2i": 4,
2296
2356
  "seedream-edit": 16,
2297
2357
  "seedream-5-lite-i2i": 16,
2358
+ "seedream-5-pro-i2i": 16,
2298
2359
  // Single-source i2i (one input image)
2299
2360
  "flux-kontext": 1,
2300
2361
  "flux-kontext-max": 1,
@@ -2336,6 +2397,8 @@ var VARIABLE_PRICING_MODELS = {
2336
2397
  "seedream-edit": "quality",
2337
2398
  "seedream-5-lite": "quality",
2338
2399
  "seedream-5-lite-i2i": "quality",
2400
+ "seedream-5-pro": "quality",
2401
+ "seedream-5-pro-i2i": "quality",
2339
2402
  "topaz-image-upscale": "resolution",
2340
2403
  "ideogram-edit": "rendering-speed",
2341
2404
  "ideogram-remix": "rendering-speed",
@@ -2344,7 +2407,7 @@ var VARIABLE_PRICING_MODELS = {
2344
2407
  "wan-2.7": "resolution",
2345
2408
  "wan-2.7-pro": "resolution"
2346
2409
  };
2347
- var HIGH_QUALITY_PROVIDERS = /* @__PURE__ */ new Set(["gpt-image", "gpt-image-i2i", "seedream", "seedream-edit", "seedream-5-lite", "seedream-5-lite-i2i"]);
2410
+ var HIGH_QUALITY_PROVIDERS = /* @__PURE__ */ new Set(["gpt-image", "gpt-image-i2i", "seedream", "seedream-edit", "seedream-5-lite", "seedream-5-lite-i2i", "seedream-5-pro", "seedream-5-pro-i2i"]);
2348
2411
  var TWO_K_RESOLUTION_PROVIDERS = /* @__PURE__ */ new Set(["flux", "flux-pro-i2i", "flux-flex", "flux-i2i"]);
2349
2412
  var RESOLUTION_2K_4K_TIERED_PROVIDERS = /* @__PURE__ */ new Set([
2350
2413
  "nano-banana-2",
@@ -2359,6 +2422,7 @@ var IMAGE_GEN_PROVIDERS = [
2359
2422
  "flux",
2360
2423
  "nano-banana-pro",
2361
2424
  "nano-banana-2",
2425
+ "nano-banana-2-lite",
2362
2426
  "grok",
2363
2427
  "gpt-image",
2364
2428
  "gpt-image-2",
@@ -2369,6 +2433,7 @@ var IMAGE_GEN_PROVIDERS = [
2369
2433
  "qwen",
2370
2434
  "seedream",
2371
2435
  "seedream-5-lite",
2436
+ "seedream-5-pro",
2372
2437
  "flux-flex",
2373
2438
  "flux-kontext",
2374
2439
  "flux-kontext-max",
@@ -2383,6 +2448,7 @@ var IMAGE_GEN_PROVIDERS = [
2383
2448
  var IMAGE_I2I_PROVIDERS = [
2384
2449
  "nano-banana",
2385
2450
  "nano-banana-2",
2451
+ "nano-banana-2-lite",
2386
2452
  "nano-banana-pro",
2387
2453
  "grok-i2i",
2388
2454
  "flux-i2i",
@@ -2396,6 +2462,7 @@ var IMAGE_I2I_PROVIDERS = [
2396
2462
  "qwen-edit",
2397
2463
  "seedream-edit",
2398
2464
  "seedream-5-lite-i2i",
2465
+ "seedream-5-pro-i2i",
2399
2466
  "flux-kontext",
2400
2467
  "flux-kontext-max",
2401
2468
  // Replicate Open (uncensored) — multi-image Kontext via Replicate
@@ -2689,10 +2756,12 @@ var IMAGE_MASK_MODE = {
2689
2756
  "nano-banana": "prompt",
2690
2757
  "nano-banana-pro": "prompt",
2691
2758
  "nano-banana-2": "prompt",
2759
+ "nano-banana-2-lite": "prompt",
2692
2760
  "gpt-image": "prompt",
2693
2761
  "gpt-image-2": "prompt",
2694
2762
  "seedream": "prompt",
2695
2763
  "seedream-5-lite": "prompt",
2764
+ "seedream-5-pro": "prompt",
2696
2765
  "qwen": "prompt",
2697
2766
  "flux-kontext": "prompt",
2698
2767
  "flux-kontext-max": "prompt",
@@ -2784,6 +2853,8 @@ var SEEDANCE_2_REF_LIMITS = {
2784
2853
  videos: 3,
2785
2854
  audio: 3
2786
2855
  };
2856
+ var SEEDANCE_2_R2V_MIN_REF_VIDEO_SEC = 1.8;
2857
+ var SEEDANCE_2_CONTINUATION_REF_SEC = 2;
2787
2858
  var SEEDANCE_2_EXTEND_STITCH = {
2788
2859
  /** Frames dropped from the END of the source clip (smart-cut FALLBACK —
2789
2860
  * used only when the PSNR boundary matcher finds no genuine match). */
@@ -2793,10 +2864,11 @@ var SEEDANCE_2_EXTEND_STITCH = {
2793
2864
  trimHeadFrames: 3,
2794
2865
  /** Boundary audio fade length (seconds), timeline-preserving. */
2795
2866
  audioFadeSec: 0.15,
2796
- /** Seconds of the source's TAIL passed as the @video_1 reference —
2797
- * spike-validated: a short tail keeps the model focused on continuing
2798
- * the boundary motion instead of re-staging the whole clip. */
2799
- referenceTailSeconds: 1
2867
+ /** Seconds of the source's TAIL passed as the @video_1 reference — short
2868
+ * keeps the model focused on continuing the boundary motion; the value is
2869
+ * floored by SEEDANCE_2_R2V_MIN_REF_VIDEO_SEC (the original spike's 1s
2870
+ * tail is now provider-rejected). */
2871
+ referenceTailSeconds: SEEDANCE_2_CONTINUATION_REF_SEC
2800
2872
  };
2801
2873
  var SEEDANCE_2_R2V_MAX_AUDIO_SEC_BY_PROVIDER = {
2802
2874
  "seedance-2-fast": 15.2
@@ -2874,9 +2946,22 @@ var VIDEO_AUDIO_CAPABILITY = {
2874
2946
  veo3: { mode: "native_speech", alwaysOn: true },
2875
2947
  "veo3.1": { mode: "native_speech", alwaysOn: true },
2876
2948
  veo3_lite: { mode: "native_speech", alwaysOn: true },
2877
- // Kling 2.6 / 3.0 — ambient sound/SFX toggle; not lip-synced speech. Cost-affecting.
2878
- kling: { mode: "ambient", field: "sound", affectsCost: true },
2879
- "kling-3.0": { mode: "ambient", field: "sound", affectsCost: true },
2949
+ // Kling 2.6 / 3.0 — native spoken dialogue + lip sync behind the `sound`
2950
+ // toggle (probe-verified on the KIE path 2026-07-16: scripted quoted lines
2951
+ // are spoken verbatim with articulated lips; the official Kling 2.6 audio
2952
+ // guide documents speech/dialogue/narration/singing with [Character@Voice]
2953
+ // binding, zh+en voices). Cost-affecting: `:audio` credit suffix.
2954
+ // kling-3.0's model default is sound ON (kie models.ts extraParams +
2955
+ // kling3-client `?? true`) → defaultOn keeps billing aligned with what an
2956
+ // intent-less request actually generates; kling 2.6 defaults OFF.
2957
+ kling: { mode: "native_speech", field: "sound", affectsCost: true },
2958
+ "kling-3.0": { mode: "native_speech", field: "sound", affectsCost: true, defaultOn: true },
2959
+ // Kling 3.0 Omni (Replicate kwaivgi/kling-v3-omni-video) — the Omni tier's
2960
+ // headline feature IS native dialogue (per-character voices, unified audio
2961
+ // timeline). Lever is Replicate's `generate_audio` (default true in our
2962
+ // provider config → defaultOn); audio is priced into the flat per-duration
2963
+ // rate, so NOT cost-affecting (no :audio composite).
2964
+ "kling-3-omni": { mode: "native_speech", field: "generateAudio", defaultOn: true },
2880
2965
  // Seedance 1.x — optional ambient audio (generate_audio); not dialogue.
2881
2966
  seedance: { mode: "ambient", field: "generateAudio" },
2882
2967
  // Seedance 2.0 — multimodal; lip-syncs to a supplied reference-audio track.
@@ -3638,7 +3723,8 @@ function buildVideoCreditModelIdentifier(provider, duration, sound, nodeType, mo
3638
3723
  if (!tiers) return effectiveProvider;
3639
3724
  const tier = tiers.find((t2) => durationSec <= t2.maxSeconds) ?? tiers[tiers.length - 1];
3640
3725
  let identifier = `${effectiveProvider}:${tier.suffix}`;
3641
- if (AUDIO_ADDON_PROVIDERS.has(effectiveProvider) && sound) {
3726
+ const soundOn = sound ?? getVideoAudioCapability(effectiveProvider).defaultOn === true;
3727
+ if (AUDIO_ADDON_PROVIDERS.has(effectiveProvider) && soundOn) {
3642
3728
  identifier += ":audio";
3643
3729
  }
3644
3730
  if (MODE_ADDON_PROVIDERS.has(effectiveProvider) && (mode === "high" || mode === "pro")) {
@@ -4230,6 +4316,7 @@ var LLM_MODELS = [
4230
4316
  kieFormat: "responses",
4231
4317
  kieSlugOrModel: "gpt-5-4",
4232
4318
  vendor: "openai",
4319
+ structuredOutputMode: "responses-json-schema",
4233
4320
  supportsImages: true,
4234
4321
  maxOutputTokens: 16384,
4235
4322
  reasoningEfforts: ["low", "medium", "high"]
@@ -4242,6 +4329,7 @@ var LLM_MODELS = [
4242
4329
  kieFormat: "responses",
4243
4330
  kieSlugOrModel: "gpt-5-5",
4244
4331
  vendor: "openai",
4332
+ structuredOutputMode: "responses-json-schema",
4245
4333
  supportsImages: true,
4246
4334
  maxOutputTokens: 16384,
4247
4335
  reasoningEfforts: ["none", "low", "medium", "high", "xhigh", "max"],
@@ -4255,6 +4343,7 @@ var LLM_MODELS = [
4255
4343
  kieFormat: "responses",
4256
4344
  kieSlugOrModel: "gpt-5-6-luna",
4257
4345
  vendor: "openai",
4346
+ structuredOutputMode: "responses-json-schema",
4258
4347
  supportsImages: true,
4259
4348
  maxOutputTokens: 16384,
4260
4349
  reasoningEfforts: ["none", "low", "medium", "high", "xhigh", "max"],
@@ -4268,6 +4357,7 @@ var LLM_MODELS = [
4268
4357
  kieFormat: "responses",
4269
4358
  kieSlugOrModel: "gpt-5-6-terra",
4270
4359
  vendor: "openai",
4360
+ structuredOutputMode: "responses-json-schema",
4271
4361
  supportsImages: true,
4272
4362
  maxOutputTokens: 16384,
4273
4363
  reasoningEfforts: ["none", "low", "medium", "high", "xhigh", "max"],
@@ -4281,6 +4371,7 @@ var LLM_MODELS = [
4281
4371
  kieFormat: "responses",
4282
4372
  kieSlugOrModel: "gpt-5-6-sol",
4283
4373
  vendor: "openai",
4374
+ structuredOutputMode: "responses-json-schema",
4284
4375
  supportsImages: true,
4285
4376
  maxOutputTokens: 16384,
4286
4377
  reasoningEfforts: ["none", "low", "medium", "high", "xhigh", "max"],
@@ -4396,6 +4487,19 @@ function resolveLlmCreditId(feature, body) {
4396
4487
  return buildLlmCreditIdentifier(feature, b?.llmModel, b?.reasoningEffort);
4397
4488
  }
4398
4489
  var VIDEO_ANALYSIS_LLM_MODELS = LLM_MODELS.filter((m) => getLlmModalityCaps(m.id).video && getLlmModalityCaps(m.id).audio).map((m) => m.id);
4490
+ var VIDEO_ANALYSIS_TIERS = { fast: "gemini-3-flash", pro: "gemini-3.1-pro" };
4491
+ var VIDEO_ANALYSIS_TIER_ORDER = ["pro", "fast"];
4492
+ var DEFAULT_VIDEO_ANALYSIS_TIER = "pro";
4493
+ var DEFAULT_VIDEO_ANALYSIS_MODEL = VIDEO_ANALYSIS_TIERS[DEFAULT_VIDEO_ANALYSIS_TIER];
4494
+ var VIDEO_ANALYSIS_TIER_LABELS = { fast: "Fast", pro: "Pro" };
4495
+ function isVideoAnalysisTier(v) {
4496
+ return Object.prototype.hasOwnProperty.call(VIDEO_ANALYSIS_TIERS, v);
4497
+ }
4498
+ function resolveVideoAnalysisModel(input) {
4499
+ if (input && isVideoAnalysisTier(input)) return VIDEO_ANALYSIS_TIERS[input];
4500
+ if (input && VIDEO_ANALYSIS_LLM_MODELS.includes(input)) return input;
4501
+ return DEFAULT_VIDEO_ANALYSIS_MODEL;
4502
+ }
4399
4503
 
4400
4504
  // src/progress-curve.ts
4401
4505
  function calculateProgress(elapsedMs, estimatedMs, exponent = 2) {
@@ -6957,6 +7061,8 @@ var QUALITY_MAP = {
6957
7061
  "seedream-edit": { field: "quality", values: { low: "basic", mid: "basic", high: "high" } },
6958
7062
  "seedream-5-lite": { field: "quality", values: { low: "basic", mid: "basic", high: "high" } },
6959
7063
  "seedream-5-lite-i2i": { field: "quality", values: { low: "basic", mid: "basic", high: "high" } },
7064
+ "seedream-5-pro": { field: "quality", values: { low: "basic", mid: "basic", high: "high" } },
7065
+ "seedream-5-pro-i2i": { field: "quality", values: { low: "basic", mid: "basic", high: "high" } },
6960
7066
  // Video gen — resolution-style (720p/1080p)
6961
7067
  "veo3": { field: "resolution", values: { low: "720p", mid: "1080p", high: "1080p" } },
6962
7068
  "veo3.1": { field: "resolution", values: { low: "720p", mid: "1080p", high: "1080p" } },
@@ -7006,7 +7112,8 @@ function mapAspectRatio(provider, ratio) {
7006
7112
  var GENERATE_IMAGE_PROVIDER_TO_MODEL = {
7007
7113
  "nano-banana": "gemini-2.5-flash-image",
7008
7114
  "nano-banana-pro": "gemini-2.5-flash-image",
7009
- "nano-banana-2": "gemini-2.5-flash-image"
7115
+ "nano-banana-2": "gemini-2.5-flash-image",
7116
+ "nano-banana-2-lite": "gemini-3.1-flash-lite-image"
7010
7117
  };
7011
7118
  function deriveLinkedFields(nodeType, value) {
7012
7119
  if (nodeType === "generate-image") {
@@ -11921,10 +12028,9 @@ var entitySlotSchema = zod.z.object({
11921
12028
  role: zod.z.string().min(1),
11922
12029
  description: zod.z.string().min(1)
11923
12030
  });
11924
- var audioSchema = zod.z.object({
11925
- mode: zod.z.enum(["speech", "music", "sfx", "silence"]),
11926
- content: zod.z.string(),
11927
- // speech: verbatim quote; music/sfx: gen-ready description; silence: "" allowed
12031
+ var audioLayerSchema = zod.z.object({
12032
+ mode: zod.z.enum(["speech", "music", "sfx"]),
12033
+ content: zod.z.string().min(1),
11928
12034
  voice: zod.z.string().optional()
11929
12035
  });
11930
12036
  var windowSceneBase = zod.z.object({
@@ -11935,7 +12041,8 @@ var windowSceneBase = zod.z.object({
11935
12041
  camera: zod.z.string(),
11936
12042
  visual: zod.z.string().min(1),
11937
12043
  transitionOut: zod.z.enum(["cut", "fade", "wipe", "whip"]).optional(),
11938
- audio: audioSchema
12044
+ // Array of concurrent layers (music + speech + sfx together); [] = silence.
12045
+ audio: zod.z.array(audioLayerSchema)
11939
12046
  });
11940
12047
  var windowSceneSchema = windowSceneBase.refine((s) => s.endSec > s.startSec, { message: "endSec must be > startSec" });
11941
12048
  var windowAnalysisSchema = zod.z.object({
@@ -12123,6 +12230,8 @@ exports.DEFAULT_PANEL_COUNT = DEFAULT_PANEL_COUNT;
12123
12230
  exports.DEFAULT_REF_IMAGE_MAX = DEFAULT_REF_IMAGE_MAX;
12124
12231
  exports.DEFAULT_SECTIONS = DEFAULT_SECTIONS;
12125
12232
  exports.DEFAULT_USAGE_MODE = DEFAULT_USAGE_MODE;
12233
+ exports.DEFAULT_VIDEO_ANALYSIS_MODEL = DEFAULT_VIDEO_ANALYSIS_MODEL;
12234
+ exports.DEFAULT_VIDEO_ANALYSIS_TIER = DEFAULT_VIDEO_ANALYSIS_TIER;
12126
12235
  exports.DEFAULT_VIDEO_CLIP_COST = DEFAULT_VIDEO_CLIP_COST;
12127
12236
  exports.DEFAULT_VIDEO_DURATION_SEC = DEFAULT_VIDEO_DURATION_SEC;
12128
12237
  exports.DEFAULT_VIDEO_PROVIDER = DEFAULT_VIDEO_PROVIDER;
@@ -12211,6 +12320,7 @@ exports.LLM_MODALITY_CAPS = LLM_MODALITY_CAPS;
12211
12320
  exports.LLM_MODELS = LLM_MODELS;
12212
12321
  exports.LLM_MODEL_IDS = LLM_MODEL_IDS;
12213
12322
  exports.LLM_REASONING_EFFORTS = LLM_REASONING_EFFORTS;
12323
+ exports.LLM_TEXT_INPUT_MAX = LLM_TEXT_INPUT_MAX;
12214
12324
  exports.LOCATION_ASSET_TYPES = LOCATION_ASSET_TYPES;
12215
12325
  exports.LOCATION_ASSET_VARIANTS = LOCATION_ASSET_VARIANTS;
12216
12326
  exports.LOCATION_ATMOSPHERE_PROVIDERS = LOCATION_ATMOSPHERE_PROVIDERS;
@@ -12324,9 +12434,11 @@ exports.SCRIPT_PROVIDERS = SCRIPT_PROVIDERS;
12324
12434
  exports.SEASONS = SEASONS;
12325
12435
  exports.SECTION_BOARD = SECTION_BOARD;
12326
12436
  exports.SECTION_KINDS = SECTION_KINDS;
12437
+ exports.SEEDANCE_2_CONTINUATION_REF_SEC = SEEDANCE_2_CONTINUATION_REF_SEC;
12327
12438
  exports.SEEDANCE_2_EXTEND_STITCH = SEEDANCE_2_EXTEND_STITCH;
12328
12439
  exports.SEEDANCE_2_PROVIDERS = SEEDANCE_2_PROVIDERS;
12329
12440
  exports.SEEDANCE_2_R2V_MAX_AUDIO_SEC_BY_PROVIDER = SEEDANCE_2_R2V_MAX_AUDIO_SEC_BY_PROVIDER;
12441
+ exports.SEEDANCE_2_R2V_MIN_REF_VIDEO_SEC = SEEDANCE_2_R2V_MIN_REF_VIDEO_SEC;
12330
12442
  exports.SEEDANCE_2_REF_LIMITS = SEEDANCE_2_REF_LIMITS;
12331
12443
  exports.SEEDANCE_LIP_SYNC_PROVIDERS = SEEDANCE_LIP_SYNC_PROVIDERS;
12332
12444
  exports.SEED_SUPPORT = SEED_SUPPORT;
@@ -12394,6 +12506,9 @@ exports.VIDEO_ANALYSIS_ENTITY_SOURCES = VIDEO_ANALYSIS_ENTITY_SOURCES;
12394
12506
  exports.VIDEO_ANALYSIS_LLM_MODELS = VIDEO_ANALYSIS_LLM_MODELS;
12395
12507
  exports.VIDEO_ANALYSIS_MAX_DURATION_SEC = VIDEO_ANALYSIS_MAX_DURATION_SEC;
12396
12508
  exports.VIDEO_ANALYSIS_MAX_SCENE_SEC = VIDEO_ANALYSIS_MAX_SCENE_SEC;
12509
+ exports.VIDEO_ANALYSIS_TIERS = VIDEO_ANALYSIS_TIERS;
12510
+ exports.VIDEO_ANALYSIS_TIER_LABELS = VIDEO_ANALYSIS_TIER_LABELS;
12511
+ exports.VIDEO_ANALYSIS_TIER_ORDER = VIDEO_ANALYSIS_TIER_ORDER;
12397
12512
  exports.VIDEO_ANALYSIS_WINDOW = VIDEO_ANALYSIS_WINDOW;
12398
12513
  exports.VIDEO_AUDIO_CAPABILITY = VIDEO_AUDIO_CAPABILITY;
12399
12514
  exports.VIDEO_CLIP_CREDITS = VIDEO_CLIP_CREDITS;
@@ -12588,6 +12703,7 @@ exports.isSeedance2Provider = isSeedance2Provider;
12588
12703
  exports.isTiltDirection = isTiltDirection;
12589
12704
  exports.isUsageMode = isUsageMode;
12590
12705
  exports.isVeoProvider = isVeoProvider;
12706
+ exports.isVideoAnalysisTier = isVideoAnalysisTier;
12591
12707
  exports.jsonResultToList = jsonResultToList;
12592
12708
  exports.listBoardTemplates = listBoardTemplates;
12593
12709
  exports.listModels = listModels;
@@ -12665,6 +12781,7 @@ exports.resolveSeparator = resolveSeparator;
12665
12781
  exports.resolveSheetSections = resolveSheetSections;
12666
12782
  exports.resolveSourceThroughConnectedList = resolveSourceThroughConnectedList;
12667
12783
  exports.resolveSwitchXCreditId = resolveSwitchXCreditId;
12784
+ exports.resolveVideoAnalysisModel = resolveVideoAnalysisModel;
12668
12785
  exports.resolveVideoProviderForMode = resolveVideoProviderForMode;
12669
12786
  exports.resolveXfadeName = resolveXfadeName;
12670
12787
  exports.rewriteSlotTokens = rewriteSlotTokens;