From 5351f544346b1d0e1904c2f923ec519e56895dac Mon Sep 17 00:00:00 2001 From: n1sp Date: Thu, 28 May 2026 13:44:13 +0800 Subject: [PATCH 1/2] fix(klingai/kling-v3-omni v2v): align video param shape with mule-router schema `video` is a string URL, not a JSON array of objects, per the upstream mule-router pydantic schema (openapi YAML at src/aag/mule-router/docs/api/kling/v3-omni-reference-video-to-video.yaml and v3-omni-video-to-video-edit.yaml). Old shape was rejected with error_code 2001 "expected Input should be a valid string". For both endpoints: - video: array -> string - add keep_audio: boolean (default false) v2v only: - remove first_frame / last_frame (upstream additionalProperties:false rejects) - note in description: aspect_ratio must be set explicitly when no first_frame is given (runtime requirement, not in openapi) Verified end-to-end against api.mulerouter.ai (tasks 56ec9e50 and 09439f64 produced real mp4 outputs). Regression now 33/34 (vs 25/34). Co-Authored-By: Claude Sonnet 4.5 --- .../src/models/klingai/kling-v3-omni-v2v-edit.ts | 11 ++++++++--- .../core/src/models/klingai/kling-v3-omni-v2v.ts | 16 ++++++---------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/packages/core/src/models/klingai/kling-v3-omni-v2v-edit.ts b/packages/core/src/models/klingai/kling-v3-omni-v2v-edit.ts index ab5f371..2a6fed0 100644 --- a/packages/core/src/models/klingai/kling-v3-omni-v2v-edit.ts +++ b/packages/core/src/models/klingai/kling-v3-omni-v2v-edit.ts @@ -28,11 +28,16 @@ const endpoint: ModelEndpoint = { }, { name: "video", - type: "array", - description: - 'Video to edit (JSON array, 1 video). Each: {"video_url":"...","refer_type":"base","keep_original_sound":"no"}', + type: "string", + description: "Video URL to edit (mp4/mov, 3-10s, 720-2160px, ≤200MB)", required: true, }, + { + name: "keep_audio", + type: "boolean", + description: "Whether to keep the original audio from the video", + default: false, + }, { name: "images", type: "array", diff --git a/packages/core/src/models/klingai/kling-v3-omni-v2v.ts b/packages/core/src/models/klingai/kling-v3-omni-v2v.ts index 10263b4..d8b1d7a 100644 --- a/packages/core/src/models/klingai/kling-v3-omni-v2v.ts +++ b/packages/core/src/models/klingai/kling-v3-omni-v2v.ts @@ -28,20 +28,16 @@ const endpoint: ModelEndpoint = { }, { name: "video", - type: "array", + type: "string", description: - 'Reference video (JSON array, 1 video). Each: {"video_url":"...","refer_type":"feature","keep_original_sound":"no"}', + "Reference video URL (mp4/mov, 3-10s, 720-2160px, ≤200MB). aspect_ratio must be set explicitly when no first_frame is given (runtime requirement).", required: true, }, { - name: "first_frame", - type: "string", - description: "First-frame reference image (URL/Base64)", - }, - { - name: "last_frame", - type: "string", - description: "Last-frame reference image (requires first_frame)", + name: "keep_audio", + type: "boolean", + description: "Whether to keep the original audio from the reference video", + default: false, }, { name: "images", From 4dd6aa86445154a683cad86befa399197b7db644 Mon Sep 17 00:00:00 2001 From: n1sp Date: Thu, 28 May 2026 13:44:17 +0800 Subject: [PATCH 2/2] chore: release v0.4.3 Co-Authored-By: Claude Sonnet 4.5 --- CHANGELOG.md | 5 +++++ packages/cli/package.json | 2 +- packages/core/package.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9da0c08..e07d77b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.4.3] - 2026-05-28 + +### Fixed +- `klingai/kling-v3-omni-v2v` and `kling-v3-omni-v2v-edit`: `video` parameter is a single URL string, not a JSON array of objects. Removed nonexistent `first_frame` / `last_frame` parameters on v2v (upstream `additionalProperties: false` rejects them) and added the missing `keep_audio` boolean on both. Verified end-to-end against `api.mulerouter.ai`; full regression now 33/34 (vs. 25/34 prior). + ## [0.4.2] - 2026-05-27 ### Fixed diff --git a/packages/cli/package.json b/packages/cli/package.json index 2364bbc..7222200 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "mulerouter", - "version": "0.4.2", + "version": "0.4.3", "description": "CLI for MuleRouter/MuleRun multimodal AI APIs — generate images, videos, speech, and music", "type": "module", "license": "MIT", diff --git a/packages/core/package.json b/packages/core/package.json index d9075fd..96d40f5 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@mulerouter/core", - "version": "0.4.2", + "version": "0.4.3", "description": "Core library for MuleRouter/MuleRun multimodal AI APIs", "type": "module", "license": "MIT",