feat(gateway): add Seedream 5.0 Pro

This commit is contained in:
2026-07-13 12:53:48 +08:00
parent 03abc0eab7
commit 9c300de72c
8 changed files with 460 additions and 5 deletions
@@ -662,6 +662,31 @@ func TestParamProcessorImageResolutionAndOutputCount(t *testing.T) {
}
}
func TestParamProcessorForcesSingleImageWhenMultipleOutputsAreDisabled(t *testing.T) {
body := map[string]any{
"model": "Seedream-5.0-Pro",
"prompt": "draw",
"n": 4,
}
candidate := store.RuntimeModelCandidate{
ModelType: "image_generate",
Capabilities: map[string]any{
"image_generate": map[string]any{
"output_multiple_images": false,
"output_max_images_count": 1,
},
},
}
result := preprocessRequestWithLog("images.generations", body, candidate)
if result.Body["n"] != 1 {
t.Fatalf("single-output image model should force n=1, got %+v", result.Body)
}
if len(result.Log.Changes) == 0 || result.Log.Changes[len(result.Log.Changes)-1].CapabilityPath != "capabilities.image_generate.output_max_images_count" {
t.Fatalf("single-output adjustment should be logged against output_max_images_count, got %+v", result.Log.Changes)
}
}
func TestParamProcessorImageSizeConstraintsNormalizeExplicitDimensions(t *testing.T) {
body := map[string]any{
"model": "doubao-5.0图像编辑",