Skip to content

fix(rest): normalize async video mode - #26

Open
dvd233 wants to merge 1 commit into
MiniMax-AI:mainfrom
dvd233:fix/rest-video-async-mode
Open

dvd233 wants to merge 1 commit into
MiniMax-AI:mainfrom
dvd233:fix/rest-video-async-mode

Conversation

@dvd233

@dvd233 dvd233 commented Sep 22, 2026

Copy link
Copy Markdown

What changed

  • Normalize REST's async_mode parameter to the asyncMode field consumed by VideoAPI.
  • Keep the normalized flag for the shared response path used by generate_video and image_to_video.
  • Add a deterministic node:test regression and expose it through pnpm run test.

Why

The REST tool schema advertises async_mode, but VideoAPI checks asyncMode. Before this change, a REST request with async_mode: true entered the blocking polling/download path instead of returning the submitted task ID. The service could then describe an already completed result as a newly submitted task.

Verification

  • pnpm run build
  • pnpm run test (1 passed; the baseline test fails before the patch because polling starts)
  • git diff --check

The repository-wide pnpm run lint still reports the pre-existing formatting failure in all 20 source files; this focused change does not rewrite unrelated formatting.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant