vidspotai-shared 1.0.75 → 1.0.77
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google.d.ts","sourceRoot":"","sources":["../../../../src/globals/aiModels/providers/google.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,eAAO,MAAM,aAAa,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"google.d.ts","sourceRoot":"","sources":["../../../../src/globals/aiModels/providers/google.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,eAAO,MAAM,aAAa,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,YAAY,CAAC,CAqSpE,CAAC"}
|
|
@@ -27,6 +27,16 @@ exports.googleConfigs = {
|
|
|
27
27
|
personGeneration: { allowedValues: ["allow_all", "allow_adult", "dont_allow"] },
|
|
28
28
|
promptOptimizer: {},
|
|
29
29
|
},
|
|
30
|
+
// Gemini API cross-constraint: 1080p and 4k ONLY support an 8s duration
|
|
31
|
+
// (the API rejects e.g. 1080p@6s with "1080p is not supported for a
|
|
32
|
+
// duration of 6 seconds"). 720p supports the full 4/6/8 range. Encoded here
|
|
33
|
+
// so validateParams fails fast with a clear message instead of a wasted
|
|
34
|
+
// provider call + opaque 400.
|
|
35
|
+
durationRules: {
|
|
36
|
+
4: ["720p"],
|
|
37
|
+
6: ["720p"],
|
|
38
|
+
8: ["720p", "1080p", "4k"],
|
|
39
|
+
},
|
|
30
40
|
requestPerMin: 50,
|
|
31
41
|
cost: {
|
|
32
42
|
// Vertex: $0.40/s @ 720p/1080p, $0.60/s @ 4k.
|
|
@@ -57,6 +67,12 @@ exports.googleConfigs = {
|
|
|
57
67
|
personGeneration: { allowedValues: ["allow_all", "allow_adult", "dont_allow"] },
|
|
58
68
|
promptOptimizer: {},
|
|
59
69
|
},
|
|
70
|
+
// 1080p only supports 8s on the Gemini API (no 4k for fast). See veo-3.1.
|
|
71
|
+
durationRules: {
|
|
72
|
+
4: ["720p"],
|
|
73
|
+
6: ["720p"],
|
|
74
|
+
8: ["720p", "1080p"],
|
|
75
|
+
},
|
|
60
76
|
requestPerMin: 50,
|
|
61
77
|
cost: {
|
|
62
78
|
perResolution: { "720p": 0.10, "1080p": 0.12 },
|
|
@@ -72,8 +88,12 @@ exports.googleConfigs = {
|
|
|
72
88
|
resolution: { allowedValues: ["720p", "1080p"] },
|
|
73
89
|
duration: { allowedValues: [4, 6, 8] },
|
|
74
90
|
imageUrl: {},
|
|
75
|
-
|
|
76
|
-
//
|
|
91
|
+
// REMOVED — veo-3.1-lite does NOT support last-frame interpolation. Sending
|
|
92
|
+
// first+last frames returns Gemini 400 "Your use case is currently not
|
|
93
|
+
// supported." Per the Gemini API video docs, `lastFrame` is offered only
|
|
94
|
+
// for veo-3.1 and veo-3.1-fast. Kept commented for reference.
|
|
95
|
+
// lastFrameImageUrl: {},
|
|
96
|
+
// Lite also does NOT support reference images or video extension per the
|
|
77
97
|
// Gemini API spec — only 3.1 and 3.1-fast do.
|
|
78
98
|
negative_prompt: {},
|
|
79
99
|
audio: {},
|
|
@@ -81,6 +101,12 @@ exports.googleConfigs = {
|
|
|
81
101
|
personGeneration: { allowedValues: ["allow_all", "allow_adult", "dont_allow"] },
|
|
82
102
|
promptOptimizer: {},
|
|
83
103
|
},
|
|
104
|
+
// 1080p only supports 8s on the Gemini API (no 4k for lite). See veo-3.1.
|
|
105
|
+
durationRules: {
|
|
106
|
+
4: ["720p"],
|
|
107
|
+
6: ["720p"],
|
|
108
|
+
8: ["720p", "1080p"],
|
|
109
|
+
},
|
|
84
110
|
requestPerMin: 50,
|
|
85
111
|
cost: {
|
|
86
112
|
perResolution: { "720p": 0.05, "1080p": 0.08 },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/services/aiGen/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,wBAAgB,cAAc,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/services/aiGen/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,wBAAgB,cAAc,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAqJrE"}
|
|
@@ -33,6 +33,17 @@ function validateParams(params) {
|
|
|
33
33
|
errors.push(`Too many items for ${field}: got ${value.length}, max ${rules.max}`);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
+
// 1c. Capability-field validation. The loop above only iterates fields the
|
|
37
|
+
// model DECLARES, so a feature input the model doesn't support would pass
|
|
38
|
+
// silently here and then fail at the provider with an opaque 400 (e.g.
|
|
39
|
+
// veo-3.1-lite has no last-frame interpolation — only veo-3.1 / veo-3.1-fast
|
|
40
|
+
// do — so first+last frames return Gemini's "Your use case is currently not
|
|
41
|
+
// supported."). Reject up front with a clear, actionable message and avoid a
|
|
42
|
+
// wasted billed provider call.
|
|
43
|
+
if (params.lastFrameImageUrl != null &&
|
|
44
|
+
!("lastFrameImageUrl" in modelConfig.fields)) {
|
|
45
|
+
errors.push(`Model ${params.modelKey} does not support last-frame interpolation (lastFrameImageUrl)`);
|
|
46
|
+
}
|
|
36
47
|
// 2. Type-specific required fields
|
|
37
48
|
if (params.type === "image-to-video" &&
|
|
38
49
|
(!modelConfig.type.includes("image-to-video") || !params.inputImageUrl)) {
|