@nodaro/shared 2.1.0 → 2.2.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.
@@ -58,6 +58,12 @@ export type ModelMode =
58
58
  | "forced-alignment"
59
59
  // video analysis
60
60
  | "video-analysis"
61
+ // video audit — deliberately its own mode, never "video-analysis": the
62
+ // video-audit node has no model picker (see model-tree.ts's MODE_TO_NODE,
63
+ // which has no entry for this mode on purpose), so its catalog rows exist
64
+ // for pricing/MCP-discovery only and must never leak into the
65
+ // video-analysis node's model picker.
66
+ | "video-audit"
61
67
 
62
68
  export interface PriceVariant {
63
69
  /** Composite identifier as it appears in `STATIC_CREDIT_COSTS`. */
@@ -102,7 +108,22 @@ export interface ModelCatalogEntry {
102
108
  description: string
103
109
  /** Short tags Claude matches against user intent. */
104
110
  useCases: readonly string[]
105
- /** Capabilities flags: "reference-image", "end-frame", "audio", etc. */
111
+ /**
112
+ * Capabilities flags: "reference-image", "end-frame", "audio", etc.
113
+ *
114
+ * `"video-reference"` (video models only) means the model accepts a
115
+ * reference VIDEO as a CONDITIONING clip — the r2v transport that
116
+ * `resolveSeedance2Inputs` builds and that KIE receives as
117
+ * `reference_video_urls`. It is what generate-video-pro's `extend` render
118
+ * method needs (a continuation tail off the previous segment), and
119
+ * `GVP_EXTEND_PROVIDERS` derives from it.
120
+ *
121
+ * It is deliberately NOT set on `gemini-omni-video`: that model's
122
+ * `video_list` input is a V2V SOURCE clip with a trim window, an
123
+ * auto-determined duration and flat per-generation pricing (see
124
+ * `runGeminiOmni` in `backend/src/providers/kie/video.ts`) — a different
125
+ * transport, not a continuation reference.
126
+ */
106
127
  features?: readonly string[]
107
128
  aspectRatios?: readonly string[]
108
129
  resolutions?: readonly string[]
@@ -192,7 +213,9 @@ const VIDEO_RATIOS_HVS = ["16:9", "9:16", "1:1"] as const
192
213
  const WAN_27_IMAGE_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4", "21:9", "8:1", "1:8"] as const
193
214
  const VIDEO_RATIOS_HVS345 = ["16:9", "9:16", "1:1", "4:3", "3:4"] as const
194
215
  // Seedance 2.x only — KIE accepts the full fixed-ratio set incl. 21:9
195
- // (docs.kie.ai/market/bytedance/seedance-2). Kept separate from HVS so the
216
+ // (docs.kie.ai/market/bytedance/seedance-2); MiniMax Hailuo 3 shares the same
217
+ // seven-ratio set (t2v enum + r2v adaptive default per docs.kie.ai/market/minimax-h3).
218
+ // Kept separate from HVS so the
196
219
  // wider set can't leak to models that don't support it.
197
220
  const VIDEO_RATIOS_SEEDANCE_2 = ["16:9", "9:16", "1:1", "4:3", "3:4", "21:9", "adaptive"] as const
198
221
  // HappyHorse 1.1 (t2v + ref2v) — the model's full 9-ratio set incl. 4:5/5:4
@@ -399,8 +422,8 @@ const IMAGE_MODELS: Record<string, ModelCatalogEntry> = {
399
422
  aspectRatios: FLUX_RATIOS,
400
423
  resolutions: ["0.5 MP", "1 MP", "2 MP", "4 MP"],
401
424
  pricing: [
402
- { identifier: "flux-2-klein", credits: 10 }, // 1MP 0ref (default)
403
- { identifier: "flux-2-klein:1MP:0ref", credits: 3 }, // min
425
+ { identifier: "flux-2-klein", credits: 3 }, // 1MP 0ref (default)
426
+ { identifier: "flux-2-klein:1MP:0ref", credits: 3 }, // min — same point on the grid as the bare default
404
427
  { identifier: "flux-2-klein:4MP:8ref", credits: 108 }, // max
405
428
  ],
406
429
  },
@@ -430,7 +453,7 @@ const IMAGE_MODELS: Record<string, ModelCatalogEntry> = {
430
453
  aspectRatios: FLUX_RATIOS,
431
454
  resolutions: ["0.5 MP", "1 MP", "2 MP", "4 MP"],
432
455
  pricing: [
433
- { identifier: "flux-2-pro", credits: 30 }, // 2MP 0ref (default)
456
+ { identifier: "flux-2-pro", credits: 23 }, // 2MP 0ref (default)
434
457
  { identifier: "flux-2-pro:0.5MP:0ref", credits: 12 }, // min
435
458
  { identifier: "flux-2-pro:4MP:8ref", credits: 278 }, // max
436
459
  ],
@@ -910,6 +933,42 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
910
933
  durations: [5],
911
934
  pricing: [{ identifier: "minimax", credits: 143, note: "5s, 1080p" }],
912
935
  },
936
+ // MiniMax Hailuo 3 (KIE "minimax-h3") — t2v / i2v (first and/or last frame) /
937
+ // reference-to-video (9 images / 3 videos ≤15s total / 3 audios ≤15s total;
938
+ // audio refs require an image or video ref alongside). Two-rate resolution
939
+ // lever (768P added 2026-08-03): 2K (KIE default) at 36.5 KIE cr/s, 768P at
940
+ // 22.5 KIE cr/s — billed on output + input-video seconds at the SELECTED
941
+ // resolution's rate; input images beyond the first 5 add 11 KIE cr each,
942
+ // reference audio free. Bare duration composites stay the 2K rate (identical
943
+ // to the pre-lever seeded rows); 768P appends ":768p". Mirrors the Seedance 2
944
+ // multimodal surface.
945
+ // docs.kie.ai/market/minimax-h3/{text,image,reference}-to-video.
946
+ "minimax-h3": {
947
+ id: "minimax-h3",
948
+ kind: "video",
949
+ modes: ["i2v", "t2v"] as const,
950
+ family: "MiniMax",
951
+ label: "Hailuo 3 (H3)",
952
+ series: "Hailuo",
953
+ description: "MiniMax Hailuo 3 — premium multimodal tier: first/last frame + image/video/audio references, native audio, 2K (default) or 768P output, 4-15s per-second pricing.",
954
+ useCases: ["premium", "narrative"],
955
+ features: ["end-frame", "audio", "reference-image", "video-reference"],
956
+ aspectRatios: VIDEO_RATIOS_SEEDANCE_2,
957
+ durations: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
958
+ // First entry = default (the UI dropdown + fail-safe snap use opts[0], and
959
+ // 2K is the KIE-side default). Uppercase values are the exact KIE wire enum.
960
+ resolutions: ["2K", "768P"],
961
+ valueLabels: { "2K": "2K (default)" },
962
+ pricing: [
963
+ { identifier: "minimax-h3", credits: 550, note: "default 6s @2K — see :Ns variants" },
964
+ { identifier: "minimax-h3:4s", credits: 370, note: "4s @2K (min)" },
965
+ { identifier: "minimax-h3:8s", credits: 730, note: "8s @2K" },
966
+ { identifier: "minimax-h3:15s", credits: 1370, note: "15s @2K (max)" },
967
+ { identifier: "minimax-h3:4s:768p", credits: 230, note: "4s @768P (min)" },
968
+ { identifier: "minimax-h3:8s:768p", credits: 450, note: "8s @768P" },
969
+ { identifier: "minimax-h3:15s:768p", credits: 850, note: "15s @768P (max)" },
970
+ ],
971
+ },
913
972
  "hailuo-2.3-pro": {
914
973
  id: "hailuo-2.3-pro",
915
974
  kind: "video",
@@ -1233,7 +1292,7 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
1233
1292
  series: "Seedance",
1234
1293
  description: "Seedance 2 — premium tier with native audio. Per-second pricing by resolution.",
1235
1294
  useCases: ["premium", "narrative"],
1236
- features: ["end-frame", "audio", "reference-image"],
1295
+ features: ["end-frame", "audio", "reference-image", "video-reference"],
1237
1296
  aspectRatios: VIDEO_RATIOS_SEEDANCE_2,
1238
1297
  durations: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1239
1298
  resolutions: ["480p", "720p", "1080p", "4k"],
@@ -1258,7 +1317,7 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
1258
1317
  series: "Seedance",
1259
1318
  description: "Cheaper / quicker Seedance 2 tier.",
1260
1319
  useCases: ["fast", "motion"],
1261
- features: ["end-frame", "audio", "reference-image"],
1320
+ features: ["end-frame", "audio", "reference-image", "video-reference"],
1262
1321
  aspectRatios: VIDEO_RATIOS_SEEDANCE_2,
1263
1322
  durations: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1264
1323
  resolutions: ["480p", "720p"],
@@ -1279,7 +1338,7 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
1279
1338
  series: "Seedance",
1280
1339
  description: "Budget Seedance 2 tier — 480p/720p only, per-second pricing by resolution.",
1281
1340
  useCases: ["fast", "motion"],
1282
- features: ["end-frame", "audio", "reference-image"],
1341
+ features: ["end-frame", "audio", "reference-image", "video-reference"],
1283
1342
  aspectRatios: VIDEO_RATIOS_SEEDANCE_2,
1284
1343
  durations: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1285
1344
  resolutions: ["480p", "720p"],
@@ -1291,6 +1350,34 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
1291
1350
  { identifier: "seedance-2-mini:8s:720p-ref", credits: 250 },
1292
1351
  ],
1293
1352
  },
1353
+ // Seedance 2.5 — the next Seedance generation, not a tier of the 2.0 ladder.
1354
+ // Two levers differ from every 2.0 SKU and drive its own entries throughout:
1355
+ // durations run to 30s (2.0 caps at 15s) and there is NO 1080p/4K tier.
1356
+ // Reference caps are also wider (30 images / 10 videos / 10 audio) — see
1357
+ // SEEDANCE_2_5_REF_LIMITS in model-constants.
1358
+ "seedance-2-5": {
1359
+ id: "seedance-2-5",
1360
+ kind: "video",
1361
+ modes: ["i2v", "t2v"] as const,
1362
+ family: "Bytedance",
1363
+ label: "Seedance 2.5",
1364
+ series: "Seedance",
1365
+ description: "Seedance 2.5 — up to 30s in one shot, native audio, wide multimodal references. 480p/720p.",
1366
+ useCases: ["premium", "narrative", "long-form"],
1367
+ features: ["end-frame", "audio", "reference-image", "video-reference"],
1368
+ aspectRatios: VIDEO_RATIOS_SEEDANCE_2,
1369
+ durations: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],
1370
+ resolutions: ["480p", "720p"],
1371
+ pricing: [
1372
+ { identifier: "seedance-2-5", credits: 1260, note: "default 8s 720p — see :Ns:res variants for exact" },
1373
+ { identifier: "seedance-2-5:8s:480p", credits: 560, note: "8s 480p" },
1374
+ { identifier: "seedance-2-5:8s:720p", credits: 1260, note: "8s 720p" },
1375
+ { identifier: "seedance-2-5:8s:480p-ref", credits: 340, note: "8s 480p with reference video" },
1376
+ { identifier: "seedance-2-5:8s:720p-ref", credits: 760, note: "8s 720p with reference video" },
1377
+ { identifier: "seedance-2-5:30s:480p", credits: 2100, note: "30s 480p (max)" },
1378
+ { identifier: "seedance-2-5:30s:720p", credits: 4730, note: "30s 720p (max)" },
1379
+ ],
1380
+ },
1294
1381
 
