Skip to content

fix: enforce H3 reference input limit - #222

Draft
shaoohh wants to merge 1 commit into
MiniMax-AI:mainfrom
shaoohh:agent/fix-h3-reference-limit
Draft

fix: enforce H3 reference input limit#222
shaoohh wants to merge 1 commit into
MiniMax-AI:mainfrom
shaoohh:agent/fix-h3-reference-limit

Conversation

@shaoohh

@shaoohh shaoohh commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • enforce MiniMax-H3's combined limit of 12 reference images, videos, and audios
  • keep the existing per-media limits of 9 images, 3 videos, and 3 audios
  • add regression coverage proving 12 mixed references are accepted and 13 are rejected

Root cause

The H3 validator checked each media type independently but did not check their combined count. A request containing 9 reference images, 3 reference videos, and 3 reference audios therefore passed local validation with 15 total references, even though mixed-reference requests allow at most 12.

Impact

Oversized mixed-reference requests now fail locally with an actionable usage error before a paid generation request is submitted.

Validation

  • bun test test/video/v2.test.ts — 12 passed
  • bun test — 450 passed
  • bun run typecheck
  • bun run lint — 0 errors; 1 pre-existing warning in test/sdk/speech.test.ts
  • bun run build

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