@nodaro/shared 1.6.0 → 1.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodaro/shared",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "description": "Shared types, model catalog, wire contracts, and structural vocabularies for the Nodaro platform and SDK.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -187,6 +187,10 @@ const VIDEO_RATIOS_HVS345 = ["16:9", "9:16", "1:1", "4:3", "3:4"] as const
187
187
  // (docs.kie.ai/market/bytedance/seedance-2). Kept separate from HVS so the
188
188
  // wider set can't leak to models that don't support it.
189
189
  const VIDEO_RATIOS_SEEDANCE_2 = ["16:9", "9:16", "1:1", "4:3", "3:4", "21:9", "adaptive"] as const
190
+ // HappyHorse 1.1 (t2v + ref2v) — the model's full 9-ratio set incl. 4:5/5:4
191
+ // portrait-social and 21:9/9:21 cinematic (docs.kie.ai/market/happyhorse-1-1).
192
+ // Kept separate so the wider set can't leak to models that don't support it.
193
+ const VIDEO_RATIOS_HAPPYHORSE_11 = ["16:9", "9:16", "1:1", "4:3", "3:4", "4:5", "5:4", "21:9", "9:21"] as const
190
194
 
191
195
  // =============================================================================
192
196
  // IMAGE MODELS
@@ -1377,21 +1381,22 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
1377
1381
  { identifier: "wan-2.7-t2v", credits: 19, note: "5s 720p default" },
1378
1382
  ],
1379
1383
  },
1380
- // ── HappyHorse ──
1384
+ // ── HappyHorse (1.1 — ids kept version-less; repointed in place when KIE
1385
+ // delisted 1.0, same param surface, so saved workflows keep working) ──
1381
1386
  "happyhorse": {
1382
1387
  id: "happyhorse",
1383
1388
  kind: "video",
1384
1389
  modes: ["t2v"] as const,
1385
1390
  family: "HappyHorse",
1386
- label: "HappyHorse",
1391
+ label: "HappyHorse 1.1",
1387
1392
  series: "HappyHorse",
1388
- description: "HappyHorse text-to-video — 3–15s at 720p/1080p.",
1393
+ description: "HappyHorse 1.1 text-to-video — 3–15s at 720p/1080p, 9 aspect ratios incl. 21:9/9:21, per-second pricing.",
1389
1394
  useCases: ["motion", "creative"],
1390
- aspectRatios: VIDEO_RATIOS_HVS345,
1395
+ aspectRatios: VIDEO_RATIOS_HAPPYHORSE_11,
1391
1396
  durations: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1392
1397
  resolutions: ["720p", "1080p"],
1393
1398
  pricing: [
1394
- { identifier: "happyhorse", credits: 13, note: "5s 720p default" },
1399
+ { identifier: "happyhorse", credits: 29, note: "5s 720p default — per-second: ~5.7 cr/s @720p, ~7.3 cr/s @1080p" },
1395
1400
  ],
1396
1401
  },
1397
1402
  "happyhorse-i2v": {
@@ -1399,14 +1404,14 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
1399
1404
  kind: "video",
1400
1405
  modes: ["i2v"] as const,
1401
1406
  family: "HappyHorse",
1402
- label: "HappyHorse I2V",
1407
+ label: "HappyHorse 1.1 I2V",
1403
1408
  series: "HappyHorse",
1404
- description: "HappyHorse image-to-video — 3–15s at 720p/1080p, aspect ratio inferred from input image.",
1409
+ description: "HappyHorse 1.1 image-to-video — 3–15s at 720p/1080p, aspect ratio inferred from input image, per-second pricing.",
1405
1410
  useCases: ["motion", "creative"],
1406
1411
  durations: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1407
1412
  resolutions: ["720p", "1080p"],
1408
1413
  pricing: [
1409
- { identifier: "happyhorse-i2v", credits: 13, note: "5s 720p default" },
1414
+ { identifier: "happyhorse-i2v", credits: 29, note: "5s 720p default — per-second: ~5.7 cr/s @720p, ~7.3 cr/s @1080p" },
1410
1415
  ],
1411
1416
  },
1412
1417
  "happyhorse-ref2v": {
@@ -1414,16 +1419,16 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
1414
1419
  kind: "video",
1415
1420
  modes: ["i2v"] as const,
1416
1421
  family: "HappyHorse",
1417
- label: "HappyHorse Ref2V",
1422
+ label: "HappyHorse 1.1 Ref2V",
1418
1423
  series: "HappyHorse",
1419
- description: "HappyHorse reference-to-video — 1–9 reference images, 3–15s at 720p/1080p.",
1424
+ description: "HappyHorse 1.1 reference-to-video — 1–9 reference images, 3–15s at 720p/1080p, per-second pricing.",
1420
1425
  useCases: ["motion", "reference"],
1421
- aspectRatios: VIDEO_RATIOS_HVS345,
1426
+ aspectRatios: VIDEO_RATIOS_HAPPYHORSE_11,
1422
1427
  durations: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
1423
1428
  resolutions: ["720p", "1080p"],
1424
1429
  features: ["reference-image"],
1425
1430
  pricing: [
1426
- { identifier: "happyhorse-ref2v", credits: 15, note: "5s 720p default" },
1431
+ { identifier: "happyhorse-ref2v", credits: 29, note: "5s 720p default — per-second: ~5.7 cr/s @720p, ~7.3 cr/s @1080p" },
1427
1432
  ],
1428
1433
  },
