Repository navigation
fix(ai): default MiniMax text video ratio - #64822
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
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. |
There was a problem hiding this comment.
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.
Summary
aspectunset or"auto"now defaults the bodyratioto16:9; MiniMax rejects a t2va request without a concrete ratio (2013)."auto"toadaptive, an explicitaspectpasses through unchanged, andproviderOptions/http.bodykeep the same override order.Official contract
Create Video Generation Task: "Text-to-video (t2va, content contains only
text):ratiois required and cannot beadaptive; available values21:9,16:9,4:3,1:1,3:4,9:16." The docs' own t2va example usesratio: "16:9", so16:9is our default, not a MiniMax default. The H3-Lite r2vaadaptivelimitation 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 passcd packages/ai && bun typecheck— cleangit diff --check— cleanBug fix, no feature flag needed.