1295
1382
  // ── Wan ──
1296
1383
  "wan-i2v": {
@@ -1818,11 +1905,11 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
1818
1905
  description: "Legacy fast-tier analysis model (pre-2026-07). Kept so stored raw-model configs keep running and keep pricing under their own identifier; new fast-tier runs use the current fast model.",
1819
1906
  useCases: ["video-analysis", "shot-list", "fast"],
1820
1907
  pricing: [
1821
- { identifier: "video-analysis:gemini-3-flash", credits: 143, note: "10-min ceiling (no duration given)" },
1822
- { identifier: "video-analysis:gemini-3-flash:60s", credits: 24 },
1823
- { identifier: "video-analysis:gemini-3-flash:180s", credits: 33 },
1824
- { identifier: "video-analysis:gemini-3-flash:360s", credits: 86 },
1825
- { identifier: "video-analysis:gemini-3-flash:600s", credits: 143, note: "10-min ceiling" },
1908
+ { identifier: "video-analysis:gemini-3-flash", credits: 846, note: "10-min ceiling (no duration given)" },
1909
+ { identifier: "video-analysis:gemini-3-flash:60s", credits: 180 },
1910
+ { identifier: "video-analysis:gemini-3-flash:180s", credits: 185 },
1911
+ { identifier: "video-analysis:gemini-3-flash:360s", credits: 514 },
1912
+ { identifier: "video-analysis:gemini-3-flash:600s", credits: 846, note: "10-min ceiling" },
1826
1913
  ],
1827
1914
  },
