Skip to content

fix(ai): default MiniMax text video ratio - #64822

Merged
heimoshuiyu merged 1 commit into
devfrom
minimax-video-ratio
Nov 19, 2026
Merged

heimoshuiyu merged 1 commit into
devfrom
minimax-video-ratio

Conversation

@heimoshuiyu

Copy link
Copy Markdown
Contributor

Summary

  • An H3 (v2) text-only (t2va) start with aspect unset or "auto" now defaults the body ratio to 16:9; MiniMax rejects a t2va request without a concrete ratio (2013).
  • Starts with media (first/last frame or references) still map "auto" to adaptive, an explicit aspect passes through unchanged, and providerOptions / http.body keep the same override order.

Official contract

Create Video Generation Task: "Text-to-video (t2va, content contains only text): ratio is required and cannot be adaptive; available values 21:9, 16:9, 4:3, 1:1, 3:4, 9:16." The docs' own t2va example uses ratio: "16:9", so 16:9 is our default, not a MiniMax default. The H3-Lite r2va adaptive limitation on the same page is pre-existing and out of scope here.

Testing

  • cd packages/ai && bun test test/minimax-video.test.ts --timeout 30000 — 33 pass
  • cd packages/ai && bun typecheck — clean
  • git diff --check — clean

Bug fix, no feature flag needed.

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added needs:issue needs:compliance This means the issue will auto-close after 2 hours. labels Nov 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 72 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend merging this: the fix is sound. I ran the PR's updated test against base and it failed. A text-only H3 start sent no ratio when aspect was unset, and "adaptive" for aspect: "auto". MiniMax's v2 docs reject both for text-to-video. With this PR both send 16:9. Requests with media still map auto to adaptive, an explicit aspect is sent unchanged, and providerOptions and http.body still override the default. Text-only detection is safe because the prompt is always the first content item. The MiniMax tests pass and tsc is clean. I couldn't test against MiniMax itself (no credentials).

Public API: unchanged; only the request body sent to MiniMax for text-only H3 starts changes.

No concerns.

@heimoshuiyu
heimoshuiyu merged commit d33b578 into dev Nov 19, 2026
11 checks passed
@heimoshuiyu
heimoshuiyu deleted the minimax-video-ratio branch November 19, 2026 08:11
@amrkmn amrkmn mentioned this pull request Nov 23, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor needs:compliance This means the issue will auto-close after 2 hours. needs:issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant