feat(protocol): 可美 KM Seedream - 接入图片生成与编辑

This commit is contained in:
Codex committed 2026-10-09 18:02:19 +08:00
1 parent 09f9b8e902
commit 9e9694b5fd
24 files changed
+3277 -21

No files matched your search

@@ -9,6 +9,13 @@ const protocols = [definition("disabled-text", "text", false), definition("text"
const protocolsWithAudio = [...protocols, definition("audio", "audio")];
describe("channel model editor drafts", () => {
test("Kemei Seedream selection initializes the image profile and preserves pricing", () => {
const draft = initialChannelModelValues(null, protocols);
draft.priceTiers[0].unitPrice = 19;
const next = changeChannelModelCapability({ ...draft, capability: "image", protocol: "km-kemei-seedream", modelKey: "doubao-seedream-5-0-pro-260628" }, [definition("km-kemei-seedream", "image")]);
expect(next.capabilityConfig?.image).toMatchObject({ references: { maxImages: 10, maskSupported: false }, maxOutputs: 1, size: { default: "2048x2048" } });
expect(next.priceTiers[0].unitPrice).toBe(19);
});
test("new drafts select an enabled protocol and never share price state", () => {
const first = initialChannelModelValues(null, protocols);
first.priceTiers[0].unitPrice = 42;