Skip to content

Support MiniMax H3 text-to-image in cm-imagegen - #540

Merged
qxcnm merged 2 commits into
qxcnm:mainfrom
octo-patch:octo/20261125-h3-text-to-image-tool-reczz28e42IqPE5u
Nov 28, 2026
Merged

qxcnm merged 2 commits into
qxcnm:mainfrom
octo-patch:octo/20261125-h3-text-to-image-tool-reczz28e42IqPE5u

Conversation

@octo-patch

Copy link
Copy Markdown
Contributor

Reason: Selecting a MiniMax H3 image model sends the generate command to the legacy image endpoint. H3 uses a different endpoint and returns each image or error as an item in a list.

Changes

  • Route both H3 variants through the configured regional /v1/images/generations endpoint in cm_image_gen.py. Use a timeout of at least 600 seconds and submit the generation request once.
  • Save inline images or download returned URLs, and include failed item indexes and the request ID in the CLI result. Reject unsupported edit requests before submission.
  • Document H3 model selection, sizing and output in the cm-imagegen skill and its CLI and API references. The existing default model and legacy generation path remain available.

Verification

  • python -m unittest discover -s cm-skills/cm-imagegen/tests -v passed all 21 tests on Python 3.11. Python 3.10 passed 20 with one existing TOML-specific skip.
  • Tests invoke the CLI with mocked HTTP responses for both regions, inline output, mixed URL success and per-item failure, HTTP errors and legacy routing. No live generation was performed.
  • git diff --check passed.

This change is confined to the Python image skill. The desktop, frontend and service builds were outside the changed paths.

@qxcnm
qxcnm merged commit 72cf0fb into qxcnm:main Nov 28, 2026
4 checks passed
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.

2 participants