@nodaro/shared 1.7.0 → 1.10.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,13 +2853,22 @@ 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
- /** Frames dropped from the END of the source clip. */
2859
+ /** Frames dropped from the END of the source clip (smart-cut FALLBACK —
2860
+ * used only when the PSNR boundary matcher finds no genuine match). */
2789
2861
  trimTailFrames: 4,
2790
- /** Frames dropped from the START of the generated extension. */
2862
+ /** Frames dropped from the START of the generated extension (smart-cut
2863
+ * fallback, see above). */
2791
2864
  trimHeadFrames: 3,
2792
2865
  /** Boundary audio fade length (seconds), timeline-preserving. */
2793
- audioFadeSec: 0.15
2866
+ audioFadeSec: 0.15,
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
2794
2872
  };
2795
2873
  var SEEDANCE_2_R2V_MAX_AUDIO_SEC_BY_PROVIDER = {
2796
2874
  "seedance-2-fast": 15.2
@@ -4134,6 +4212,9 @@ function isCollectInEdge(e) {
4134
4212
  }
4135
4213
 
4136
4214
  // src/llm-models.ts
4215
+ var LLM_REASONING_EFFORTS = ["none", "low", "medium", "high", "xhigh", "max"];
4216
+ var EFFORT_TIER_BUMP = /* @__PURE__ */ new Set(["xhigh", "max"]);
4217
+ var EFFORT_RANK = { none: 0, low: 1, medium: 2, high: 3, xhigh: 4, max: 5 };
4137
4218
  var LLM_MODELS = [
4138
4219
  {
4139
4220
  id: "gemini-3-flash",
@@ -4171,7 +4252,8 @@ var LLM_MODELS = [
4171
4252
  structuredOutputMode: "anthropic-tool",
4172
4253
  supportsImages: true,
4173
4254
  maxOutputTokens: 16384,
4174
- directFallbackModel: "claude-sonnet-4-6"
4255
+ directFallbackModel: "claude-sonnet-4-6",
4256
+ reasoningEfforts: ["low", "medium", "high", "max"]
4175
4257
  },
4176
4258
  {
4177
4259
  id: "gpt-5.2",
@@ -4207,7 +4289,10 @@ var LLM_MODELS = [
4207
4289
  structuredOutputMode: "anthropic-tool",
4208
4290
  supportsImages: true,
4209
4291
  maxOutputTokens: 16384,
4210
- directFallbackModel: "claude-opus-4-7"
4292
+ directFallbackModel: "claude-opus-4-7",
4293
+ reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
4294
+ supportsTemperature: false,
4295
+ preferKie: true
4211
4296
  },
4212
4297
  {
4213
4298
  id: "gpt-5.4",
@@ -4217,8 +4302,99 @@ var LLM_MODELS = [
4217
4302
  kieFormat: "responses",
4218
4303
  kieSlugOrModel: "gpt-5-4",
4219
4304
  vendor: "openai",
4305
+ structuredOutputMode: "responses-json-schema",
4220
4306
  supportsImages: true,
4221
- maxOutputTokens: 16384
4307
+ maxOutputTokens: 16384,
4308
+ reasoningEfforts: ["low", "medium", "high"]
4309
+ },
4310
+ {
4311
+ id: "gpt-5.5",
4312
+ displayName: "GPT-5.5",
4313
+ desc: "Previous flagship GPT, deep reasoning",
4314
+ tier: "premium",
4315
+ kieFormat: "responses",
4316
+ kieSlugOrModel: "gpt-5-5",
4317
+ vendor: "openai",
4318
+ structuredOutputMode: "responses-json-schema",
4319
+ supportsImages: true,
4320
+ maxOutputTokens: 16384,
4321
+ reasoningEfforts: ["none", "low", "medium", "high", "xhigh", "max"],
4322
+ supportsTemperature: false
4323
+ },
4324
+ {
4325
+ id: "gpt-5.6-luna",
4326
+ displayName: "GPT-5.6 Luna",
4327
+ desc: "Fastest GPT-5.6, high-volume workloads",
4328
+ tier: "economy",
4329
+ kieFormat: "responses",
4330
+ kieSlugOrModel: "gpt-5-6-luna",
4331
+ vendor: "openai",
4332
+ structuredOutputMode: "responses-json-schema",
4333
+ supportsImages: true,
4334
+ maxOutputTokens: 16384,
4335
+ reasoningEfforts: ["none", "low", "medium", "high", "xhigh", "max"],
4336
+ supportsTemperature: false
4337
+ },
4338
+ {
4339
+ id: "gpt-5.6-terra",
4340
+ displayName: "GPT-5.6 Terra",
4341
+ desc: "Balanced GPT-5.6 for production work",
4342
+ tier: "standard",
4343
+ kieFormat: "responses",
4344
+ kieSlugOrModel: "gpt-5-6-terra",
4345
+ vendor: "openai",
4346
+ structuredOutputMode: "responses-json-schema",
4347
+ supportsImages: true,
4348
+ maxOutputTokens: 16384,
4349
+ reasoningEfforts: ["none", "low", "medium", "high", "xhigh", "max"],
4350
+ supportsTemperature: false
4351
+ },
4352
+ {
4353
+ id: "gpt-5.6-sol",
4354
+ displayName: "GPT-5.6 Sol",
4355
+ desc: "Flagship GPT-5.6, deepest reasoning",
4356
+ tier: "premium",
4357
+ kieFormat: "responses",
4358
+ kieSlugOrModel: "gpt-5-6-sol",
4359
+ vendor: "openai",
4360
+ structuredOutputMode: "responses-json-schema",
4361
+ supportsImages: true,
4362
+ maxOutputTokens: 16384,
4363
+ reasoningEfforts: ["none", "low", "medium", "high", "xhigh", "max"],
4364
+ supportsTemperature: false
4365
+ },
4366
+ // grok-4.5 deferred — KIE chat endpoint not yet live (2026-07-13); add entry + rate row + docs when it activates.
4367
+ {
4368
+ id: "claude-sonnet-5",
4369
+ displayName: "Claude Sonnet 5",
4370
+ desc: "Near-Opus quality at Sonnet cost",
4371
+ tier: "standard",
4372
+ kieFormat: "messages",
4373
+ kieSlugOrModel: "claude-sonnet-5",
4374
+ vendor: "anthropic",
4375
+ structuredOutputMode: "anthropic-tool",
4376
+ supportsImages: true,
4377
+ maxOutputTokens: 16384,
4378
+ directFallbackModel: "claude-sonnet-5",
4379
+ reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
4380
+ supportsTemperature: false,
4381
+ preferKie: true
4382
+ },
4383
+ {
4384
+ id: "claude-opus-4.8",
4385
+ displayName: "Claude Opus 4.8",
4386
+ desc: "Most capable Claude, long-horizon work",
4387
+ tier: "premium",
4388
+ kieFormat: "messages",
4389
+ kieSlugOrModel: "claude-opus-4-8",
4390
+ vendor: "anthropic",
4391
+ structuredOutputMode: "anthropic-tool",
4392
+ supportsImages: true,
4393
+ maxOutputTokens: 16384,
4394
+ directFallbackModel: "claude-opus-4-8",
4395
+ reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
4396
+ supportsTemperature: false,
4397
+ preferKie: true
4222
4398
  }
4223
4399
  ];
4224
4400
  var LLM_MODEL_IDS = LLM_MODELS.map((m) => m.id);
@@ -4252,7 +4428,13 @@ var LLM_MODALITY_CAPS = {
4252
4428
  "claude-sonnet-4.6": { image: true, video: false, audio: false },
4253
4429
  "claude-opus-4.7": { image: true, video: false, audio: false },
4254
4430
  "gpt-5.2": { image: true, video: false, audio: false },
4255
- "gpt-5.4": { image: true, video: false, audio: false }
4431
+ "gpt-5.4": { image: true, video: false, audio: false },
4432
+ "gpt-5.5": { image: true, video: false, audio: false },
4433
+ "gpt-5.6-luna": { image: true, video: false, audio: false },
4434
+ "gpt-5.6-terra": { image: true, video: false, audio: false },
4435
+ "gpt-5.6-sol": { image: true, video: false, audio: false },
4436
+ "claude-sonnet-5": { image: true, video: false, audio: false },
4437
+ "claude-opus-4.8": { image: true, video: false, audio: false }
4256
4438
  };
4257
4439
  function getLlmModalityCaps(modelId) {
4258
4440
  if (!modelId) return { image: true, video: false, audio: false };
@@ -4264,17 +4446,46 @@ function getLlmModel(id) {
4264
4446
  function getLlmTier(id) {
4265
4447
  return getLlmModel(id)?.tier ?? "standard";
4266
4448
  }
4267
- function buildLlmCreditIdentifier(feature, modelId) {
4449
+ function effectiveReasoningEffort(modelId, requested) {
4450
+ if (!requested || !(requested in EFFORT_RANK)) return void 0;
4451
+ const levels = getLlmModel(modelId ?? "")?.reasoningEfforts;
4452
+ if (!levels || levels.length === 0) return void 0;
4453
+ const req = requested;
4454
+ let best;
4455
+ for (const l of levels) {
4456
+ if (EFFORT_RANK[l] <= EFFORT_RANK[req] && (best === void 0 || EFFORT_RANK[l] > EFFORT_RANK[best])) best = l;
4457
+ }
4458
+ return best;
4459
+ }
4460
+ function buildLlmCreditIdentifier(feature, modelId, reasoningEffort) {
4268
4461
  if (!modelId) return feature;
4269
- const tier = getLlmTier(modelId);
4462
+ let tier = getLlmTier(modelId);
4463
+ const eff = effectiveReasoningEffort(modelId, reasoningEffort);
4464
+ if (eff !== void 0 && EFFORT_TIER_BUMP.has(eff)) {
4465
+ if (tier === "economy") tier = "standard";
4466
+ else if (tier === "standard") tier = "premium";
4467
+ }
4270
4468
  if (tier === "standard") return feature;
4271
4469
  return `${feature}:${tier}`;
4272
4470
  }
4273
4471
  function resolveLlmCreditId(feature, body) {
4274
- const llmModel = body?.llmModel;
4275
- return buildLlmCreditIdentifier(feature, llmModel);
4472
+ const b = body;
4473
+ return buildLlmCreditIdentifier(feature, b?.llmModel, b?.reasoningEffort);
4276
4474
  }
4277
4475
  var VIDEO_ANALYSIS_LLM_MODELS = LLM_MODELS.filter((m) => getLlmModalityCaps(m.id).video && getLlmModalityCaps(m.id).audio).map((m) => m.id);
4476
+ var VIDEO_ANALYSIS_TIERS = { fast: "gemini-3-flash", pro: "gemini-3.1-pro" };
4477
+ var VIDEO_ANALYSIS_TIER_ORDER = ["pro", "fast"];
4478
+ var DEFAULT_VIDEO_ANALYSIS_TIER = "pro";
4479
+ var DEFAULT_VIDEO_ANALYSIS_MODEL = VIDEO_ANALYSIS_TIERS[DEFAULT_VIDEO_ANALYSIS_TIER];
4480
+ var VIDEO_ANALYSIS_TIER_LABELS = { fast: "Fast", pro: "Pro" };
4481
+ function isVideoAnalysisTier(v) {
4482
+ return Object.prototype.hasOwnProperty.call(VIDEO_ANALYSIS_TIERS, v);
4483
+ }
4484
+ function resolveVideoAnalysisModel(input) {
4485
+ if (input && isVideoAnalysisTier(input)) return VIDEO_ANALYSIS_TIERS[input];
4486
+ if (input && VIDEO_ANALYSIS_LLM_MODELS.includes(input)) return input;
4487
+ return DEFAULT_VIDEO_ANALYSIS_MODEL;
4488
+ }
4278
4489
 
4279
4490
  // src/progress-curve.ts
4280
4491
  function calculateProgress(elapsedMs, estimatedMs, exponent = 2) {
@@ -6836,6 +7047,8 @@ var QUALITY_MAP = {
6836
7047
  "seedream-edit": { field: "quality", values: { low: "basic", mid: "basic", high: "high" } },
6837
7048
  "seedream-5-lite": { field: "quality", values: { low: "basic", mid: "basic", high: "high" } },
6838
7049
  "seedream-5-lite-i2i": { field: "quality", values: { low: "basic", mid: "basic", high: "high" } },
7050
+ "seedream-5-pro": { field: "quality", values: { low: "basic", mid: "basic", high: "high" } },
7051
+ "seedream-5-pro-i2i": { field: "quality", values: { low: "basic", mid: "basic", high: "high" } },
6839
7052
  // Video gen — resolution-style (720p/1080p)
6840
7053
  "veo3": { field: "resolution", values: { low: "720p", mid: "1080p", high: "1080p" } },
6841
7054
  "veo3.1": { field: "resolution", values: { low: "720p", mid: "1080p", high: "1080p" } },
@@ -6885,7 +7098,8 @@ function mapAspectRatio(provider, ratio) {
6885
7098
  var GENERATE_IMAGE_PROVIDER_TO_MODEL = {
6886
7099
  "nano-banana": "gemini-2.5-flash-image",
6887
7100
  "nano-banana-pro": "gemini-2.5-flash-image",
6888
- "nano-banana-2": "gemini-2.5-flash-image"
7101
+ "nano-banana-2": "gemini-2.5-flash-image",
7102
+ "nano-banana-2-lite": "gemini-3.1-flash-lite-image"
6889
7103
  };
6890
7104
  function deriveLinkedFields(nodeType, value) {
6891
7105
  if (nodeType === "generate-image") {
@@ -6907,6 +7121,12 @@ var NODE_MAPPABLE_FIELDS = {
6907
7121
  // for back-compat with un-migrated workflow JSON). Mirrors text-to-video so
6908
7122
  // fieldMappings/{} injection AND missing-ref detection work on the live node.
6909
7123
  "generate-video": ["prompt", "negativePrompt"],
7124
+ // Trimmed multi-segment stitch variant of generate-video — prompt only, no
7125
+ // negativePrompt field on the node.
7126
+ "generate-video-pro": ["prompt"],
7127
+ // Span-replace sibling of generate-video-pro — prompt only, no
7128
+ // negativePrompt field on the node.
7129
+ "edit-video-pro": ["prompt"],
6910
7130
  "video-analysis": ["analysisFocus", "youtubeUrl"],
6911
7131
  "video-to-video": ["prompt"],
6912
7132
  "text-to-speech": ["directText"],
@@ -10858,6 +11078,16 @@ var VIDEO_PRODUCER_TYPES = /* @__PURE__ */ new Set([
10858
11078
  // through to the imageUrl/videoUrl/audioUrl/text default and downstream consumers
10859
11079
  // could silently misroute the output.
10860
11080
  "generate-video",
11081
+ // Generate Video Pro — Seedance-2-family multi-segment stitch variant of
11082
+ // generate-video (same "emits videoUrl" contract; a trimmed provider +
11083
+ // handle set). Must mirror generate-video here or its output can't connect
11084
+ // downstream (the recurring "cannot connect the outputs" bug class).
11085
+ "generate-video-pro",
11086
+ // Edit Video Pro — Seedance-2-family span-replace sibling of generate-
11087
+ // video-pro (same "emits videoUrl" contract; source video + prompt in,
11088
+ // ONE video out). Must mirror generate-video-pro here or its output can't
11089
+ // connect downstream (the recurring "cannot connect the outputs" bug class).
11090
+ "edit-video-pro",
10861
11091
  "upload-video",
10862
11092
  "youtube-video",
10863
11093
  "combine-videos",
@@ -11784,10 +12014,9 @@ var entitySlotSchema = zod.z.object({
11784
12014
  role: zod.z.string().min(1),
11785
12015
  description: zod.z.string().min(1)
11786
12016
  });
11787
- var audioSchema = zod.z.object({
11788
- mode: zod.z.enum(["speech", "music", "sfx", "silence"]),
11789
- content: zod.z.string(),
11790
- // speech: verbatim quote; music/sfx: gen-ready description; silence: "" allowed
12017
+ var audioLayerSchema = zod.z.object({
12018
+ mode: zod.z.enum(["speech", "music", "sfx"]),
12019
+ content: zod.z.string().min(1),
11791
12020
  voice: zod.z.string().optional()
11792
12021
  });
11793
12022
  var windowSceneBase = zod.z.object({
@@ -11798,7 +12027,8 @@ var windowSceneBase = zod.z.object({
11798
12027
  camera: zod.z.string(),
11799
12028
  visual: zod.z.string().min(1),
11800
12029
  transitionOut: zod.z.enum(["cut", "fade", "wipe", "whip"]).optional(),
11801
- audio: audioSchema
12030
+ // Array of concurrent layers (music + speech + sfx together); [] = silence.
12031
+ audio: zod.z.array(audioLayerSchema)
11802
12032
  });
11803
12033
  var windowSceneSchema = windowSceneBase.refine((s) => s.endSec > s.startSec, { message: "endSec must be > startSec" });
11804
12034
  var windowAnalysisSchema = zod.z.object({
@@ -11986,6 +12216,8 @@ exports.DEFAULT_PANEL_COUNT = DEFAULT_PANEL_COUNT;
11986
12216
  exports.DEFAULT_REF_IMAGE_MAX = DEFAULT_REF_IMAGE_MAX;
11987
12217
  exports.DEFAULT_SECTIONS = DEFAULT_SECTIONS;
11988
12218
  exports.DEFAULT_USAGE_MODE = DEFAULT_USAGE_MODE;
12219
+ exports.DEFAULT_VIDEO_ANALYSIS_MODEL = DEFAULT_VIDEO_ANALYSIS_MODEL;
12220
+ exports.DEFAULT_VIDEO_ANALYSIS_TIER = DEFAULT_VIDEO_ANALYSIS_TIER;
11989
12221
  exports.DEFAULT_VIDEO_CLIP_COST = DEFAULT_VIDEO_CLIP_COST;
11990
12222
  exports.DEFAULT_VIDEO_DURATION_SEC = DEFAULT_VIDEO_DURATION_SEC;
11991
12223
  exports.DEFAULT_VIDEO_PROVIDER = DEFAULT_VIDEO_PROVIDER;
@@ -11995,6 +12227,7 @@ exports.DETAIL_VARIANTS = DETAIL_VARIANTS;
11995
12227
  exports.DURATION_PRICED_PROVIDERS = DURATION_PRICED_PROVIDERS;
11996
12228
  exports.DYNAMIC_PRODUCER_TYPES = DYNAMIC_PRODUCER_TYPES;
11997
12229
  exports.DetectionResultSchema = DetectionResultSchema;
12230
+ exports.EFFORT_TIER_BUMP = EFFORT_TIER_BUMP;
11998
12231
  exports.EMOTIONAL_BEAT = EMOTIONAL_BEAT;
11999
12232
  exports.ENTITY_ASPECT_DEFAULTS = ENTITY_ASPECT_DEFAULTS;
12000
12233
  exports.ENTITY_IMAGE_HANDLE_TYPES = ENTITY_IMAGE_HANDLE_TYPES;
@@ -12072,6 +12305,8 @@ exports.LLM_FEATURE_DEFAULTS = LLM_FEATURE_DEFAULTS;
12072
12305
  exports.LLM_MODALITY_CAPS = LLM_MODALITY_CAPS;
12073
12306
  exports.LLM_MODELS = LLM_MODELS;
12074
12307
  exports.LLM_MODEL_IDS = LLM_MODEL_IDS;
12308
+ exports.LLM_REASONING_EFFORTS = LLM_REASONING_EFFORTS;
12309
+ exports.LLM_TEXT_INPUT_MAX = LLM_TEXT_INPUT_MAX;
12075
12310
  exports.LOCATION_ASSET_TYPES = LOCATION_ASSET_TYPES;
12076
12311
  exports.LOCATION_ASSET_VARIANTS = LOCATION_ASSET_VARIANTS;
12077
12312
  exports.LOCATION_ATMOSPHERE_PROVIDERS = LOCATION_ATMOSPHERE_PROVIDERS;
@@ -12185,8 +12420,11 @@ exports.SCRIPT_PROVIDERS = SCRIPT_PROVIDERS;
12185
12420
  exports.SEASONS = SEASONS;
12186
12421
  exports.SECTION_BOARD = SECTION_BOARD;
12187
12422
  exports.SECTION_KINDS = SECTION_KINDS;
12423
+ exports.SEEDANCE_2_CONTINUATION_REF_SEC = SEEDANCE_2_CONTINUATION_REF_SEC;
12188
12424
  exports.SEEDANCE_2_EXTEND_STITCH = SEEDANCE_2_EXTEND_STITCH;
12425
+ exports.SEEDANCE_2_PROVIDERS = SEEDANCE_2_PROVIDERS;
12189
12426
  exports.SEEDANCE_2_R2V_MAX_AUDIO_SEC_BY_PROVIDER = SEEDANCE_2_R2V_MAX_AUDIO_SEC_BY_PROVIDER;
12427
+ exports.SEEDANCE_2_R2V_MIN_REF_VIDEO_SEC = SEEDANCE_2_R2V_MIN_REF_VIDEO_SEC;
12190
12428
  exports.SEEDANCE_2_REF_LIMITS = SEEDANCE_2_REF_LIMITS;
12191
12429
  exports.SEEDANCE_LIP_SYNC_PROVIDERS = SEEDANCE_LIP_SYNC_PROVIDERS;
12192
12430
  exports.SEED_SUPPORT = SEED_SUPPORT;
@@ -12254,6 +12492,9 @@ exports.VIDEO_ANALYSIS_ENTITY_SOURCES = VIDEO_ANALYSIS_ENTITY_SOURCES;
12254
12492
  exports.VIDEO_ANALYSIS_LLM_MODELS = VIDEO_ANALYSIS_LLM_MODELS;
12255
12493
  exports.VIDEO_ANALYSIS_MAX_DURATION_SEC = VIDEO_ANALYSIS_MAX_DURATION_SEC;
12256
12494
  exports.VIDEO_ANALYSIS_MAX_SCENE_SEC = VIDEO_ANALYSIS_MAX_SCENE_SEC;
12495
+ exports.VIDEO_ANALYSIS_TIERS = VIDEO_ANALYSIS_TIERS;
12496
+ exports.VIDEO_ANALYSIS_TIER_LABELS = VIDEO_ANALYSIS_TIER_LABELS;
12497
+ exports.VIDEO_ANALYSIS_TIER_ORDER = VIDEO_ANALYSIS_TIER_ORDER;
12257
12498
  exports.VIDEO_ANALYSIS_WINDOW = VIDEO_ANALYSIS_WINDOW;
12258
12499
  exports.VIDEO_AUDIO_CAPABILITY = VIDEO_AUDIO_CAPABILITY;
12259
12500
  exports.VIDEO_CLIP_CREDITS = VIDEO_CLIP_CREDITS;
@@ -12351,6 +12592,7 @@ exports.describeEdgeBehavior = describeEdgeBehavior;
12351
12592
  exports.describeMaskRegion = describeMaskRegion;
12352
12593
  exports.describeSlotControl = describeSlotControl;
12353
12594
  exports.durationsByMode = durationsByMode;
12595
+ exports.effectiveReasoningEffort = effectiveReasoningEffort;
12354
12596
  exports.encodeProviderItem = encodeProviderItem;
12355
12597
  exports.ensureLocaleCatalogLoaded = ensureLocaleCatalogLoaded;
12356
12598
  exports.entitySlotSchema = entitySlotSchema;
@@ -12447,6 +12689,7 @@ exports.isSeedance2Provider = isSeedance2Provider;
12447
12689
  exports.isTiltDirection = isTiltDirection;
12448
12690
  exports.isUsageMode = isUsageMode;
12449
12691
  exports.isVeoProvider = isVeoProvider;
12692
+ exports.isVideoAnalysisTier = isVideoAnalysisTier;
12450
12693
  exports.jsonResultToList = jsonResultToList;
12451
12694
  exports.listBoardTemplates = listBoardTemplates;
12452
12695
  exports.listModels = listModels;
@@ -12524,6 +12767,7 @@ exports.resolveSeparator = resolveSeparator;
12524
12767
  exports.resolveSheetSections = resolveSheetSections;
12525
12768
  exports.resolveSourceThroughConnectedList = resolveSourceThroughConnectedList;
12526
12769
  exports.resolveSwitchXCreditId = resolveSwitchXCreditId;
12770
+ exports.resolveVideoAnalysisModel = resolveVideoAnalysisModel;
12527
12771
  exports.resolveVideoProviderForMode = resolveVideoProviderForMode;
12528
12772
  exports.resolveXfadeName = resolveXfadeName;
12529
12773
  exports.rewriteSlotTokens = rewriteSlotTokens;