fix(video): 视频任务 - 规范化数字清晰度价格档

This commit is contained in:
ddcat666 committed 2026-09-27 20:09:41 +08:00
1 parent 414d367416
commit a0ba303b02
3 files changed
+51

No files matched your search

+15
View File
@@ -62,6 +62,21 @@ func TestModelRequestIntentNormalizesVideoResolution(t *testing.T) {
}
}
func TestModelRequestIntentNormalizesNumericVideoResolution(t *testing.T) {
for value, want := range map[string]string{
"768": "768p", "768p": "768p", "768P": "768p",
"960": "960p", "960P": "960p",
} {
intent := ModelRequestIntentFromTaskInput(map[string]any{
"mode": "video",
"config": map[string]any{"vquality": value},
}, "canvas_video", "image_to_video")
if got := intent.Options["vquality"]; got != want {
t.Errorf("vquality %q normalized to %#v, want %s", value, got, want)
}
}
}
func TestModelRequestIntentNormalizesImageSpecificationValues(t *testing.T) {
input := map[string]any{
"mode": "image",