fix(*): 分镜生成设置 - 统一模型能力计价并支持项目默认模型

This commit is contained in:
ddCat
2026-08-30 13:02:55 +08:00
parent c8b60cea07
commit a52376da41
12 changed files with 342 additions and 68 deletions

View 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",
});
});