fix(sdk/python): forward MiniMax v1 video optional fields regressed by #854 - #886
Merged
Conversation
PR #854 promoted content/ratio/callback_url/aigc_watermark to named parameters of MiniMaxProvider.generate_video and rejected all four for non-H3 models. Before that, the last three fell through **kwargs into the v1 request body and were forwarded verbatim — callback_url and aigc_watermark are documented v1 fields — so existing Hailuo callers now raise ValueError. Forward ratio/callback_url/aigc_watermark verbatim on the v1 path again, matching v0.1.123 byte-for-byte. Keep the guard for content only: structured content is a v2 request shape that never worked against v1, so the client-side error stays. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Performance
✓ No regressions detected |
Contributor
📊 Coverage gateThresholds from
✅ Gate passedNo surface regressed past the allowed threshold and the aggregate stayed above the floor. |
Contributor
📐 Patch coverage gateThreshold: 80% on lines this PR touches vs
✅ Patch gate passedEvery surface whose lines were touched by this PR has patch coverage at or above the threshold. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR #854 (MiniMax H3 video v2) promoted
content,ratio,callback_url, andaigc_watermarkfrom**kwargsto named parameters onMiniMaxProvider.generate_video, then added a guard rejecting all four for any non-H3 model. In v0.1.123 the last three fell through**kwargs→overrides→ the v1/video_generationrequest body and were forwarded verbatim (callback_urlandaigc_watermarkare documented v1 fields), so existing Hailuo callers likenow raise
ValueError("MiniMax v2 request fields require the MiniMax-H3 model")instead of submitting the job.Changes Made
ratio,callback_url, andaigc_watermarkverbatim into the v1 request body when provided, restoring v0.1.123 behavior byte-for-byte.contentonly: structured content is a v2 request shape that never worked against v1, so the clear error is strictly better than the old server-side rejection.reservedoverride check, so theextra={"callback_url": ...}path (which kept working throughout) is unchanged.Validation Contract
ratio/callback_url/aigc_watermarkas named kwargs submits them verbatim in the v1 POST body with no exception — covered bytest_minimax_video_legacy_forwards_v1_optional_fields.content=[...]with a non-H3 model still raises a clearValueError— covered bytest_minimax_video_legacy_rejects_h3_structured_content.Test Plan
extra=path — are byte-identical between v0.1.123 and this branch.ruff check .clean at CI's pinned 0.15.22;ruff format --checkclean on touched files.🤖 Generated with Claude Code