1828
1915
  "gemini-3.6-flash-video-analysis": {
@@ -1835,11 +1922,11 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
1835
1922
  description: "Analyze a video into a structured shot list (scenes, camera, audio) — fast, economy tier. Billed per duration bucket.",
1836
1923
  useCases: ["video-analysis", "shot-list", "fast"],
1837
1924
  pricing: [
1838
- { identifier: "video-analysis:gemini-3.6-flash", credits: 395, note: "10-min ceiling (no duration given)" },
1839
- { identifier: "video-analysis:gemini-3.6-flash:60s", credits: 65 },
1840
- { identifier: "video-analysis:gemini-3.6-flash:180s", credits: 92 },
1841
- { identifier: "video-analysis:gemini-3.6-flash:360s", credits: 237 },
1842
- { identifier: "video-analysis:gemini-3.6-flash:600s", credits: 395, note: "10-min ceiling" },
1925
+ { identifier: "video-analysis:gemini-3.6-flash", credits: 986, note: "10-min ceiling (no duration given)" },
1926
+ { identifier: "video-analysis:gemini-3.6-flash:60s", credits: 203 },
1927
+ { identifier: "video-analysis:gemini-3.6-flash:180s", credits: 218 },
1928
+ { identifier: "video-analysis:gemini-3.6-flash:360s", credits: 598 },
1929
+ { identifier: "video-analysis:gemini-3.6-flash:600s", credits: 986, note: "10-min ceiling" },
1843
1930
  ],
1844
1931
  },
