@@ -78,8 +78,6 @@ export type VideoModel = {
7878 turbo : boolean
7979 modes : VideoMode [ ]
8080 resolutions : string [ ]
81- /** Narrower lists for the modes that cannot take every generation resolution (Kling 4.0 edit and extend have no 4k). */
82- modeResolutions ?: Partial < Record < VideoMode , string [ ] > >
8381 defaultResolution : string
8482 durations : [ number , number ]
8583 aspectRatios : string [ ]
@@ -128,7 +126,7 @@ export const VIDEO_MODELS: Record<VideoModelKey, VideoModel> = {
128126 'seedance-2.0-mini' : seedance ( 'seedance-2.0-mini' , 'Seedance 2.0 Mini' , 'bytedance/seedance-2.0-mini' , false , false ) ,
129127 'kling-4.0' : {
130128 id : 'kling-4.0' , label : 'Kling 4.0' , family : 'kling-4.0' , base : 'kwaivgi/kling-v4.0' , turbo : false , modes : [ 'generate' , 'edit' , 'extend' ] ,
131- resolutions : [ '720p' , '1080p' , '4k' ] , modeResolutions : { edit : [ '720p' , '1080p' ] , extend : [ '720p' , '1080p' ] } , defaultResolution : '720p' , durations : [ 3 , 30 ] ,
129+ resolutions : [ '720p' , '1080p' , '4k' ] , defaultResolution : '720p' , durations : [ 3 , 30 ] ,
132130 // Sound is always generated with the picture; there is no switch.
133131 aspectRatios : [ '16:9' , '9:16' , '1:1' , '21:9' ] , audio : false , maxRefs : { images : 10 , videos : 5 , audios : 3 } ,
134132 } ,
@@ -170,11 +168,6 @@ export function videoEndpoints(m: VideoModel): VideoEndpoints {
170168 }
171169}
172170
173- /** The resolutions a model offers in a mode. */
174- export function videoResolutions ( m : VideoModel , mode : VideoMode ) : string [ ] {
175- return m . modeResolutions ?. [ mode ] ?? m . resolutions
176- }
177-
178171/** The input names a model takes its reference media under (Kling 4.0 drops the reference_ prefix). */
179172export function referenceFields ( m : VideoModel ) : { images : string ; videos : string ; audios : string } {
180173 return m . family === 'kling-4.0'
0 commit comments