Add MiniMax image generation support to the image-generation skill - #94
Open
octo-patch wants to merge 2 commits into
Open
Add MiniMax image generation support to the image-generation skill#94octo-patch wants to merge 2 commits into
octo-patch wants to merge 2 commits into
Conversation
Implement MiniMax's official image_generation request schema, regional endpoint selection (global_en and cn_zh), and response parsing for the bundled image-generation skill, with offline unit tests.
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.
Reason: Add MiniMax's official image-generation request schema, endpoint selection, and output parsing to the bundled image-generation skill.
What changed
minimaxAPI format to.claude/.skills/bananapro-image-gen/scripts/generate_image.py, selectable via--api-format minimax, alongside the existing formats.POST /v1/image_generation:global_en→https://api.minimax.iocn_zh→https://api.minimaxi.commodel,prompt,response_format,n, plus optionalaspect_ratio,width,height,seed,prompt_optimizer), defaulting the model toimage-01.base_resp.status_code, read the image fromdata.image_urls(ordata.image_base64whenresponse_format=base64), and reportmetadata.success_count/metadata.failed_count.--region,--response-format,--aspect-ratio,--width,--height,--seed,--n, and--prompt-optimizer/--no-prompt-optimizer.tests/test_minimax_image.pycovering endpoint and region selection, request-body construction, URL and base64 output parsing, and error-status handling.Checks
python3 -m py_compile scripts/generate_image.pypython3 tests/test_minimax_image.py