mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-06 15:22:12 +03:00
[TS7] fix(types): type media provider request payloads (#9141)
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
This commit is contained in:
@@ -719,7 +719,7 @@ async function handleKieImageGeneration({
|
||||
baseUrl = `${providerConfig.baseUrl.replace(/\/$/, "")}/api/v1/jobs/createTask`;
|
||||
const input: Record<string, unknown> = {
|
||||
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,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user