fix(canvas): 视频参考协议 - 统一首尾帧与角色资产语义

This commit is contained in:
ddCat committed 2026-08-30 16:52:09 +08:00
1 parent b5f8b66622
commit 37eb2b7e48
15 files changed
+479 -68

No files matched your search

+21
View File
@@ -124,6 +124,27 @@ describe("Agnes Video 2.5 request contract", () => {
});
});
test("treats a single storyboard character image as a reference asset", async () => {
const config = resolveModelRequestConfig(configForAgnes(), "agnes::agnes-video-2.5");
const { calls, deps } = providerDeps(config);
await createAgnesVideoTask(
deps,
config,
"agnes::agnes-video-2.5",
"保持角色一致",
[{ id: "character-1", name: "character.png", type: "image/png", dataUrl: "", url: "https://cdn.example.com/character.png" }],
[],
[],
{ videoEditOperation: "reference_to_video" },
);
expect(calls[0]?.body).toMatchObject({
mode: "reference",
images: ["https://cdn.example.com/character.png"],
});
expect(calls[0]?.body as Record<string, unknown>).not.toHaveProperty("first_frame");
});
test("polls the Agnes host root and reads metadata.url", async () => {
const config = resolveModelRequestConfig(configForAgnes(), "agnes::agnes-video-2.5");
const { calls, deps } = providerDeps(config, { polled: { video_id: "video-1", status: "completed", metadata: { url: "https://cdn.example.com/result.mp4" } } });