增加即梦图片5.0和视频2.5的能力

This commit is contained in:
andy committed 2026-08-21 13:44:56 +08:00
1 parent 542246e4ce
commit 88a4268d40
55 files changed
+1412 -200

No files matched your search

+28
View File
@@ -60,6 +60,34 @@ describe("Seedance usage extraction", () => {
await expect(querySeedanceTask("task-1")).resolves.toMatchObject({ status: "expired" });
});
it("sends the selected Seedance 2.5 model and accepts its extended limits", async () => {
process.env.SEEDANCE_API_KEY = "test-key";
let body: Record<string, unknown> | undefined;
vi.stubGlobal("fetch", vi.fn(async (_input: RequestInfo | URL, init?: RequestInit) => {
body = JSON.parse(String(init?.body));
return new Response(JSON.stringify({ id: "task-25" }), { status: 200, headers: { "Content-Type": "application/json" } });
}));
await createSeedanceTask({
model: "doubao-seedance-2-5-260628",
prompt: "combine",
settings: { ratio: "16:9", duration: 30, resolution: "720p" },
materials: Array.from({ length: 5 }, (_, index) => ({
type: "image" as const,
url: `/image-${index + 1}.png`,
label: `@图片${index + 1}`
})),
origin: "https://app.test"
});
expect(body).toMatchObject({
model: "doubao-seedance-2-5-260628",
duration: 30,
omni_reference_task_type: "auto"
});
expect(body?.content).toHaveLength(6);
});
it("rejects more materials than the Seedance 2.0 content limit before calling the provider", async () => {
process.env.SEEDANCE_API_KEY = "test-key";
const fetchMock = vi.fn();