@nodaro/shared 2.0.3 → 2.1.1

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
@@ -263,10 +263,10 @@ var IMAGE_MODELS = {
263
263
  aspectRatios: FLUX_RATIOS,
264
264
  resolutions: ["0.5 MP", "1 MP", "2 MP", "4 MP"],
265
265
  pricing: [
266
- { identifier: "flux-2-klein", credits: 10 },
266
+ { identifier: "flux-2-klein", credits: 3 },
267
267
  // 1MP 0ref (default)
268
268
  { identifier: "flux-2-klein:1MP:0ref", credits: 3 },
269
- // min
269
+ // min — same point on the grid as the bare default
270
270
  { identifier: "flux-2-klein:4MP:8ref", credits: 108 }
271
271
  // max
272
272
  ]
@@ -297,7 +297,7 @@ var IMAGE_MODELS = {
297
297
  aspectRatios: FLUX_RATIOS,
298
298
  resolutions: ["0.5 MP", "1 MP", "2 MP", "4 MP"],
299
299
  pricing: [
300
- { identifier: "flux-2-pro", credits: 30 },
300
+ { identifier: "flux-2-pro", credits: 23 },
301
301
  // 2MP 0ref (default)
302
302
  { identifier: "flux-2-pro:0.5MP:0ref", credits: 12 },
303
303
  // min
@@ -1670,11 +1670,11 @@ var VIDEO_MODELS = {
1670
1670
  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.",
1671
1671
  useCases: ["video-analysis", "shot-list", "fast"],
1672
1672
  pricing: [
1673
- { identifier: "video-analysis:gemini-3-flash", credits: 136, note: "10-min ceiling (no duration given)" },
1674
- { identifier: "video-analysis:gemini-3-flash:60s", credits: 23 },
1675
- { identifier: "video-analysis:gemini-3-flash:180s", credits: 32 },
1676
- { identifier: "video-analysis:gemini-3-flash:360s", credits: 81 },
1677
- { identifier: "video-analysis:gemini-3-flash:600s", credits: 136, note: "10-min ceiling" }
1673
+ { identifier: "video-analysis:gemini-3-flash", credits: 143, note: "10-min ceiling (no duration given)" },
1674
+ { identifier: "video-analysis:gemini-3-flash:60s", credits: 24 },
1675
+ { identifier: "video-analysis:gemini-3-flash:180s", credits: 33 },
1676
+ { identifier: "video-analysis:gemini-3-flash:360s", credits: 86 },
1677
+ { identifier: "video-analysis:gemini-3-flash:600s", credits: 143, note: "10-min ceiling" }
1678
1678
  ]
1679
1679
  },
1680
1680
  "gemini-3.6-flash-video-analysis": {
@@ -1687,11 +1687,11 @@ var VIDEO_MODELS = {
1687
1687
  description: "Analyze a video into a structured shot list (scenes, camera, audio) \u2014 fast, economy tier. Billed per duration bucket.",
1688
1688
  useCases: ["video-analysis", "shot-list", "fast"],
1689
1689
  pricing: [
1690
- { identifier: "video-analysis:gemini-3.6-flash", credits: 374, note: "10-min ceiling (no duration given)" },
1691
- { identifier: "video-analysis:gemini-3.6-flash:60s", credits: 61 },
1692
- { identifier: "video-analysis:gemini-3.6-flash:180s", credits: 88 },
1693
- { identifier: "video-analysis:gemini-3.6-flash:360s", credits: 224 },
1694
- { identifier: "video-analysis:gemini-3.6-flash:600s", credits: 374, note: "10-min ceiling" }
1690
+ { identifier: "video-analysis:gemini-3.6-flash", credits: 395, note: "10-min ceiling (no duration given)" },
1691
+ { identifier: "video-analysis:gemini-3.6-flash:60s", credits: 65 },
1692
+ { identifier: "video-analysis:gemini-3.6-flash:180s", credits: 92 },
1693
+ { identifier: "video-analysis:gemini-3.6-flash:360s", credits: 237 },
1694
+ { identifier: "video-analysis:gemini-3.6-flash:600s", credits: 395, note: "10-min ceiling" }
1695
1695
  ]
1696
1696
  },
1697
1697
  "gemini-3.1-pro-video-analysis": {
@@ -1704,11 +1704,11 @@ var VIDEO_MODELS = {
1704
1704
  description: "Analyze a video into a structured shot list (scenes, camera, audio) \u2014 higher-fidelity, default tier. Billed per duration bucket.",
1705
1705
  useCases: ["video-analysis", "shot-list", "cinematic"],
1706
1706
  pricing: [
1707
- { identifier: "video-analysis:gemini-3.1-pro", credits: 486, note: "10-min ceiling (no duration given)" },
1708
- { identifier: "video-analysis:gemini-3.1-pro:60s", credits: 82 },
1709
- { identifier: "video-analysis:gemini-3.1-pro:180s", credits: 111 },
1710
- { identifier: "video-analysis:gemini-3.1-pro:360s", credits: 291 },
1711
- { identifier: "video-analysis:gemini-3.1-pro:600s", credits: 486, note: "10-min ceiling" }
1707
+ { identifier: "video-analysis:gemini-3.1-pro", credits: 509, note: "10-min ceiling (no duration given)" },
1708
+ { identifier: "video-analysis:gemini-3.1-pro:60s", credits: 87 },
1709
+ { identifier: "video-analysis:gemini-3.1-pro:180s", credits: 116 },
1710
+ { identifier: "video-analysis:gemini-3.1-pro:360s", credits: 305 },
1711
+ { identifier: "video-analysis:gemini-3.1-pro:600s", credits: 509, note: "10-min ceiling" }
1712
1712
  ]
1713
1713
  },
1714
1714
  // Both mixed tiers are variants of the same advanced multi-engine analysis
@@ -1724,11 +1724,11 @@ var VIDEO_MODELS = {
1724
1724
  description: "Our most advanced analysis tier \u2014 multiple analysis engines combined into one result for maximum completeness and accuracy. Billed per duration bucket.",
1725
1725
  useCases: ["video-analysis", "shot-list", "premium", "most-complete"],
1726
1726
  pricing: [
1727
- { identifier: "video-analysis:mixed", credits: 621, note: "10-min ceiling (no duration given)" },
1728
- { identifier: "video-analysis:mixed:60s", credits: 104 },
1729
- { identifier: "video-analysis:mixed:180s", credits: 142 },
1730
- { identifier: "video-analysis:mixed:360s", credits: 372 },
1731
- { identifier: "video-analysis:mixed:600s", credits: 621, note: "10-min ceiling" }
1727
+ { identifier: "video-analysis:mixed", credits: 651, note: "10-min ceiling (no duration given)" },
1728
+ { identifier: "video-analysis:mixed:60s", credits: 110 },
1729
+ { identifier: "video-analysis:mixed:180s", credits: 149 },
1730
+ { identifier: "video-analysis:mixed:360s", credits: 390 },
1731
+ { identifier: "video-analysis:mixed:600s", credits: 651, note: "10-min ceiling" }
1732
1732
  ]
1733
1733
  },
1734
1734
  // SMART — the accuracy tier, and the only one that does not rely on voting.
@@ -1745,11 +1745,11 @@ var VIDEO_MODELS = {
1745
1745
  description: "Highest-accuracy analysis \u2014 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.",
1746
1746
  useCases: ["video-analysis", "shot-list", "premium", "most-accurate"],
1747
1747
  pricing: [
1748
- { identifier: "video-analysis:smart", credits: 3496, note: "10-min ceiling (no duration given)" },
1749
- { identifier: "video-analysis:smart:60s", credits: 454 },
1750
- { identifier: "video-analysis:smart:180s", credits: 975 },
1751
- { identifier: "video-analysis:smart:360s", credits: 2105 },
1752
- { identifier: "video-analysis:smart:600s", credits: 3496, note: "10-min ceiling" }
1748
+ { identifier: "video-analysis:smart", credits: 1868, note: "10-min ceiling (no duration given)" },
1749
+ { identifier: "video-analysis:smart:60s", credits: 333 },
1750
+ { identifier: "video-analysis:smart:180s", credits: 470 },
1751
+ { identifier: "video-analysis:smart:360s", credits: 1135 },
1752
+ { identifier: "video-analysis:smart:600s", credits: 1868, note: "10-min ceiling" }
1753
1753
  ]
1754
1754
  }
1755
1755
  };
@@ -12614,35 +12614,36 @@ var WINDOW_OVERLAP = 5;
12614
12614
  var VIDEO_ANALYSIS_WINDOW = { LEN: WINDOW_LEN, STRIDE: WINDOW_STRIDE, OVERLAP: WINDOW_OVERLAP, SINGLE_MAX: 180 };
12615
12615
  var VIDEO_ANALYSIS_BUCKET_CREDITS = {
12616
12616
  // Legacy fast-tier model (pre-2026-07) — kept for stored raw-id configs.
12617
- "video-analysis:gemini-3-flash:60s": 23,
12618
- "video-analysis:gemini-3-flash:180s": 32,
12619
- "video-analysis:gemini-3-flash:360s": 81,
12620
- "video-analysis:gemini-3-flash:600s": 136,
12617
+ "video-analysis:gemini-3-flash:60s": 24,
12618
+ "video-analysis:gemini-3-flash:180s": 33,
12619
+ "video-analysis:gemini-3-flash:360s": 86,
12620
+ "video-analysis:gemini-3-flash:600s": 143,
12621
12621
  // Current fast tier — regenerated from the private formula for its backing
12622
12622
  // model; higher than the legacy fast schedule but still ≤ pro per bucket.
12623
- "video-analysis:gemini-3.6-flash:60s": 61,
12624
- "video-analysis:gemini-3.6-flash:180s": 88,
12625
- "video-analysis:gemini-3.6-flash:360s": 224,
12626
- "video-analysis:gemini-3.6-flash:600s": 374,
12627
- "video-analysis:gemini-3.1-pro:60s": 82,
12628
- "video-analysis:gemini-3.1-pro:180s": 111,
12629
- "video-analysis:gemini-3.1-pro:360s": 291,
12630
- "video-analysis:gemini-3.1-pro:600s": 486,
12623
+ "video-analysis:gemini-3.6-flash:60s": 65,
12624
+ "video-analysis:gemini-3.6-flash:180s": 92,
12625
+ "video-analysis:gemini-3.6-flash:360s": 237,
12626
+ "video-analysis:gemini-3.6-flash:600s": 395,
12627
+ "video-analysis:gemini-3.1-pro:60s": 87,
12628
+ "video-analysis:gemini-3.1-pro:180s": 116,
12629
+ "video-analysis:gemini-3.1-pro:360s": 305,
12630
+ "video-analysis:gemini-3.1-pro:600s": 509,
12631
12631
  // Mixed tiers (`mixed` + `mixed-fast`) share ONE credit family — they are
12632
12632
  // variants of the same engine plan (plan internals live in the private
12633
12633
  // analysis plugin). Admin-tunable via model_pricing like every other row.
12634
- "video-analysis:mixed:60s": 104,
12635
- "video-analysis:mixed:180s": 142,
12636
- "video-analysis:mixed:360s": 372,
12637
- "video-analysis:mixed:600s": 621,
12638
- // SMART — the one native-transport plan: a single pass with reasoning and
12639
- // frame sampling turned all the way up. Priced well above the economy tiers
12640
- // because it genuinely costs more to run, and it is the only tier whose
12641
- // accuracy was measured against a hand-counted edit list.
12642
- "video-analysis:smart:60s": 454,
12643
- "video-analysis:smart:180s": 975,
12644
- "video-analysis:smart:360s": 2105,
12645
- "video-analysis:smart:600s": 3496
12634
+ "video-analysis:mixed:60s": 110,
12635
+ "video-analysis:mixed:180s": 149,
12636
+ "video-analysis:mixed:360s": 390,
12637
+ "video-analysis:mixed:600s": 651,
12638
+ // SMART — the one native-transport plan: a single pass with reasoning turned
12639
+ // all the way up at a measured-optimal sampling rate. Priced above the
12640
+ // economy tiers because it genuinely costs more to run; the only tier whose
12641
+ // accuracy is validated against a hand-counted edit list, re-validated at
12642
+ // the current sampling rate before this schedule shipped.
12643
+ "video-analysis:smart:60s": 333,
12644
+ "video-analysis:smart:180s": 470,
12645
+ "video-analysis:smart:360s": 1135,
12646
+ "video-analysis:smart:600s": 1868
12646
12647
  };
12647
12648
  function videoAnalysisCreditSegment(modelOrSentinel) {
12648
12649
  return modelOrSentinel === "mixed-fast" ? "mixed" : modelOrSentinel;