vidspotai-shared 1.0.67 → 1.0.68
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/lib/globals/aiModels/index.d.ts +30 -0
- package/lib/globals/aiModels/index.d.ts.map +1 -1
- package/lib/globals/aiModels/index.js +35 -1
- package/lib/globals/aiModels/providers/minimax.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/minimax.js +9 -3
- package/lib/models/video.model.d.ts +8 -0
- package/lib/models/video.model.d.ts.map +1 -1
- package/lib/services/aiGen/providers/bytedance/bytedance.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/bytedance/bytedance.service.js +6 -0
- package/lib/services/aiGen/providers/minimax/minimax.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/minimax/minimax.service.js +4 -1
- package/package.json +1 -1
|
@@ -3,4 +3,34 @@ export * from "./types";
|
|
|
3
3
|
import { TAiGenModel } from "./enums";
|
|
4
4
|
import { IModelSchema } from "./types";
|
|
5
5
|
export declare const aiModelConfigs: Record<TAiGenModel, IModelSchema>;
|
|
6
|
+
export interface IProviderRateLimit {
|
|
7
|
+
concurrentRequests?: number;
|
|
8
|
+
requestPerMin?: number;
|
|
9
|
+
requestPerDay?: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Per-provider rate limits applied IN ADDITION TO any per-model limits.
|
|
13
|
+
* Use this when a provider documents a single bucket shared across multiple
|
|
14
|
+
* models (e.g. Minimax: 5 RPM across all Hailuo Video Generation models).
|
|
15
|
+
*
|
|
16
|
+
* The rate-limit factory composes the matching provider limiter as a parent
|
|
17
|
+
* of the model limiter — both buckets must have a free slot before a request
|
|
18
|
+
* proceeds, and both are reserved/released atomically.
|
|
19
|
+
*
|
|
20
|
+
* Keyed by the prefix segment of the modelKey (everything before the first
|
|
21
|
+
* "-"). If a provider exposes multiple APIs with different shared buckets
|
|
22
|
+
* (e.g. Minimax video 5 RPM vs Minimax LLM 500 RPM), split into a separate
|
|
23
|
+
* key here and stop using the prefix-based default for that group.
|
|
24
|
+
*/
|
|
25
|
+
export declare const aiProviderRateLimits: Record<string, IProviderRateLimit>;
|
|
26
|
+
/**
|
|
27
|
+
* Returns the provider key for a given modelKey — everything before the first
|
|
28
|
+
* "-". Used both for provider-level rate-limit lookups and for detecting
|
|
29
|
+
* cross-provider task mismatches (a scene whose `task` was issued by provider
|
|
30
|
+
* X should never be polled with provider Y after a modelKey swap).
|
|
31
|
+
*
|
|
32
|
+
* Matches the prefix convention used in EVideoGenModels / ETextGenModels.
|
|
33
|
+
* E.g. "minimax-hailuo-2.3" → "minimax", "google-veo-3.1-lite" → "google".
|
|
34
|
+
*/
|
|
35
|
+
export declare function getProviderKey(modelKey: string): string;
|
|
6
36
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/globals/aiModels/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAUvC,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,WAAW,EAAE,YAAY,CAQvB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/globals/aiModels/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAUvC,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,WAAW,EAAE,YAAY,CAQvB,CAAC;AAEvC,MAAM,WAAW,kBAAkB;IACjC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAMnE,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEvD"}
|
|
@@ -14,7 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.aiModelConfigs = void 0;
|
|
17
|
+
exports.aiProviderRateLimits = exports.aiModelConfigs = void 0;
|
|
18
|
+
exports.getProviderKey = getProviderKey;
|
|
18
19
|
__exportStar(require("./enums"), exports);
|
|
19
20
|
__exportStar(require("./types"), exports);
|
|
20
21
|
const pixverse_1 = require("./providers/pixverse");
|
|
@@ -33,3 +34,36 @@ exports.aiModelConfigs = {
|
|
|
33
34
|
...minimax_1.minimaxConfigs,
|
|
34
35
|
...openai_1.openaiConfigs,
|
|
35
36
|
};
|
|
37
|
+
/**
|
|
38
|
+
* Per-provider rate limits applied IN ADDITION TO any per-model limits.
|
|
39
|
+
* Use this when a provider documents a single bucket shared across multiple
|
|
40
|
+
* models (e.g. Minimax: 5 RPM across all Hailuo Video Generation models).
|
|
41
|
+
*
|
|
42
|
+
* The rate-limit factory composes the matching provider limiter as a parent
|
|
43
|
+
* of the model limiter — both buckets must have a free slot before a request
|
|
44
|
+
* proceeds, and both are reserved/released atomically.
|
|
45
|
+
*
|
|
46
|
+
* Keyed by the prefix segment of the modelKey (everything before the first
|
|
47
|
+
* "-"). If a provider exposes multiple APIs with different shared buckets
|
|
48
|
+
* (e.g. Minimax video 5 RPM vs Minimax LLM 500 RPM), split into a separate
|
|
49
|
+
* key here and stop using the prefix-based default for that group.
|
|
50
|
+
*/
|
|
51
|
+
exports.aiProviderRateLimits = {
|
|
52
|
+
// Minimax Video Generation API: 5 RPM shared across Hailuo 2.3, 2.3-Fast, 02
|
|
53
|
+
// https://platform.minimax.io/docs/guides/rate-limits
|
|
54
|
+
// Safe to key as "minimax" only while we have no Minimax LLM/TTS/Image
|
|
55
|
+
// models registered — re-key when that changes.
|
|
56
|
+
minimax: { requestPerMin: 5 },
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Returns the provider key for a given modelKey — everything before the first
|
|
60
|
+
* "-". Used both for provider-level rate-limit lookups and for detecting
|
|
61
|
+
* cross-provider task mismatches (a scene whose `task` was issued by provider
|
|
62
|
+
* X should never be polled with provider Y after a modelKey swap).
|
|
63
|
+
*
|
|
64
|
+
* Matches the prefix convention used in EVideoGenModels / ETextGenModels.
|
|
65
|
+
* E.g. "minimax-hailuo-2.3" → "minimax", "google-veo-3.1-lite" → "google".
|
|
66
|
+
*/
|
|
67
|
+
function getProviderKey(modelKey) {
|
|
68
|
+
return modelKey.split("-")[0] ?? modelKey;
|
|
69
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"minimax.d.ts","sourceRoot":"","sources":["../../../../src/globals/aiModels/providers/minimax.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,eAAO,MAAM,cAAc,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"minimax.d.ts","sourceRoot":"","sources":["../../../../src/globals/aiModels/providers/minimax.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,eAAO,MAAM,cAAc,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,YAAY,CAAC,CAsErE,CAAC"}
|
|
@@ -14,7 +14,9 @@ exports.minimaxConfigs = {
|
|
|
14
14
|
6: ["768P", "1080P"],
|
|
15
15
|
10: ["768P"],
|
|
16
16
|
},
|
|
17
|
-
//
|
|
17
|
+
// No per-model rate limits — Minimax enforces a single 5 RPM bucket
|
|
18
|
+
// shared across ALL Hailuo Video Generation models, configured at the
|
|
19
|
+
// provider level in aiProviderRateLimits.minimax.
|
|
18
20
|
cost: {
|
|
19
21
|
table: {
|
|
20
22
|
"768P": { 6: 0.19, 10: 0.32 },
|
|
@@ -34,7 +36,9 @@ exports.minimaxConfigs = {
|
|
|
34
36
|
6: ["768P", "1080P"],
|
|
35
37
|
10: ["768P"],
|
|
36
38
|
},
|
|
37
|
-
//
|
|
39
|
+
// No per-model rate limits — Minimax enforces a single 5 RPM bucket
|
|
40
|
+
// shared across ALL Hailuo Video Generation models, configured at the
|
|
41
|
+
// provider level in aiProviderRateLimits.minimax.
|
|
38
42
|
cost: {
|
|
39
43
|
table: {
|
|
40
44
|
"768P": { 6: 0.28, 10: 0.56 },
|
|
@@ -54,7 +58,9 @@ exports.minimaxConfigs = {
|
|
|
54
58
|
6: ["512P", "768P", "1080P"],
|
|
55
59
|
10: ["512P", "768P"],
|
|
56
60
|
},
|
|
57
|
-
//
|
|
61
|
+
// No per-model rate limits — Minimax enforces a single 5 RPM bucket
|
|
62
|
+
// shared across ALL Hailuo Video Generation models, configured at the
|
|
63
|
+
// provider level in aiProviderRateLimits.minimax.
|
|
58
64
|
cost: {
|
|
59
65
|
table: {
|
|
60
66
|
"512P": { 6: 0.1, 10: 0.15 },
|
|
@@ -4,6 +4,14 @@ import { EVideoDurationType, EVideoJobStatus, EVideoSceneStatus, TVideoJobTask,
|
|
|
4
4
|
import { EVideoMode } from "../services/aiGen/types";
|
|
5
5
|
export interface IVideoScene {
|
|
6
6
|
task?: TVideoJobTask;
|
|
7
|
+
/**
|
|
8
|
+
* Provider that issued `task` (e.g. "google", "kling", "minimax"). Persisted
|
|
9
|
+
* alongside `task` so the resume path can detect a stale cross-provider
|
|
10
|
+
* mismatch — when the job's current modelKey resolves to a different provider
|
|
11
|
+
* than the one that originally created the task, polling the new provider
|
|
12
|
+
* with the old task ID would 404. Such tasks are cleared and re-submitted.
|
|
13
|
+
*/
|
|
14
|
+
taskProvider?: string;
|
|
7
15
|
sceneIndex: number;
|
|
8
16
|
duration?: number;
|
|
9
17
|
prompt?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video.model.d.ts","sourceRoot":"","sources":["../../src/models/video.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,WAAW,EACZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IAEnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CAOpB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAA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C;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;8CAE0C;IAC1C,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAI9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAGnB,SAAS,EAAE,UAAU,CAAC;IACtB,SAAS,EAAE,UAAU,CAAC;IACtB,aAAa,CAAC,EAAE,UAAU,CAAC;CAC5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bytedance.service.d.ts","sourceRoot":"","sources":["../../../../../src/services/aiGen/providers/bytedance/bytedance.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAUlB,qBAAa,gBAAiB,SAAQ,wBAAwB;IAC5D,OAAO,CAAC,QAAQ,CAAC,OAAO,CACsD;IAI9E,OAAO,CAAC,cAAc;IAStB,OAAO,CAAC,WAAW;IAIb,aAAa,CACjB,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"bytedance.service.d.ts","sourceRoot":"","sources":["../../../../../src/services/aiGen/providers/bytedance/bytedance.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAUlB,qBAAa,gBAAiB,SAAQ,wBAAwB;IAC5D,OAAO,CAAC,QAAQ,CAAC,OAAO,CACsD;IAI9E,OAAO,CAAC,cAAc;IAStB,OAAO,CAAC,WAAW;IAIb,aAAa,CACjB,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,qBAAqB,CAAC;IA2K3B,gBAAgB,CAAC,EACrB,IAAI,EACJ,cAAc,EACd,cAAyB,GAC1B,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IA4HjD,aAAa,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM;CAgDjD"}
|
|
@@ -128,6 +128,12 @@ class ByteDanceService extends baseAiGenProvider_service_1.BaseAiGenProviderServ
|
|
|
128
128
|
if (code?.startsWith("InputImageSensitiveContentDetected")) {
|
|
129
129
|
throw new errors_1.UserFacingError("Your input image contains sensitive content and cannot be processed. Please use a different image.");
|
|
130
130
|
}
|
|
131
|
+
// Seedance r2v (reference-to-video) rejects input videos that contain
|
|
132
|
+
// real people / PII synchronously with this code. Treat as user-facing
|
|
133
|
+
// so we don't page Slack for moderation hits.
|
|
134
|
+
if (code?.startsWith("InputVideoSensitiveContentDetected")) {
|
|
135
|
+
throw new errors_1.UserFacingError("Your input video contains content (e.g. a recognizable real person) that this model cannot process. Please use a different video or an AI-generated clip.");
|
|
136
|
+
}
|
|
131
137
|
if (code === "InvalidParameter.UnsupportedImageFormat" || (code?.includes("UnsupportedImageFormat"))) {
|
|
132
138
|
throw new errors_1.UserFacingError("Your input image format is not supported. Please use JPEG or PNG.");
|
|
133
139
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"minimax.service.d.ts","sourceRoot":"","sources":["../../../../../src/services/aiGen/providers/minimax/minimax.service.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAUlB;;;GAGG;AAGH,eAAO,MAAM,+BAA+B,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"minimax.service.d.ts","sourceRoot":"","sources":["../../../../../src/services/aiGen/providers/minimax/minimax.service.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAUlB;;;GAGG;AAGH,eAAO,MAAM,+BAA+B,uBAAuB,CAAC;AAsGpE,qBAAa,cAAe,SAAQ,wBAAwB;IAC1D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA4B;IAEpD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;;YAUlB,OAAO;IAuDf,aAAa,CACjB,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,qBAAqB,CAAC;IAoD3B,gBAAgB,CAAC,EACrB,IAAI,EACJ,cAAc,EACd,cAAyB,GAC1B,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IA6EjD,aAAa,CAAC,EACZ,QAAQ,EACR,UAAmB,EACnB,QAAY,EACZ,SAAiB,GAClB,EAAE,iBAAiB,GAAG,MAAM;CAW9B"}
|
|
@@ -56,7 +56,10 @@ function classifyMinimaxError(code, msg) {
|
|
|
56
56
|
case 1027:
|
|
57
57
|
return { message: "Your request was declined because the generated content was flagged for sensitive material. Please adjust your prompt and try again.", code: errors_1.USER_FACING_ERROR_CODES.CONTENT_POLICY_VIOLATION, isUserInput: true };
|
|
58
58
|
case 1002:
|
|
59
|
-
|
|
59
|
+
// Minimax-side rate limit. Not strictly "user input" but treated as
|
|
60
|
+
// user-facing so the frontend shows a translated retry message AND so
|
|
61
|
+
// sceneGeneration logs it as warn (no Slack page for upstream throttle).
|
|
62
|
+
return { message: "The request was rejected due to a rate limit or quota issue. Please try again in a moment.", code: errors_1.USER_FACING_ERROR_CODES.VIDEO_PROVIDER_RATE_LIMITED, isUserInput: true };
|
|
60
63
|
case 1004:
|
|
61
64
|
return { message: "Authorization failed for the video generation service. Please contact support.", isUserInput: false };
|
|
62
65
|
default:
|