1429
1434
  "happyhorse-edit": {
@@ -1437,7 +1442,7 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
1437
1442
  useCases: ["v2v", "restyle"],
1438
1443
  resolutions: ["720p", "1080p"],
1439
1444
  pricing: [
1440
- { identifier: "happyhorse-edit", credits: 20, note: "720p default" },
1445
+ { identifier: "happyhorse-edit", credits: 35, note: "720p default (5s-equivalent flat rate)" },
1441
1446
  ],
1442
1447
  },
1443
1448
  // ── Bytedance video lite/pro ──
@@ -1077,6 +1077,9 @@ export const DURATION_PRICED_PROVIDERS = new Set([
1077
1077
  "seedance-2-fast",
1078
1078
  "seedance-2-mini",
1079
1079
  "grok-imagine-video-1.5",
1080
+ "happyhorse",
1081
+ "happyhorse-i2v",
1082
+ "happyhorse-ref2v",
1080
1083
  ])
1081
1084
 
1082
1085
  /**
@@ -1243,6 +1246,13 @@ export const RESOLUTION_DURATION_PRICING: Record<string, readonly string[]> = {
1243
1246
  // seedance-2-extend always uses a video ref, so pricing has no -ref
1244
1247
  // dimension — duration tier + ":res" only (rates = seedance-2 -ref + stitch).
1245
1248
  "seedance-2-extend": ["480p", "720p", "1080p"],
1249
+ // HappyHorse 1.1 — per-second billing at two published resolution rates
1250
+ // (kie.ai/happyhorse-1-1: 22.5 cr/s @720p, 29 cr/s @1080p, uniform across
1251
+ // t2v/i2v/ref2v). 720p first = billing default; the KIE-side default is
1252
+ // pinned to 720p via extraParams in backend kie/models.ts so render matches.
1253
+ "happyhorse": ["720p", "1080p"],
1254
+ "happyhorse-i2v": ["720p", "1080p"],
1255
+ "happyhorse-ref2v": ["720p", "1080p"],
1246
1256
  }
1247
1257
 
1248
1258
  /**
@@ -1489,6 +1499,13 @@ export const VIDEO_VARIABLE_PRICING: Record<string, "duration" | "duration+audio
1489
1499
  "grok-imagine-video-1.5": "duration+resolution",
1490
1500
  }
1491
1501
 
1502
+ /** HappyHorse 1.1 per-second tiers — one per allowed duration (3–15s), shared
1503
+ * by all three modes (t2v/i2v/ref2v) which bill at identical published rates. */
1504
+ const HAPPYHORSE_DURATION_TIERS: Array<{ maxSeconds: number; suffix: string }> = Array.from(
1505
+ { length: 13 },
1506
+ (_, i) => ({ maxSeconds: i + 3, suffix: `${i + 3}s` }),
1507
+ )
1508
+
1492
1509
  /**
1493
1510
  * Duration tier breakpoints for variable-priced video models.
1494
1511
  * Maps provider → array of { maxSeconds, suffix } in ascending order.
@@ -1588,6 +1605,14 @@ export const VIDEO_DURATION_TIERS: Record<string, Array<{ maxSeconds: number; su
1588
1605
  { maxSeconds: 14, suffix: "14s" },
1589
1606
  { maxSeconds: 15, suffix: "15s" },
1590
1607
  ],
1608
+ // HappyHorse 1.1 (t2v / i2v / ref2v) — true per-second billing (KIE 22.5 cr/s
1609
+ // @720p, 29 cr/s @1080p, published on kie.ai/happyhorse-1-1). One tier per
1610
+ // allowed second (3–15s) so the composite identifier maps 1:1 to the seeded
1611
+ // price, combined with RESOLUTION_DURATION_PRICING for the ":720p"/":1080p"
1612
+ // suffix (e.g. "happyhorse-i2v:5s:720p").
1613
+ "happyhorse": HAPPYHORSE_DURATION_TIERS,
1614
+ "happyhorse-i2v": HAPPYHORSE_DURATION_TIERS,
1615
+ "happyhorse-ref2v": HAPPYHORSE_DURATION_TIERS,
1591
1616
  }
1592
1617
 
1593
1618
  /**