@milenyumai/film-kit 2.3.3 → 2.3.5
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/MODEL_REGISTRY.md +136 -0
- package/README.md +26 -2
- package/build/index.d.ts +3 -1
- package/build/index.js +1 -0
- package/build/lib/cli.js +26 -10
- package/build/lib/configure.js +16 -17
- package/build/lib/defaults.js +10 -0
- package/build/lib/film-kit.js +16 -1
- package/build/lib/model-registry/index.d.ts +4 -0
- package/build/lib/model-registry/index.js +3 -0
- package/build/lib/model-registry/registry.d.ts +220 -0
- package/build/lib/model-registry/registry.js +191 -0
- package/build/lib/model-registry/selectors.d.ts +23 -0
- package/build/lib/model-registry/selectors.js +80 -0
- package/build/lib/model-registry/types.d.ts +59 -0
- package/build/lib/model-registry/types.js +1 -0
- package/build/lib/model-registry/validation.d.ts +3 -0
- package/build/lib/model-registry/validation.js +42 -0
- package/build/lib/storyboard-reference/adapters/base.js +2 -5
- package/build/lib/storyboard-reference/adapters/seedance20.js +5 -5
- package/build/lib/storyboard-reference/defaults.js +2 -1
- package/build/lib/storyboard-reference/index.d.ts +1 -1
- package/build/lib/storyboard-reference/output-writer.js +6 -0
- package/build/lib/storyboard-reference/prompt-bundle-builder.js +103 -22
- package/build/lib/storyboard-reference/request-normalizer.js +6 -4
- package/build/lib/storyboard-reference/types.d.ts +25 -0
- package/build/lib/storyboard-reference/validators.js +4 -0
- package/build/lib/templates.js +1 -1
- package/build/lib/types.d.ts +2 -1
- package/content/skills/storyboard-reference/SKILL.md +7 -4
- package/content/workflows/generate-storyboard.md +7 -6
- package/package.json +2 -1
- package/packages/gpt-image-smart/content/skills/storyboard-reference/SKILL.md +7 -4
- package/packages/gpt-image-smart/content/workflows/generate-storyboard.md +7 -6
- package/packages/hybrid/content/skills/storyboard-reference/SKILL.md +7 -4
- package/packages/hybrid/content/workflows/generate-storyboard.md +7 -6
- package/packages/hybrid-smart/content/skills/storyboard-reference/SKILL.md +7 -4
- package/packages/hybrid-smart/content/workflows/generate-storyboard.md +7 -6
- package/packages/multi/build/lib/configure.js +4 -4
- package/packages/multi/build/lib/templates.js +9 -9
- package/packages/multi/content/skills/storyboard-reference/SKILL.md +7 -4
- package/packages/multi/content/workflows/generate-storyboard.md +7 -6
- package/packages/studio/content/skills/storyboard-reference/SKILL.md +7 -4
- package/packages/studio/content/workflows/generate-storyboard.md +7 -6
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import type { ModelRegistryEntry } from "./types.js";
|
|
2
|
+
export declare const MODEL_REGISTRY: {
|
|
3
|
+
readonly veo31: {
|
|
4
|
+
readonly id: "veo31";
|
|
5
|
+
readonly displayName: "Google Flow + Veo 3.1";
|
|
6
|
+
readonly provider: "google";
|
|
7
|
+
readonly modalities: readonly ["video"];
|
|
8
|
+
readonly lifecycleStatus: "active";
|
|
9
|
+
readonly supportedPresets: readonly ["single", "multi", "studio"];
|
|
10
|
+
readonly supportedReferenceModes: readonly ["start-end", "storyboard-reference"];
|
|
11
|
+
readonly supportedAspects: readonly ["16:9", "9:16", "1:1"];
|
|
12
|
+
readonly durationRange: {
|
|
13
|
+
readonly minSeconds: 4;
|
|
14
|
+
readonly maxSeconds: 8;
|
|
15
|
+
};
|
|
16
|
+
readonly durationPolicy: "Default Film-Kit Veo runtime duration is 8 seconds.";
|
|
17
|
+
readonly adapterKey: "veo31";
|
|
18
|
+
readonly promptGrammarKey: "veo31";
|
|
19
|
+
readonly modelProfileKey: "veo31";
|
|
20
|
+
readonly routingRole: "primary-video";
|
|
21
|
+
readonly capabilities: {
|
|
22
|
+
readonly characterReference: true;
|
|
23
|
+
readonly storyboardReference: true;
|
|
24
|
+
readonly audioPlan: true;
|
|
25
|
+
readonly dialogue: true;
|
|
26
|
+
readonly startEndFrames: true;
|
|
27
|
+
readonly customStoryboardPhases: true;
|
|
28
|
+
readonly maxStoryboardPhases: 4;
|
|
29
|
+
};
|
|
30
|
+
readonly docsVisibility: "public";
|
|
31
|
+
};
|
|
32
|
+
readonly "seedance-2.0": {
|
|
33
|
+
readonly id: "seedance-2.0";
|
|
34
|
+
readonly displayName: "Seedance 2.0";
|
|
35
|
+
readonly provider: "bytedance";
|
|
36
|
+
readonly modalities: readonly ["video"];
|
|
37
|
+
readonly lifecycleStatus: "active";
|
|
38
|
+
readonly supportedPresets: readonly ["single", "multi", "studio"];
|
|
39
|
+
readonly supportedReferenceModes: readonly ["start-end", "storyboard-reference"];
|
|
40
|
+
readonly supportedAspects: readonly ["16:9", "9:16", "1:1"];
|
|
41
|
+
readonly durationRange: {
|
|
42
|
+
readonly minSeconds: 4;
|
|
43
|
+
readonly maxSeconds: 15;
|
|
44
|
+
};
|
|
45
|
+
readonly durationPolicy: "Seedance storyboard-reference policy uses 4-15 second shots.";
|
|
46
|
+
readonly adapterKey: "seedance20";
|
|
47
|
+
readonly promptGrammarKey: "seedance20";
|
|
48
|
+
readonly modelProfileKey: "seedance20";
|
|
49
|
+
readonly routingRole: "storyboard-video";
|
|
50
|
+
readonly capabilities: {
|
|
51
|
+
readonly characterReference: true;
|
|
52
|
+
readonly storyboardReference: true;
|
|
53
|
+
readonly multipleImageReferences: true;
|
|
54
|
+
readonly audioPlan: true;
|
|
55
|
+
readonly dialogue: true;
|
|
56
|
+
readonly customStoryboardPhases: true;
|
|
57
|
+
readonly maxStoryboardPhases: 4;
|
|
58
|
+
readonly maxReferenceImages: 9;
|
|
59
|
+
readonly maxReferenceVideos: 3;
|
|
60
|
+
readonly maxReferenceAudio: 3;
|
|
61
|
+
readonly maxReferenceFiles: 12;
|
|
62
|
+
};
|
|
63
|
+
readonly docsVisibility: "public";
|
|
64
|
+
};
|
|
65
|
+
readonly "kling-3.0": {
|
|
66
|
+
readonly id: "kling-3.0";
|
|
67
|
+
readonly displayName: "Kling 3.0";
|
|
68
|
+
readonly provider: "kuaishou";
|
|
69
|
+
readonly modalities: readonly ["video"];
|
|
70
|
+
readonly lifecycleStatus: "active";
|
|
71
|
+
readonly supportedPresets: readonly ["single", "multi", "hybrid", "hybrid-smart", "gpt-image-smart", "studio"];
|
|
72
|
+
readonly supportedReferenceModes: readonly ["start-end", "storyboard-reference", "hybrid"];
|
|
73
|
+
readonly supportedAspects: readonly ["16:9", "9:16", "1:1"];
|
|
74
|
+
readonly durationRange: {
|
|
75
|
+
readonly minSeconds: 5;
|
|
76
|
+
readonly maxSeconds: 15;
|
|
77
|
+
};
|
|
78
|
+
readonly durationPolicy: "Kling 3.0 supports Film-Kit start/end and smart-routed video generation.";
|
|
79
|
+
readonly adapterKey: "kling30";
|
|
80
|
+
readonly promptGrammarKey: "kling30";
|
|
81
|
+
readonly modelProfileKey: "kling30";
|
|
82
|
+
readonly routingRole: "primary-video";
|
|
83
|
+
readonly capabilities: {
|
|
84
|
+
readonly characterReference: true;
|
|
85
|
+
readonly storyboardReference: true;
|
|
86
|
+
readonly audioPlan: true;
|
|
87
|
+
readonly startEndFrames: true;
|
|
88
|
+
readonly customStoryboardPhases: true;
|
|
89
|
+
readonly maxStoryboardPhases: 4;
|
|
90
|
+
};
|
|
91
|
+
readonly docsVisibility: "public";
|
|
92
|
+
};
|
|
93
|
+
readonly "gpt-image-2": {
|
|
94
|
+
readonly id: "gpt-image-2";
|
|
95
|
+
readonly displayName: "GPT Image 2";
|
|
96
|
+
readonly provider: "openai";
|
|
97
|
+
readonly modalities: readonly ["image"];
|
|
98
|
+
readonly lifecycleStatus: "active";
|
|
99
|
+
readonly supportedPresets: readonly ["hybrid", "hybrid-smart", "gpt-image-smart", "studio"];
|
|
100
|
+
readonly supportedReferenceModes: readonly ["start-end", "storyboard-reference", "hybrid"];
|
|
101
|
+
readonly supportedAspects: readonly ["16:9", "9:16", "1:1"];
|
|
102
|
+
readonly durationPolicy: "Still-image model; video duration is not applicable.";
|
|
103
|
+
readonly adapterKey: "gptImage2";
|
|
104
|
+
readonly promptGrammarKey: "gptImage2";
|
|
105
|
+
readonly modelProfileKey: "gptImage2";
|
|
106
|
+
readonly routingRole: "image-reference";
|
|
107
|
+
readonly capabilities: {
|
|
108
|
+
readonly characterReference: true;
|
|
109
|
+
readonly storyboardReference: true;
|
|
110
|
+
};
|
|
111
|
+
readonly docsVisibility: "public";
|
|
112
|
+
};
|
|
113
|
+
readonly "gemini-3-pro-image-preview": {
|
|
114
|
+
readonly id: "gemini-3-pro-image-preview";
|
|
115
|
+
readonly displayName: "Gemini 3 Pro Image Preview";
|
|
116
|
+
readonly provider: "google";
|
|
117
|
+
readonly modalities: readonly ["image"];
|
|
118
|
+
readonly lifecycleStatus: "experimental";
|
|
119
|
+
readonly supportedPresets: readonly ["hybrid", "hybrid-smart"];
|
|
120
|
+
readonly supportedReferenceModes: readonly ["start-end", "storyboard-reference", "hybrid"];
|
|
121
|
+
readonly supportedAspects: readonly ["16:9", "9:16", "1:1"];
|
|
122
|
+
readonly durationPolicy: "Still-image model used by internal hybrid presets; video duration is not applicable.";
|
|
123
|
+
readonly adapterKey: "none";
|
|
124
|
+
readonly promptGrammarKey: "generic";
|
|
125
|
+
readonly modelProfileKey: "generic";
|
|
126
|
+
readonly routingRole: "image-reference";
|
|
127
|
+
readonly capabilities: {
|
|
128
|
+
readonly characterReference: true;
|
|
129
|
+
readonly storyboardReference: true;
|
|
130
|
+
};
|
|
131
|
+
readonly docsVisibility: "internal";
|
|
132
|
+
};
|
|
133
|
+
readonly "smart-dialogue-router": {
|
|
134
|
+
readonly id: "smart-dialogue-router";
|
|
135
|
+
readonly displayName: "Smart Dialogue Router";
|
|
136
|
+
readonly provider: "film-kit";
|
|
137
|
+
readonly modalities: readonly ["multimodal"];
|
|
138
|
+
readonly lifecycleStatus: "active";
|
|
139
|
+
readonly supportedPresets: readonly ["hybrid-smart", "gpt-image-smart"];
|
|
140
|
+
readonly supportedReferenceModes: readonly ["start-end", "storyboard-reference", "hybrid"];
|
|
141
|
+
readonly supportedAspects: readonly ["16:9", "9:16", "1:1"];
|
|
142
|
+
readonly durationPolicy: "Internal routing policy; routes dialogue/lip-sync to Veo and non-dialogue shots to Kling.";
|
|
143
|
+
readonly adapterKey: "none";
|
|
144
|
+
readonly promptGrammarKey: "generic";
|
|
145
|
+
readonly modelProfileKey: "generic";
|
|
146
|
+
readonly routingRole: "smart-router";
|
|
147
|
+
readonly capabilities: {
|
|
148
|
+
readonly smartRouting: true;
|
|
149
|
+
readonly audioPlan: true;
|
|
150
|
+
readonly dialogue: true;
|
|
151
|
+
};
|
|
152
|
+
readonly docsVisibility: "internal";
|
|
153
|
+
};
|
|
154
|
+
readonly veo2: {
|
|
155
|
+
readonly id: "veo2";
|
|
156
|
+
readonly displayName: "Veo 2";
|
|
157
|
+
readonly provider: "google";
|
|
158
|
+
readonly modalities: readonly ["video"];
|
|
159
|
+
readonly lifecycleStatus: "deprecated";
|
|
160
|
+
readonly supportedPresets: readonly ["single", "multi", "studio"];
|
|
161
|
+
readonly supportedReferenceModes: readonly ["start-end", "storyboard-reference"];
|
|
162
|
+
readonly supportedAspects: readonly ["16:9", "9:16", "1:1"];
|
|
163
|
+
readonly durationRange: {
|
|
164
|
+
readonly minSeconds: 4;
|
|
165
|
+
readonly maxSeconds: 8;
|
|
166
|
+
};
|
|
167
|
+
readonly durationPolicy: "Deprecated legacy video model kept only for migration warnings.";
|
|
168
|
+
readonly adapterKey: "generic";
|
|
169
|
+
readonly promptGrammarKey: "generic";
|
|
170
|
+
readonly modelProfileKey: "generic";
|
|
171
|
+
readonly routingRole: "legacy-video";
|
|
172
|
+
readonly capabilities: {
|
|
173
|
+
readonly characterReference: true;
|
|
174
|
+
readonly storyboardReference: true;
|
|
175
|
+
readonly audioPlan: true;
|
|
176
|
+
readonly dialogue: true;
|
|
177
|
+
readonly startEndFrames: true;
|
|
178
|
+
readonly customStoryboardPhases: true;
|
|
179
|
+
readonly maxStoryboardPhases: 4;
|
|
180
|
+
};
|
|
181
|
+
readonly deprecationMessage: "veo2 is deprecated. Use veo31 for current Film-Kit video generation.";
|
|
182
|
+
readonly replacementModelId: "veo31";
|
|
183
|
+
readonly docsVisibility: "hidden";
|
|
184
|
+
};
|
|
185
|
+
readonly "kling-2.0": {
|
|
186
|
+
readonly id: "kling-2.0";
|
|
187
|
+
readonly displayName: "Kling 2.0";
|
|
188
|
+
readonly provider: "kuaishou";
|
|
189
|
+
readonly modalities: readonly ["video"];
|
|
190
|
+
readonly lifecycleStatus: "removed";
|
|
191
|
+
readonly supportedPresets: readonly [];
|
|
192
|
+
readonly supportedReferenceModes: readonly [];
|
|
193
|
+
readonly supportedAspects: readonly ["16:9", "9:16", "1:1"];
|
|
194
|
+
readonly durationPolicy: "Removed legacy model. Do not route generation here.";
|
|
195
|
+
readonly adapterKey: "none";
|
|
196
|
+
readonly promptGrammarKey: "generic";
|
|
197
|
+
readonly modelProfileKey: "generic";
|
|
198
|
+
readonly routingRole: "removed";
|
|
199
|
+
readonly capabilities: {};
|
|
200
|
+
readonly deprecationMessage: "kling-2.0 has been removed from Film-Kit. Use kling-3.0 instead.";
|
|
201
|
+
readonly replacementModelId: "kling-3.0";
|
|
202
|
+
readonly docsVisibility: "hidden";
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
export type KnownModelId = keyof typeof MODEL_REGISTRY;
|
|
206
|
+
type RegistryEntry<K extends KnownModelId = KnownModelId> = typeof MODEL_REGISTRY[K];
|
|
207
|
+
type ModelIdWithLifecycle<Status extends ModelRegistryEntry["lifecycleStatus"]> = {
|
|
208
|
+
[K in KnownModelId]: RegistryEntry<K>["lifecycleStatus"] extends Status ? K : never;
|
|
209
|
+
}[KnownModelId];
|
|
210
|
+
type ModelIdWithModality<Modality extends ModelRegistryEntry["modalities"][number]> = {
|
|
211
|
+
[K in KnownModelId]: Modality extends RegistryEntry<K>["modalities"][number] ? K : never;
|
|
212
|
+
}[KnownModelId];
|
|
213
|
+
export type ActiveModelId = ModelIdWithLifecycle<"active" | "experimental">;
|
|
214
|
+
export type DeprecatedModelId = ModelIdWithLifecycle<"deprecated">;
|
|
215
|
+
export type RemovedModelId = ModelIdWithLifecycle<"removed">;
|
|
216
|
+
export type VideoModelId = ModelIdWithModality<"video">;
|
|
217
|
+
export type ImageModelId = ModelIdWithModality<"image">;
|
|
218
|
+
export type AudioModelId = ModelIdWithModality<"audio">;
|
|
219
|
+
export type MultimodalModelId = ModelIdWithModality<"multimodal">;
|
|
220
|
+
export {};
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
export const MODEL_REGISTRY = {
|
|
2
|
+
veo31: {
|
|
3
|
+
id: "veo31",
|
|
4
|
+
displayName: "Google Flow + Veo 3.1",
|
|
5
|
+
provider: "google",
|
|
6
|
+
modalities: ["video"],
|
|
7
|
+
lifecycleStatus: "active",
|
|
8
|
+
supportedPresets: ["single", "multi", "studio"],
|
|
9
|
+
supportedReferenceModes: ["start-end", "storyboard-reference"],
|
|
10
|
+
supportedAspects: ["16:9", "9:16", "1:1"],
|
|
11
|
+
durationRange: { minSeconds: 4, maxSeconds: 8 },
|
|
12
|
+
durationPolicy: "Default Film-Kit Veo runtime duration is 8 seconds.",
|
|
13
|
+
adapterKey: "veo31",
|
|
14
|
+
promptGrammarKey: "veo31",
|
|
15
|
+
modelProfileKey: "veo31",
|
|
16
|
+
routingRole: "primary-video",
|
|
17
|
+
capabilities: {
|
|
18
|
+
characterReference: true,
|
|
19
|
+
storyboardReference: true,
|
|
20
|
+
audioPlan: true,
|
|
21
|
+
dialogue: true,
|
|
22
|
+
startEndFrames: true,
|
|
23
|
+
customStoryboardPhases: true,
|
|
24
|
+
maxStoryboardPhases: 4
|
|
25
|
+
},
|
|
26
|
+
docsVisibility: "public"
|
|
27
|
+
},
|
|
28
|
+
"seedance-2.0": {
|
|
29
|
+
id: "seedance-2.0",
|
|
30
|
+
displayName: "Seedance 2.0",
|
|
31
|
+
provider: "bytedance",
|
|
32
|
+
modalities: ["video"],
|
|
33
|
+
lifecycleStatus: "active",
|
|
34
|
+
supportedPresets: ["single", "multi", "studio"],
|
|
35
|
+
supportedReferenceModes: ["start-end", "storyboard-reference"],
|
|
36
|
+
supportedAspects: ["16:9", "9:16", "1:1"],
|
|
37
|
+
durationRange: { minSeconds: 4, maxSeconds: 15 },
|
|
38
|
+
durationPolicy: "Seedance storyboard-reference policy uses 4-15 second shots.",
|
|
39
|
+
adapterKey: "seedance20",
|
|
40
|
+
promptGrammarKey: "seedance20",
|
|
41
|
+
modelProfileKey: "seedance20",
|
|
42
|
+
routingRole: "storyboard-video",
|
|
43
|
+
capabilities: {
|
|
44
|
+
characterReference: true,
|
|
45
|
+
storyboardReference: true,
|
|
46
|
+
multipleImageReferences: true,
|
|
47
|
+
audioPlan: true,
|
|
48
|
+
dialogue: true,
|
|
49
|
+
customStoryboardPhases: true,
|
|
50
|
+
maxStoryboardPhases: 4,
|
|
51
|
+
maxReferenceImages: 9,
|
|
52
|
+
maxReferenceVideos: 3,
|
|
53
|
+
maxReferenceAudio: 3,
|
|
54
|
+
maxReferenceFiles: 12
|
|
55
|
+
},
|
|
56
|
+
docsVisibility: "public"
|
|
57
|
+
},
|
|
58
|
+
"kling-3.0": {
|
|
59
|
+
id: "kling-3.0",
|
|
60
|
+
displayName: "Kling 3.0",
|
|
61
|
+
provider: "kuaishou",
|
|
62
|
+
modalities: ["video"],
|
|
63
|
+
lifecycleStatus: "active",
|
|
64
|
+
supportedPresets: ["single", "multi", "hybrid", "hybrid-smart", "gpt-image-smart", "studio"],
|
|
65
|
+
supportedReferenceModes: ["start-end", "storyboard-reference", "hybrid"],
|
|
66
|
+
supportedAspects: ["16:9", "9:16", "1:1"],
|
|
67
|
+
durationRange: { minSeconds: 5, maxSeconds: 15 },
|
|
68
|
+
durationPolicy: "Kling 3.0 supports Film-Kit start/end and smart-routed video generation.",
|
|
69
|
+
adapterKey: "kling30",
|
|
70
|
+
promptGrammarKey: "kling30",
|
|
71
|
+
modelProfileKey: "kling30",
|
|
72
|
+
routingRole: "primary-video",
|
|
73
|
+
capabilities: {
|
|
74
|
+
characterReference: true,
|
|
75
|
+
storyboardReference: true,
|
|
76
|
+
audioPlan: true,
|
|
77
|
+
startEndFrames: true,
|
|
78
|
+
customStoryboardPhases: true,
|
|
79
|
+
maxStoryboardPhases: 4
|
|
80
|
+
},
|
|
81
|
+
docsVisibility: "public"
|
|
82
|
+
},
|
|
83
|
+
"gpt-image-2": {
|
|
84
|
+
id: "gpt-image-2",
|
|
85
|
+
displayName: "GPT Image 2",
|
|
86
|
+
provider: "openai",
|
|
87
|
+
modalities: ["image"],
|
|
88
|
+
lifecycleStatus: "active",
|
|
89
|
+
supportedPresets: ["hybrid", "hybrid-smart", "gpt-image-smart", "studio"],
|
|
90
|
+
supportedReferenceModes: ["start-end", "storyboard-reference", "hybrid"],
|
|
91
|
+
supportedAspects: ["16:9", "9:16", "1:1"],
|
|
92
|
+
durationPolicy: "Still-image model; video duration is not applicable.",
|
|
93
|
+
adapterKey: "gptImage2",
|
|
94
|
+
promptGrammarKey: "gptImage2",
|
|
95
|
+
modelProfileKey: "gptImage2",
|
|
96
|
+
routingRole: "image-reference",
|
|
97
|
+
capabilities: {
|
|
98
|
+
characterReference: true,
|
|
99
|
+
storyboardReference: true
|
|
100
|
+
},
|
|
101
|
+
docsVisibility: "public"
|
|
102
|
+
},
|
|
103
|
+
"gemini-3-pro-image-preview": {
|
|
104
|
+
id: "gemini-3-pro-image-preview",
|
|
105
|
+
displayName: "Gemini 3 Pro Image Preview",
|
|
106
|
+
provider: "google",
|
|
107
|
+
modalities: ["image"],
|
|
108
|
+
lifecycleStatus: "experimental",
|
|
109
|
+
supportedPresets: ["hybrid", "hybrid-smart"],
|
|
110
|
+
supportedReferenceModes: ["start-end", "storyboard-reference", "hybrid"],
|
|
111
|
+
supportedAspects: ["16:9", "9:16", "1:1"],
|
|
112
|
+
durationPolicy: "Still-image model used by internal hybrid presets; video duration is not applicable.",
|
|
113
|
+
adapterKey: "none",
|
|
114
|
+
promptGrammarKey: "generic",
|
|
115
|
+
modelProfileKey: "generic",
|
|
116
|
+
routingRole: "image-reference",
|
|
117
|
+
capabilities: {
|
|
118
|
+
characterReference: true,
|
|
119
|
+
storyboardReference: true
|
|
120
|
+
},
|
|
121
|
+
docsVisibility: "internal"
|
|
122
|
+
},
|
|
123
|
+
"smart-dialogue-router": {
|
|
124
|
+
id: "smart-dialogue-router",
|
|
125
|
+
displayName: "Smart Dialogue Router",
|
|
126
|
+
provider: "film-kit",
|
|
127
|
+
modalities: ["multimodal"],
|
|
128
|
+
lifecycleStatus: "active",
|
|
129
|
+
supportedPresets: ["hybrid-smart", "gpt-image-smart"],
|
|
130
|
+
supportedReferenceModes: ["start-end", "storyboard-reference", "hybrid"],
|
|
131
|
+
supportedAspects: ["16:9", "9:16", "1:1"],
|
|
132
|
+
durationPolicy: "Internal routing policy; routes dialogue/lip-sync to Veo and non-dialogue shots to Kling.",
|
|
133
|
+
adapterKey: "none",
|
|
134
|
+
promptGrammarKey: "generic",
|
|
135
|
+
modelProfileKey: "generic",
|
|
136
|
+
routingRole: "smart-router",
|
|
137
|
+
capabilities: {
|
|
138
|
+
smartRouting: true,
|
|
139
|
+
audioPlan: true,
|
|
140
|
+
dialogue: true
|
|
141
|
+
},
|
|
142
|
+
docsVisibility: "internal"
|
|
143
|
+
},
|
|
144
|
+
"veo2": {
|
|
145
|
+
id: "veo2",
|
|
146
|
+
displayName: "Veo 2",
|
|
147
|
+
provider: "google",
|
|
148
|
+
modalities: ["video"],
|
|
149
|
+
lifecycleStatus: "deprecated",
|
|
150
|
+
supportedPresets: ["single", "multi", "studio"],
|
|
151
|
+
supportedReferenceModes: ["start-end", "storyboard-reference"],
|
|
152
|
+
supportedAspects: ["16:9", "9:16", "1:1"],
|
|
153
|
+
durationRange: { minSeconds: 4, maxSeconds: 8 },
|
|
154
|
+
durationPolicy: "Deprecated legacy video model kept only for migration warnings.",
|
|
155
|
+
adapterKey: "generic",
|
|
156
|
+
promptGrammarKey: "generic",
|
|
157
|
+
modelProfileKey: "generic",
|
|
158
|
+
routingRole: "legacy-video",
|
|
159
|
+
capabilities: {
|
|
160
|
+
characterReference: true,
|
|
161
|
+
storyboardReference: true,
|
|
162
|
+
audioPlan: true,
|
|
163
|
+
dialogue: true,
|
|
164
|
+
startEndFrames: true,
|
|
165
|
+
customStoryboardPhases: true,
|
|
166
|
+
maxStoryboardPhases: 4
|
|
167
|
+
},
|
|
168
|
+
deprecationMessage: "veo2 is deprecated. Use veo31 for current Film-Kit video generation.",
|
|
169
|
+
replacementModelId: "veo31",
|
|
170
|
+
docsVisibility: "hidden"
|
|
171
|
+
},
|
|
172
|
+
"kling-2.0": {
|
|
173
|
+
id: "kling-2.0",
|
|
174
|
+
displayName: "Kling 2.0",
|
|
175
|
+
provider: "kuaishou",
|
|
176
|
+
modalities: ["video"],
|
|
177
|
+
lifecycleStatus: "removed",
|
|
178
|
+
supportedPresets: [],
|
|
179
|
+
supportedReferenceModes: [],
|
|
180
|
+
supportedAspects: ["16:9", "9:16", "1:1"],
|
|
181
|
+
durationPolicy: "Removed legacy model. Do not route generation here.",
|
|
182
|
+
adapterKey: "none",
|
|
183
|
+
promptGrammarKey: "generic",
|
|
184
|
+
modelProfileKey: "generic",
|
|
185
|
+
routingRole: "removed",
|
|
186
|
+
capabilities: {},
|
|
187
|
+
deprecationMessage: "kling-2.0 has been removed from Film-Kit. Use kling-3.0 instead.",
|
|
188
|
+
replacementModelId: "kling-3.0",
|
|
189
|
+
docsVisibility: "hidden"
|
|
190
|
+
}
|
|
191
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ActiveModelId, type DeprecatedModelId, type ImageModelId, type KnownModelId, type RemovedModelId, type VideoModelId } from "./registry.js";
|
|
2
|
+
import type { ModelAdapterKey, ModelRegistryEntry, ModelRegistryPreset, ModelRegistryReferenceMode } from "./types.js";
|
|
3
|
+
export declare function getModel(id: string): ModelRegistryEntry | undefined;
|
|
4
|
+
export declare function requireModel(id: string): ModelRegistryEntry;
|
|
5
|
+
export declare function listModels(): ModelRegistryEntry[];
|
|
6
|
+
export declare function listActiveModels(): ModelRegistryEntry[];
|
|
7
|
+
export declare function listVideoModels(): ModelRegistryEntry[];
|
|
8
|
+
export declare function listImageModels(): ModelRegistryEntry[];
|
|
9
|
+
export declare function listModelsForPreset(preset: ModelRegistryPreset): ModelRegistryEntry[];
|
|
10
|
+
export declare function listModelsForReferenceMode(referenceMode: ModelRegistryReferenceMode): ModelRegistryEntry[];
|
|
11
|
+
export declare function listRunnableVideoModels(): ModelRegistryEntry[];
|
|
12
|
+
export declare function listRunnableVideoModelIds(): VideoModelId[];
|
|
13
|
+
export declare function listActiveVideoModelIds(): VideoModelId[];
|
|
14
|
+
export declare function isKnownModelId(value: string): value is KnownModelId;
|
|
15
|
+
export declare function isActiveModelId(value: string): value is ActiveModelId;
|
|
16
|
+
export declare function isDeprecatedModelId(value: string): value is DeprecatedModelId;
|
|
17
|
+
export declare function isRemovedModelId(value: string): value is RemovedModelId;
|
|
18
|
+
export declare function isVideoModelId(value: string): value is VideoModelId;
|
|
19
|
+
export declare function isImageModelId(value: string): value is ImageModelId;
|
|
20
|
+
export declare function isModelSupportedByPreset(modelId: string, preset: ModelRegistryPreset): boolean;
|
|
21
|
+
export declare function getModelAdapterKey(modelId: string): ModelAdapterKey;
|
|
22
|
+
export declare function getReplacementModel(modelId: string): ModelRegistryEntry | undefined;
|
|
23
|
+
export declare function getModelDisplayName(modelId: string): string;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { MODEL_REGISTRY } from "./registry.js";
|
|
2
|
+
function entries() {
|
|
3
|
+
return Object.values(MODEL_REGISTRY);
|
|
4
|
+
}
|
|
5
|
+
function hasModality(model, modality) {
|
|
6
|
+
return model.modalities.includes(modality);
|
|
7
|
+
}
|
|
8
|
+
export function getModel(id) {
|
|
9
|
+
return MODEL_REGISTRY[id];
|
|
10
|
+
}
|
|
11
|
+
export function requireModel(id) {
|
|
12
|
+
const model = getModel(id);
|
|
13
|
+
if (!model) {
|
|
14
|
+
throw new Error(`Unknown model: ${id}.`);
|
|
15
|
+
}
|
|
16
|
+
return model;
|
|
17
|
+
}
|
|
18
|
+
export function listModels() {
|
|
19
|
+
return entries();
|
|
20
|
+
}
|
|
21
|
+
export function listActiveModels() {
|
|
22
|
+
return entries().filter(model => model.lifecycleStatus === "active" || model.lifecycleStatus === "experimental");
|
|
23
|
+
}
|
|
24
|
+
export function listVideoModels() {
|
|
25
|
+
return entries().filter(model => hasModality(model, "video"));
|
|
26
|
+
}
|
|
27
|
+
export function listImageModels() {
|
|
28
|
+
return entries().filter(model => hasModality(model, "image"));
|
|
29
|
+
}
|
|
30
|
+
export function listModelsForPreset(preset) {
|
|
31
|
+
return entries().filter(model => model.supportedPresets.includes(preset));
|
|
32
|
+
}
|
|
33
|
+
export function listModelsForReferenceMode(referenceMode) {
|
|
34
|
+
return entries().filter(model => model.supportedReferenceModes.includes(referenceMode));
|
|
35
|
+
}
|
|
36
|
+
export function listRunnableVideoModels() {
|
|
37
|
+
return listVideoModels().filter(model => model.lifecycleStatus !== "removed");
|
|
38
|
+
}
|
|
39
|
+
export function listRunnableVideoModelIds() {
|
|
40
|
+
return listRunnableVideoModels().map(model => model.id);
|
|
41
|
+
}
|
|
42
|
+
export function listActiveVideoModelIds() {
|
|
43
|
+
return listActiveModels()
|
|
44
|
+
.filter(model => hasModality(model, "video"))
|
|
45
|
+
.map(model => model.id);
|
|
46
|
+
}
|
|
47
|
+
export function isKnownModelId(value) {
|
|
48
|
+
return Object.prototype.hasOwnProperty.call(MODEL_REGISTRY, value);
|
|
49
|
+
}
|
|
50
|
+
export function isActiveModelId(value) {
|
|
51
|
+
const model = getModel(value);
|
|
52
|
+
return model?.lifecycleStatus === "active" || model?.lifecycleStatus === "experimental";
|
|
53
|
+
}
|
|
54
|
+
export function isDeprecatedModelId(value) {
|
|
55
|
+
return getModel(value)?.lifecycleStatus === "deprecated";
|
|
56
|
+
}
|
|
57
|
+
export function isRemovedModelId(value) {
|
|
58
|
+
return getModel(value)?.lifecycleStatus === "removed";
|
|
59
|
+
}
|
|
60
|
+
export function isVideoModelId(value) {
|
|
61
|
+
const model = getModel(value);
|
|
62
|
+
return Boolean(model && hasModality(model, "video"));
|
|
63
|
+
}
|
|
64
|
+
export function isImageModelId(value) {
|
|
65
|
+
const model = getModel(value);
|
|
66
|
+
return Boolean(model && hasModality(model, "image"));
|
|
67
|
+
}
|
|
68
|
+
export function isModelSupportedByPreset(modelId, preset) {
|
|
69
|
+
return Boolean(getModel(modelId)?.supportedPresets.includes(preset));
|
|
70
|
+
}
|
|
71
|
+
export function getModelAdapterKey(modelId) {
|
|
72
|
+
return requireModel(modelId).adapterKey;
|
|
73
|
+
}
|
|
74
|
+
export function getReplacementModel(modelId) {
|
|
75
|
+
const replacementModelId = getModel(modelId)?.replacementModelId;
|
|
76
|
+
return replacementModelId ? getModel(replacementModelId) : undefined;
|
|
77
|
+
}
|
|
78
|
+
export function getModelDisplayName(modelId) {
|
|
79
|
+
return requireModel(modelId).displayName;
|
|
80
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export type ModelModality = "video" | "image" | "audio" | "multimodal";
|
|
2
|
+
export type ModelLifecycleStatus = "active" | "experimental" | "deprecated" | "removed";
|
|
3
|
+
export type ModelRegistryPreset = "single" | "multi" | "hybrid" | "hybrid-smart" | "gpt-image-smart" | "studio";
|
|
4
|
+
export type ModelRegistryReferenceMode = "start-end" | "storyboard-reference" | "hybrid";
|
|
5
|
+
export type ModelRegistryAspectRatio = "16:9" | "9:16" | "1:1";
|
|
6
|
+
export type ModelAdapterKey = "veo31" | "seedance20" | "kling30" | "generic" | "gptImage2" | "none";
|
|
7
|
+
export type PromptGrammarKey = "veo31" | "seedance20" | "kling30" | "gptImage2" | "generic";
|
|
8
|
+
export type ModelProfileKey = "veo31" | "seedance20" | "kling30" | "gptImage2" | "generic";
|
|
9
|
+
export type ModelRoutingRole = "primary-video" | "storyboard-video" | "image-reference" | "smart-router" | "legacy-video" | "removed";
|
|
10
|
+
export interface ModelDurationRange {
|
|
11
|
+
minSeconds: number;
|
|
12
|
+
maxSeconds: number;
|
|
13
|
+
}
|
|
14
|
+
export interface ModelCapabilities {
|
|
15
|
+
characterReference?: boolean;
|
|
16
|
+
storyboardReference?: boolean;
|
|
17
|
+
multipleImageReferences?: boolean;
|
|
18
|
+
audioPlan?: boolean;
|
|
19
|
+
dialogue?: boolean;
|
|
20
|
+
startEndFrames?: boolean;
|
|
21
|
+
smartRouting?: boolean;
|
|
22
|
+
customStoryboardPhases?: boolean;
|
|
23
|
+
maxStoryboardPhases?: number;
|
|
24
|
+
maxReferenceImages?: number;
|
|
25
|
+
maxReferenceVideos?: number;
|
|
26
|
+
maxReferenceAudio?: number;
|
|
27
|
+
maxReferenceFiles?: number;
|
|
28
|
+
}
|
|
29
|
+
export interface ModelRegistryEntry {
|
|
30
|
+
id: string;
|
|
31
|
+
displayName: string;
|
|
32
|
+
provider: string;
|
|
33
|
+
modalities: readonly ModelModality[];
|
|
34
|
+
lifecycleStatus: ModelLifecycleStatus;
|
|
35
|
+
supportedPresets: readonly ModelRegistryPreset[];
|
|
36
|
+
supportedReferenceModes: readonly ModelRegistryReferenceMode[];
|
|
37
|
+
supportedAspects: readonly ModelRegistryAspectRatio[];
|
|
38
|
+
durationRange?: ModelDurationRange;
|
|
39
|
+
durationPolicy?: string;
|
|
40
|
+
adapterKey: ModelAdapterKey;
|
|
41
|
+
promptGrammarKey: PromptGrammarKey;
|
|
42
|
+
modelProfileKey: ModelProfileKey;
|
|
43
|
+
routingRole: ModelRoutingRole;
|
|
44
|
+
capabilities: ModelCapabilities;
|
|
45
|
+
deprecationMessage?: string;
|
|
46
|
+
replacementModelId?: string;
|
|
47
|
+
docsVisibility: "public" | "internal" | "hidden";
|
|
48
|
+
}
|
|
49
|
+
export interface ModelAllowedContext {
|
|
50
|
+
preset?: ModelRegistryPreset;
|
|
51
|
+
referenceMode?: ModelRegistryReferenceMode;
|
|
52
|
+
requiredModalities?: readonly ModelModality[];
|
|
53
|
+
allowDeprecated?: boolean;
|
|
54
|
+
usage?: string;
|
|
55
|
+
}
|
|
56
|
+
export interface ModelAllowedResult {
|
|
57
|
+
model: ModelRegistryEntry;
|
|
58
|
+
warnings: string[];
|
|
59
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ModelAllowedContext, ModelAllowedResult, ModelRegistryEntry } from "./types.js";
|
|
2
|
+
export declare function validateModelAllowed(modelId: string, context?: ModelAllowedContext): ModelAllowedResult;
|
|
3
|
+
export declare function assertModelAllowed(modelId: string, context?: ModelAllowedContext): ModelRegistryEntry;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { getModel, getReplacementModel, listRunnableVideoModelIds } from "./selectors.js";
|
|
2
|
+
function formatModelList(models) {
|
|
3
|
+
return models.join(", ");
|
|
4
|
+
}
|
|
5
|
+
function hasRequiredModalities(model, required) {
|
|
6
|
+
return !required || required.every(modality => model.modalities.includes(modality));
|
|
7
|
+
}
|
|
8
|
+
export function validateModelAllowed(modelId, context = {}) {
|
|
9
|
+
const model = getModel(modelId);
|
|
10
|
+
const usage = context.usage ? `${context.usage} ` : "";
|
|
11
|
+
if (!model) {
|
|
12
|
+
throw new Error(`Unknown ${usage}model: ${modelId}. Supported video models: ${formatModelList(listRunnableVideoModelIds())}`);
|
|
13
|
+
}
|
|
14
|
+
if (model.lifecycleStatus === "removed") {
|
|
15
|
+
const replacement = getReplacementModel(model.id);
|
|
16
|
+
const replacementText = replacement ? ` Use ${replacement.id} instead.` : "";
|
|
17
|
+
throw new Error(`${model.deprecationMessage ?? `${model.id} has been removed.`}${replacementText}`);
|
|
18
|
+
}
|
|
19
|
+
if (!hasRequiredModalities(model, context.requiredModalities)) {
|
|
20
|
+
throw new Error(`Model ${model.id} is not valid for ${usage.trim() || "this usage"}. ` +
|
|
21
|
+
`Required modalities: ${context.requiredModalities?.join(", ") ?? "none"}.`);
|
|
22
|
+
}
|
|
23
|
+
if (context.preset && !model.supportedPresets.includes(context.preset)) {
|
|
24
|
+
throw new Error(`Model ${model.id} is not supported by preset ${context.preset}.`);
|
|
25
|
+
}
|
|
26
|
+
if (context.referenceMode && !model.supportedReferenceModes.includes(context.referenceMode)) {
|
|
27
|
+
throw new Error(`Model ${model.id} is not supported by reference mode ${context.referenceMode}.`);
|
|
28
|
+
}
|
|
29
|
+
const warnings = [];
|
|
30
|
+
if (model.lifecycleStatus === "deprecated") {
|
|
31
|
+
if (context.allowDeprecated === false) {
|
|
32
|
+
throw new Error(model.deprecationMessage ?? `Model ${model.id} is deprecated.`);
|
|
33
|
+
}
|
|
34
|
+
const replacement = getReplacementModel(model.id);
|
|
35
|
+
warnings.push(model.deprecationMessage
|
|
36
|
+
?? `Model ${model.id} is deprecated.${replacement ? ` Use ${replacement.id} instead.` : ""}`);
|
|
37
|
+
}
|
|
38
|
+
return { model, warnings };
|
|
39
|
+
}
|
|
40
|
+
export function assertModelAllowed(modelId, context = {}) {
|
|
41
|
+
return validateModelAllowed(modelId, context).model;
|
|
42
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getModelDisplayName } from "../../model-registry/index.js";
|
|
1
2
|
export class BaseVideoModelPromptAdapter {
|
|
2
3
|
validate(output) {
|
|
3
4
|
const prompt = output.promptText;
|
|
@@ -53,9 +54,5 @@ export function formatPhaseLines(phases) {
|
|
|
53
54
|
.join("\n");
|
|
54
55
|
}
|
|
55
56
|
export function getDisplayName(model) {
|
|
56
|
-
|
|
57
|
-
return "Seedance 2.0";
|
|
58
|
-
if (model === "kling-3.0")
|
|
59
|
-
return "Kling 3.0";
|
|
60
|
-
return "Veo 3.1";
|
|
57
|
+
return getModelDisplayName(model);
|
|
61
58
|
}
|