feat(protocol): 可美 KM Seedream - 接入图片生成与编辑

This commit is contained in:
Codex
2026-10-09 16:42:58 +08:00
parent 85c2aa178b
commit 1b08bd64dd
24 changed files with 3277 additions and 21 deletions

View File

@@ -27,6 +27,19 @@ func DefaultImageCapabilityConfig(protocol string, modelName string) *ImageCapab
MaxOutputs: 15,
}
switch model.ChannelInterfaceType(protocol) {
case "km-kemei-seedream":
image.References.MaxImages = 10
image.References.MaskSupported = false
presets := kemeiSeedreamImagePresets()
values := make([]string, 0, len(presets))
for _, preset := range presets {
values = append(values, preset.Size)
}
image.Size = ImageSizeConfig{Parameter: "size", Values: values, Default: "2048x2048", AllowCustom: true, Presets: presets}
image.Quality = ImageQualityConfig{Supported: false, Values: []string{}, Default: "auto"}
// 透明背景需要带 alpha 的单张参考图,通过插件命名空间显式配置。
image.TransparentBackground = VideoBooleanConfig{Supported: false, Default: false}
image.MaxOutputs = 1
case model.ChannelInterfaceGrokImage:
image.References.MaxImages = 1
image.References.MaskSupported = false