1845
1932
  "gemini-3.1-pro-video-analysis": {
@@ -1852,11 +1939,11 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
1852
1939
  description: "Analyze a video into a structured shot list (scenes, camera, audio) — higher-fidelity, default tier. Billed per duration bucket.",
1853
1940
  useCases: ["video-analysis", "shot-list", "cinematic"],
1854
1941
  pricing: [
1855
- { identifier: "video-analysis:gemini-3.1-pro", credits: 509, note: "10-min ceiling (no duration given)" },
1856
- { identifier: "video-analysis:gemini-3.1-pro:60s", credits: 87 },
1857
- { identifier: "video-analysis:gemini-3.1-pro:180s", credits: 116 },
1858
- { identifier: "video-analysis:gemini-3.1-pro:360s", credits: 305 },
1859
- { identifier: "video-analysis:gemini-3.1-pro:600s", credits: 509, note: "10-min ceiling" },
1942
+ { identifier: "video-analysis:gemini-3.1-pro", credits: 1050, note: "10-min ceiling (no duration given)" },
1943
+ { identifier: "video-analysis:gemini-3.1-pro:60s", credits: 215 },
1944
+ { identifier: "video-analysis:gemini-3.1-pro:180s", credits: 231 },
1945
+ { identifier: "video-analysis:gemini-3.1-pro:360s", credits: 636 },
1946
+ { identifier: "video-analysis:gemini-3.1-pro:600s", credits: 1050, note: "10-min ceiling" },
1860
1947
  ],
1861
1948
  },
