Repository navigation
feat: support MiniMax-H3-Image generation and editing - #306
Merged
Merged
Conversation
…limit mmx image generate help now points at /docs/guides/image-generation. On /v1/images/*, error 1002 (IPM) uses the existing rate-limit path; 1026 and 1027 remain content-safety mappings.
Collaborator
|
LGTM, THANKS!! |
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
Adds MiniMax-H3-Image to the CLI and SDK: text-to-image (
POST /v1/images/generations) and image editing (POST /v1/images/edits). The default model staysimage-01; H3 is opt-in with--model MiniMax-H3-Image.Design notes
image generate --imagerather than a newimage editsubcommand, so themmx image "<prompt>"shortcut (single-subcommand forwarding) keeps working. This mirrors--imageon H3 video.src/image/h3.ts(pure functions shared by CLI and SDK, same pattern assrc/video/v2.ts).sizeWxH area 655,360–20,000,000 px and ratio 1:3–3:1;sizeWxH cannot be combined withaspect_ratio/area;aspect_ratioX:Y with integers 1–300;n1–10; 1–16 reference images; 64 MiB file/body;b64_jsontotal area (20 MP png / 80 MP jpeg·webp,size autocounted byarea);--no-prompt-enhanceis text-to-image only and needs a concrete size or ratio.data[].error): successful images are saved, files keep their original index (image_001,image_003, ...), failures go to stderr (also with--quiet) and tofailures/failed_countin JSON output.(NNNN)code inerror.messageis parsed for/v1/images/*only (1026/1027 → content filter, 2068 → plan message), and per-image reasons fromdata[]are added to the hint.image-01, and--seed/--prompt-optimizer/--subject-refwith H3, fail with a usage error.--width/--heightare shorthand for--sizeon H3.--response-format base64is accepted as an alias ofb64_json.API docs: CN, Global
Docs
README.md, README_CN.md, SDK.md, skill/SKILL.md.
Tests
bun run typecheck,bun run lint(0 errors; existing warning intest/sdk/speech.test.ts),bun run build.bun test: 674 pass, 1 fail. The failure (Zed configuration > ... XDG_CONFIG_HOME) also fails onmainlocally and is unrelated.test/image/h3.test.ts,test/errors/api-images.test.ts; extendedtest/commands/image/generate.test.ts(mock server: partial failure, edits routing) andtest/sdk/image.test.ts.--dry-runchecked for text-to-image, editing,--no-prompt-enhance, b64_json limits and the legacyimage-01path.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.