@nodaro/shared 2.0.1 → 2.0.2
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 +18 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +18 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/video-analysis-catalog-sync.test.ts +4 -3
- package/src/model-catalog.ts +10 -10
- package/src/video-analysis-pricing.ts +20 -13
package/package.json
CHANGED
|
@@ -88,9 +88,10 @@ describe("bare video-analysis node-type credit id", () => {
|
|
|
88
88
|
}
|
|
89
89
|
// The migration writes this number; keep them in lockstep (277 wrote 200,
|
|
90
90
|
// 279 wrote 739, 283 wrote 346, 284 wrote 350 — `smart` owns the ceiling and
|
|
91
|
-
// gained the continuity pass —
|
|
92
|
-
// to
|
|
93
|
-
|
|
91
|
+
// gained the continuity pass — 288 wrote 3500 as a x10 of that, and 293
|
|
92
|
+
// corrects it to 3496 by RE-DERIVING `smart:600s` from the plugin formula
|
|
93
|
+
// instead of scaling it, same as every other row in the table).
|
|
94
|
+
expect(ceiling).toBe(3496)
|
|
94
95
|
})
|
|
95
96
|
|
|
96
97
|
it("the bare id still bounds the default tier at the ceiling bucket", () => {
|
package/src/model-catalog.ts
CHANGED
|
@@ -1869,11 +1869,11 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
|
|
|
1869
1869
|
description: "Our most advanced analysis tier — multiple analysis engines combined into one result for maximum completeness and accuracy. Billed per duration bucket.",
|
|
1870
1870
|
useCases: ["video-analysis", "shot-list", "premium", "most-complete"],
|
|
1871
1871
|
pricing: [
|
|
1872
|
-
{ identifier: "video-analysis:mixed", credits:
|
|
1873
|
-
{ identifier: "video-analysis:mixed:60s", credits:
|
|
1874
|
-
{ identifier: "video-analysis:mixed:180s", credits:
|
|
1875
|
-
{ identifier: "video-analysis:mixed:360s", credits:
|
|
1876
|
-
{ identifier: "video-analysis:mixed:600s", credits:
|
|
1872
|
+
{ identifier: "video-analysis:mixed", credits: 621, note: "10-min ceiling (no duration given)" },
|
|
1873
|
+
{ identifier: "video-analysis:mixed:60s", credits: 104 },
|
|
1874
|
+
{ identifier: "video-analysis:mixed:180s", credits: 142 },
|
|
1875
|
+
{ identifier: "video-analysis:mixed:360s", credits: 372 },
|
|
1876
|
+
{ identifier: "video-analysis:mixed:600s", credits: 621, note: "10-min ceiling" },
|
|
1877
1877
|
],
|
|
1878
1878
|
},
|
|
1879
1879
|
// SMART — the accuracy tier, and the only one that does not rely on voting.
|
|
@@ -1890,11 +1890,11 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
|
|
|
1890
1890
|
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.",
|
|
1891
1891
|
useCases: ["video-analysis", "shot-list", "premium", "most-accurate"],
|
|
1892
1892
|
pricing: [
|
|
1893
|
-
{ identifier: "video-analysis:smart", credits:
|
|
1894
|
-
{ identifier: "video-analysis:smart:60s", credits:
|
|
1895
|
-
{ identifier: "video-analysis:smart:180s", credits:
|
|
1896
|
-
{ identifier: "video-analysis:smart:360s", credits:
|
|
1897
|
-
{ identifier: "video-analysis:smart:600s", credits:
|
|
1893
|
+
{ identifier: "video-analysis:smart", credits: 3496, note: "10-min ceiling (no duration given)" },
|
|
1894
|
+
{ identifier: "video-analysis:smart:60s", credits: 454 },
|
|
1895
|
+
{ identifier: "video-analysis:smart:180s", credits: 975 },
|
|
1896
|
+
{ identifier: "video-analysis:smart:360s", credits: 2105 },
|
|
1897
|
+
{ identifier: "video-analysis:smart:600s", credits: 3496, note: "10-min ceiling" },
|
|
1898
1898
|
],
|
|
1899
1899
|
},
|
|
1900
1900
|
}
|
|
@@ -48,11 +48,18 @@ export const VIDEO_ANALYSIS_WINDOW = { LEN: WINDOW_LEN, STRIDE: WINDOW_STRIDE, O
|
|
|
48
48
|
* Keep in sync with
|
|
49
49
|
* `docs/nodes/processing-video/video-analysis.md`.
|
|
50
50
|
*/
|
|
51
|
-
// RE-DERIVED from the cloud-plugins formula at the
|
|
52
|
-
// mechanical x10 of
|
|
53
|
-
// 10x finer base rounds LESS: the 60s flash bucket is 23,
|
|
54
|
-
// 3 would have been 30 (a ~30% over-charge).
|
|
55
|
-
//
|
|
51
|
+
// EVERY row here is RE-DERIVED from the cloud-plugins formula at the current
|
|
52
|
+
// credit base — never a mechanical x10 of an older table. The formula ceils USD
|
|
53
|
+
// into credits, so a 10x finer base rounds LESS: the 60s flash bucket is 23,
|
|
54
|
+
// where x10 of the old 3 would have been 30 (a ~30% over-charge).
|
|
55
|
+
//
|
|
56
|
+
// That applies to the SENTINEL rows (`mixed:*`, `smart:*`) exactly as much as to
|
|
57
|
+
// the per-model rows. They were briefly shipped as a x10 on the reasoning that
|
|
58
|
+
// they sit outside the plugin's cross-check loop — but being outside the loop
|
|
59
|
+
// makes a row UNGUARDED, not exempt: `videoAnalysisBucketCredits` computes them
|
|
60
|
+
// from the same roll plan, so they are formula-derived too (mixed:60s is 104,
|
|
61
|
+
// not 110). The plugin's cost test now covers sentinels as well, so this class
|
|
62
|
+
// of drift fails CI instead of shipping.
|
|
56
63
|
export const VIDEO_ANALYSIS_BUCKET_CREDITS: Record<string, number> = {
|
|
57
64
|
// Legacy fast-tier model (pre-2026-07) — kept for stored raw-id configs.
|
|
58
65
|
"video-analysis:gemini-3-flash:60s": 23,
|
|
@@ -72,18 +79,18 @@ export const VIDEO_ANALYSIS_BUCKET_CREDITS: Record<string, number> = {
|
|
|
72
79
|
// Mixed tiers (`mixed` + `mixed-fast`) share ONE credit family — they are
|
|
73
80
|
// variants of the same engine plan (plan internals live in the private
|
|
74
81
|
// analysis plugin). Admin-tunable via model_pricing like every other row.
|
|
75
|
-
"video-analysis:mixed:60s":
|
|
76
|
-
"video-analysis:mixed:180s":
|
|
77
|
-
"video-analysis:mixed:360s":
|
|
78
|
-
"video-analysis:mixed:600s":
|
|
82
|
+
"video-analysis:mixed:60s": 104,
|
|
83
|
+
"video-analysis:mixed:180s": 142,
|
|
84
|
+
"video-analysis:mixed:360s": 372,
|
|
85
|
+
"video-analysis:mixed:600s": 621,
|
|
79
86
|
// SMART — the one native-transport plan: a single pass with reasoning and
|
|
80
87
|
// frame sampling turned all the way up. Priced well above the economy tiers
|
|
81
88
|
// because it genuinely costs more to run, and it is the only tier whose
|
|
82
89
|
// accuracy was measured against a hand-counted edit list.
|
|
83
|
-
"video-analysis:smart:60s":
|
|
84
|
-
"video-analysis:smart:180s":
|
|
85
|
-
"video-analysis:smart:360s":
|
|
86
|
-
"video-analysis:smart:600s":
|
|
90
|
+
"video-analysis:smart:60s": 454,
|
|
91
|
+
"video-analysis:smart:180s": 975,
|
|
92
|
+
"video-analysis:smart:360s": 2105,
|
|
93
|
+
"video-analysis:smart:600s": 3496,
|
|
87
94
|
}
|
|
88
95
|
|
|
89
96
|
/**
|