1862
1949
  // Both mixed tiers are variants of the same advanced multi-engine analysis
@@ -1872,17 +1959,18 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
1872
1959
  description: "Our most advanced analysis tier — multiple analysis engines combined into one result for maximum completeness and accuracy. Billed per duration bucket.",
1873
1960
  useCases: ["video-analysis", "shot-list", "premium", "most-complete"],
1874
1961
  pricing: [
1875
- { identifier: "video-analysis:mixed", credits: 651, note: "10-min ceiling (no duration given)" },
1876
- { identifier: "video-analysis:mixed:60s", credits: 110 },
1877
- { identifier: "video-analysis:mixed:180s", credits: 149 },
1878
- { identifier: "video-analysis:mixed:360s", credits: 390 },
1879
- { identifier: "video-analysis:mixed:600s", credits: 651, note: "10-min ceiling" },
1962
+ { identifier: "video-analysis:mixed", credits: 1169, note: "10-min ceiling (no duration given)" },
1963
+ { identifier: "video-analysis:mixed:60s", credits: 268 },
1964
+ { identifier: "video-analysis:mixed:180s", credits: 289 },
1965
+ { identifier: "video-analysis:mixed:360s", credits: 724 },
1966
+ { identifier: "video-analysis:mixed:600s", credits: 1169, note: "10-min ceiling" },
1880
1967
  ],
1881
1968
  },
