fix(*): 分镜生成设置 - 统一模型能力计价并支持项目默认模型
This commit is contained in:
15
web/test/model-capabilities.test.ts
Normal file
15
web/test/model-capabilities.test.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import assert from "node:assert/strict";
|
||||
import test from "node:test";
|
||||
|
||||
// Bun 直接执行 TypeScript 测试时需要保留扩展名;生产 tsconfig 不包含 test/。
|
||||
import { defaultModelCapabilityConfig, normalizeVideoValue } from "../src/lib/model-capabilities.ts";
|
||||
|
||||
test("switching to MiniMax H3 replaces an unsupported 720p value with 768P", () => {
|
||||
const profile = defaultModelCapabilityConfig("minimax-video", "MiniMax-H3").video!;
|
||||
|
||||
assert.deepEqual(normalizeVideoValue(profile, { seconds: "11", ratio: "16:9", resolution: "720" }), {
|
||||
seconds: "11",
|
||||
ratio: "16:9",
|
||||
resolution: "768P",
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user