@nodaro/shared 1.24.0 → 2.0.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 +309 -290
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -2
- package/dist/index.d.ts +9 -2
- package/dist/index.js +307 -291
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/credit-conversion.test.ts +53 -0
- package/src/__tests__/video-analysis-catalog-sync.test.ts +4 -3
- package/src/credit-conversion.ts +39 -0
- package/src/index.ts +2 -0
- package/src/model-catalog.ts +269 -269
- package/src/model-constants.ts +1 -1
- package/src/video-analysis-pricing.ts +25 -20
package/src/model-constants.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { z } from "zod"
|
|
|
6
6
|
import { MODEL_CATALOG } from "./model-catalog.js"
|
|
7
7
|
|
|
8
8
|
/** Base USD cost per 1 Nodaro credit, at cost. Used for cost→credit conversion. */
|
|
9
|
-
export const CREDIT_BASE_USD = 0.
|
|
9
|
+
export const CREDIT_BASE_USD = 0.002
|
|
10
10
|
|
|
11
11
|
/** Max characters for the (assembled) prompt accepted by the image-generation routes
|
|
12
12
|
* (generate-image, image-to-image, edit-image). Single source of truth — the route Zod
|
|
@@ -48,37 +48,42 @@ 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 new credit base — NOT a
|
|
52
|
+
// mechanical x10 of the old table. The formula ceils USD into credits, so a
|
|
53
|
+
// 10x finer base rounds LESS: the 60s flash bucket is 23, where x10 of the old
|
|
54
|
+
// 3 would have been 30 (a ~30% over-charge). A CI cross-check in the plugin
|
|
55
|
+
// asserts this table equals what its videoAnalysisBucketCredits produces.
|
|
51
56
|
export const VIDEO_ANALYSIS_BUCKET_CREDITS: Record<string, number> = {
|
|
52
57
|
// Legacy fast-tier model (pre-2026-07) — kept for stored raw-id configs.
|
|
53
|
-
"video-analysis:gemini-3-flash:60s":
|
|
54
|
-
"video-analysis:gemini-3-flash:180s":
|
|
55
|
-
"video-analysis:gemini-3-flash:360s":
|
|
56
|
-
"video-analysis:gemini-3-flash:600s":
|
|
58
|
+
"video-analysis:gemini-3-flash:60s": 23,
|
|
59
|
+
"video-analysis:gemini-3-flash:180s": 32,
|
|
60
|
+
"video-analysis:gemini-3-flash:360s": 81,
|
|
61
|
+
"video-analysis:gemini-3-flash:600s": 136,
|
|
57
62
|
// Current fast tier — regenerated from the private formula for its backing
|
|
58
63
|
// model; higher than the legacy fast schedule but still ≤ pro per bucket.
|
|
59
|
-
"video-analysis:gemini-3.6-flash:60s":
|
|
60
|
-
"video-analysis:gemini-3.6-flash:180s":
|
|
61
|
-
"video-analysis:gemini-3.6-flash:360s":
|
|
62
|
-
"video-analysis:gemini-3.6-flash:600s":
|
|
63
|
-
"video-analysis:gemini-3.1-pro:60s":
|
|
64
|
-
"video-analysis:gemini-3.1-pro:180s":
|
|
65
|
-
"video-analysis:gemini-3.1-pro:360s":
|
|
66
|
-
"video-analysis:gemini-3.1-pro:600s":
|
|
64
|
+
"video-analysis:gemini-3.6-flash:60s": 61,
|
|
65
|
+
"video-analysis:gemini-3.6-flash:180s": 88,
|
|
66
|
+
"video-analysis:gemini-3.6-flash:360s": 224,
|
|
67
|
+
"video-analysis:gemini-3.6-flash:600s": 374,
|
|
68
|
+
"video-analysis:gemini-3.1-pro:60s": 82,
|
|
69
|
+
"video-analysis:gemini-3.1-pro:180s": 111,
|
|
70
|
+
"video-analysis:gemini-3.1-pro:360s": 291,
|
|
71
|
+
"video-analysis:gemini-3.1-pro:600s": 486,
|
|
67
72
|
// Mixed tiers (`mixed` + `mixed-fast`) share ONE credit family — they are
|
|
68
73
|
// variants of the same engine plan (plan internals live in the private
|
|
69
74
|
// analysis plugin). Admin-tunable via model_pricing like every other row.
|
|
70
|
-
"video-analysis:mixed:60s":
|
|
71
|
-
"video-analysis:mixed:180s":
|
|
72
|
-
"video-analysis:mixed:360s":
|
|
73
|
-
"video-analysis:mixed:600s":
|
|
75
|
+
"video-analysis:mixed:60s": 110,
|
|
76
|
+
"video-analysis:mixed:180s": 150,
|
|
77
|
+
"video-analysis:mixed:360s": 380,
|
|
78
|
+
"video-analysis:mixed:600s": 630,
|
|
74
79
|
// SMART — the one native-transport plan: a single pass with reasoning and
|
|
75
80
|
// frame sampling turned all the way up. Priced well above the economy tiers
|
|
76
81
|
// because it genuinely costs more to run, and it is the only tier whose
|
|
77
82
|
// accuracy was measured against a hand-counted edit list.
|
|
78
|
-
"video-analysis:smart:60s":
|
|
79
|
-
"video-analysis:smart:180s":
|
|
80
|
-
"video-analysis:smart:360s":
|
|
81
|
-
"video-analysis:smart:600s":
|
|
83
|
+
"video-analysis:smart:60s": 460,
|
|
84
|
+
"video-analysis:smart:180s": 980,
|
|
85
|
+
"video-analysis:smart:360s": 2110,
|
|
86
|
+
"video-analysis:smart:600s": 3500,
|
|
82
87
|
}
|
|
83
88
|
|
|
84
89
|
/**
|