1882
- // SMART — the accuracy tier, and the only one that does not rely on voting.
1883
- // Every other tier runs several cheap passes and has a grader pick between them;
1884
- // this one runs a single pass with reasoning and frame sampling turned all the
1885
- // way up. Priced well above them because it genuinely costs more to run.
1969
+ // SMART — the accuracy tier. Since the 2026-08-03 hybrid re-plan it is a
1970
+ // multi-roll plan like the others: a native skeleton pass blended with
1971
+ // several donor analysis rolls, with the merged result always refined
1972
+ // (it ignores `selectionMode` see video-analysis-pricing.ts). Priced
1973
+ // well above them because it genuinely costs more to run.
1886
1974
  "smart-video-analysis": {
1887
1975
  id: "smart-video-analysis",
1888
1976
  kind: "video",
@@ -1890,14 +1978,58 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
1890
1978
  family: "Nodaro",
1891
1979
  label: "Video Analysis (Smart)",
1892
1980
  series: "Video Analysis",
1893
- description: "Highest-accuracy analysis — a single deep pass that reads the footage frame by frame, finds its own shot boundaries, and identifies the cast by appearance. Best choice when the shot list will drive regeneration. Billed per duration bucket.",
1981
+ description: "Highest-accuracy analysis — a hybrid pass that blends a native skeleton read with several donor analysis rolls, then always refines the merged result to find shot boundaries and identify the cast by appearance. Best choice when the shot list will drive regeneration. Billed per duration bucket.",
1894
1982
  useCases: ["video-analysis", "shot-list", "premium", "most-accurate"],
1895
1983
  pricing: [
1896
- { identifier: "video-analysis:smart", credits: 1868, note: "10-min ceiling (no duration given)" },
1897
- { identifier: "video-analysis:smart:60s", credits: 333 },
1898
- { identifier: "video-analysis:smart:180s", credits: 470 },
1899
- { identifier: "video-analysis:smart:360s", credits: 1135 },
1900
- { identifier: "video-analysis:smart:600s", credits: 1868, note: "10-min ceiling" },
1984
+ { identifier: "video-analysis:smart", credits: 2064, note: "10-min ceiling (no duration given)" },
1985
+ { identifier: "video-analysis:smart:60s", credits: 410 },
1986
+ { identifier: "video-analysis:smart:180s", credits: 500 },
1987
+ { identifier: "video-analysis:smart:360s", credits: 1259 },
1988
+ { identifier: "video-analysis:smart:600s", credits: 2064, note: "10-min ceiling" },
1989
+ ],
1990
+ },
1991
+ // ── AI Audit (`video-audit`) ── a SEPARATE node from video-analysis (own
1992
+ // node type, own route in the private plugin): it re-watches a clip
1993
+ // against its analysis (auto-running a fast analysis first when none is
1994
+ // wired), applies video-verified corrections under guards, and returns a
1995
+ // disclosed report of what was checked, fixed, and left open. These two
1996
+ // rows exist for pricing/MCP-discovery visibility only — the node has no
1997
+ // model picker in V1, so (unlike every other row in this section) they
1998
+ // deliberately carry no `series` and their `modes` has no Models-tab
1999
+ // mapping (see model-tree.ts's MODE_TO_NODE) — they must never appear as
2000
+ // selectable "video-analysis" models. Two credit families, chosen by
2001
+ // whether an analysis is wired into the node; the structural formula lives
2002
+ // in video-analysis-pricing.ts.
2003
+ "video-audit": {
2004
+ id: "video-audit",
2005
+ kind: "video",
2006
+ modes: ["video-audit"] as const,
2007
+ family: "Nodaro",
2008
+ label: "AI Audit",
2009
+ description: "Re-watches a clip against a wired analysis, applies video-verified corrections under guards, and returns a disclosed report of what changed. Billed per duration bucket.",
2010
+ useCases: ["video-audit", "qa", "shot-list", "verification"],
2011
+ pricing: [
2012
+ { identifier: "video-audit", credits: 1066, note: "10-min ceiling (no duration given)" },
2013
+ { identifier: "video-audit:60s", credits: 213 },
2014
+ { identifier: "video-audit:180s", credits: 289 },
2015
+ { identifier: "video-audit:360s", credits: 659 },
2016
+ { identifier: "video-audit:600s", credits: 1066, note: "10-min ceiling" },
2017
+ ],
2018
+ },
2019
+ "video-audit-auto": {
2020
+ id: "video-audit-auto",
2021
+ kind: "video",
2022
+ modes: ["video-audit"] as const,
2023
+ family: "Nodaro",
2024
+ label: "AI Audit (with analysis run)",
2025
+ description: "Same video-verified audit as AI Audit, but auto-runs a fast analysis first when none is wired in, then applies corrections under guards and returns a disclosed report. Billed per duration bucket.",
2026
+ useCases: ["video-audit", "qa", "shot-list", "verification", "auto-analysis"],
2027
+ pricing: [
2028
+ { identifier: "video-audit:auto", credits: 1912, note: "10-min ceiling (no duration given)" },
2029
+ { identifier: "video-audit:auto:60s", credits: 393 },
2030
+ { identifier: "video-audit:auto:180s", credits: 474 },
2031
+ { identifier: "video-audit:auto:360s", credits: 1173 },
2032
+ { identifier: "video-audit:auto:600s", credits: 1912, note: "10-min ceiling" },
1901
2033
  ],
1902
2034
  },
1903
2035
  }