From bc844fa550074091e15a0722cef82266d9e6d3cb Mon Sep 17 00:00:00 2001 From: backryun Date: Thu, 6 Aug 2026 10:31:43 +0900 Subject: [PATCH] [TS7] fix(types): type media provider request payloads (#9141) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Validated in local merge-train (devbox-vm-06-dev002) @ combined-tip (FAST gates: typecheck/complexity/cognitive/changelog/vitest — only pre-existing audit.test.ts flake). Evidence: /home/diegosouzapw/dev/proxys/OmniRoute/.claude/worktrees/merge-train-20260805-222248-suite.log --- open-sse/handlers/imageGeneration.ts | 4 ++-- open-sse/handlers/videoGeneration.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/open-sse/handlers/imageGeneration.ts b/open-sse/handlers/imageGeneration.ts index c5d338c0bc..97941262ed 100644 --- a/open-sse/handlers/imageGeneration.ts +++ b/open-sse/handlers/imageGeneration.ts @@ -719,7 +719,7 @@ async function handleKieImageGeneration({ baseUrl = `${providerConfig.baseUrl.replace(/\/$/, "")}/api/v1/jobs/createTask`; const input: Record = { prompt, - aspect_ratio: mapImageSize(size, "1:1"), + aspect_ratio: mapImageSize(size), }; if (imageUrl) { input.image_url = imageUrl; @@ -737,7 +737,7 @@ async function handleKieImageGeneration({ payload = { prompt, - size: mapImageSize(size, "1:1"), + size: mapImageSize(size), nVariants: body.n || 1, }; } diff --git a/open-sse/handlers/videoGeneration.ts b/open-sse/handlers/videoGeneration.ts index 4ba841c688..0b26f7d673 100644 --- a/open-sse/handlers/videoGeneration.ts +++ b/open-sse/handlers/videoGeneration.ts @@ -655,11 +655,11 @@ async function handleRunwayVideoGeneration({ ); const headers = buildRunwayHeaders(token); - const upstreamBody = { + // prettier-ignore + const upstreamBody: { model: typeof model; promptText: typeof body.prompt; ratio: typeof ratio; duration: typeof duration; promptImage?: typeof promptImage; seed?: number } = { model, promptText: body.prompt, - ratio, - duration, + ratio, duration, }; if (useImageToVideo) upstreamBody.promptImage = promptImage;