feat(protocol): 可美 KM Seedream - 接入图片生成与编辑
This commit is contained in:
1 parent
85c2aa178b
commit
1b08bd64dd
24 files changed
+3277
-21
No files matched your search
@@ -11,6 +11,19 @@ import { resolveImageRequestSize, validateImageSize } from "../src/services/api/
|
||||
import { buildGeminiImageGenerationConfig } from "../src/lib/gemini-image";
|
||||
|
||||
describe("统一图片分辨率与宽高比", () => {
|
||||
test("Seedream 5.0 shows 1.5K and retains the exact official 2K wide size", () => {
|
||||
const profile = defaultImageCapabilityConfig("km-kemei-seedream", "doubao-seedream-5-0-pro-260628");
|
||||
const intermediate = renderToStaticMarkup(<ImageSizePicker profile={profile} size="1536x1536" onChange={() => {}} />);
|
||||
expect(intermediate).toMatch(/aria-pressed="true"[^>]*>1\.5K/);
|
||||
expect(intermediate).toContain("1536 × 1536 px");
|
||||
expect(intermediate).not.toMatch(/<button[^>]*>4K/);
|
||||
const wide = renderToStaticMarkup(<ImageSizePicker profile={profile} size="2816x1584" onChange={() => {}} />);
|
||||
expect(wide).toMatch(/aria-pressed="true"[^>]*>2K/);
|
||||
expect(wide).toContain("2816 × 1584 px");
|
||||
const reopened = normalizeModelCapabilityConfig({ version: 1, image: profile });
|
||||
expect(reopened.image?.size.presets?.filter((p) => p.tier === "1.5k")).toHaveLength(8);
|
||||
expect(resolveImageRequestSize(profile, "auto", "1536x1536")?.value).toBe("1536x1536");
|
||||
});
|
||||
test("管理员档位开关按已有比例启用,部分比例不显示为关闭", () => {
|
||||
for (const model of ["midjourney-1k", "midjourney-2k"]) {
|
||||
const profile = defaultImageCapabilityConfig("cangyuan-midjourney-v82", model);
|
||||
|
||||
Reference in new issue
Block a user