feat(gateway): sync Seedance 2.0 capabilities

This commit is contained in:
2026-06-30 21:20:09 +08:00
parent 24eb68cc09
commit 797edeedf4
4 changed files with 526 additions and 1 deletions
+10
View File
@@ -336,6 +336,16 @@ func addVolcesVideoTaskParams(out map[string]any, body map[string]any) {
copyVolcesBoolParam(out, "return_last_frame", body, "return_last_frame", "returnLastFrame")
copyVolcesIntParam(out, "execution_expires_after", body, "execution_expires_after", "executionExpiresAfter")
copyVolcesBoolParam(out, "generate_audio", body, "generate_audio", "generateAudio", "audio")
if tools, ok := body["tools"]; ok {
out["tools"] = tools
} else {
for _, key := range []string{"enable_web_search", "enableWebSearch"} {
if value, ok := volcesBoolFromAny(body[key]); ok && value {
out["tools"] = []any{map[string]any{"type": "web_search"}}
break
}
}
}
copyVolcesBoolParam(out, "draft", body, "draft")
copyVolcesStringParam(out, "resolution", body, "resolution", "size")
copyVolcesStringParam(out, "ratio", body, "ratio", "aspect_ratio", "aspectRatio")