feat(gateway): add Seedream 5.0 Pro
This commit is contained in:
@@ -781,14 +781,22 @@ func supportsMultipleOutputs(request Request, capabilityName string) bool {
|
||||
}
|
||||
|
||||
func normalizeVolcesSequentialImageGeneration(body map[string]any, request Request) {
|
||||
if !supportsMultipleOutputs(request, request.ModelType) {
|
||||
delete(body, "sequential_image_generation")
|
||||
delete(body, "sequential_image_generation_options")
|
||||
if numericValue(body["n"], 1) > 1 {
|
||||
body["n"] = 1
|
||||
}
|
||||
if numericValue(body["batch_size"], 1) > 1 {
|
||||
body["batch_size"] = 1
|
||||
}
|
||||
return
|
||||
}
|
||||
options, hasOptions := volcesSequentialImageGenerationOptions(body)
|
||||
normalizeVolcesSequentialMaxImages(options, request)
|
||||
if _, explicit := body["sequential_image_generation"]; explicit {
|
||||
return
|
||||
}
|
||||
if !supportsMultipleOutputs(request, request.ModelType) {
|
||||
return
|
||||
}
|
||||
count := requestedVolcesSequentialImageCount(body, options)
|
||||
if count <= 1 {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user