Skip to content

feat: add MiniMax image generation provider - #52712

Closed
ejimenezc93 wants to merge 1 commit into
NousResearch:mainfrom
ejimenezc93:feat/minimax-image-gen
Closed

ejimenezc93 wants to merge 1 commit into
NousResearch:mainfrom
ejimenezc93:feat/minimax-image-gen

Conversation

@ejimenezc93

Copy link
Copy Markdown

Summary

Adds an image_gen backend for the MiniMax Token Plan / Subscription API
(POST https://api.minimax.io/v1/image_generation, model image-01).

Hermes ships with fal, krea, openai, openai-codex, openrouter,
and xai for image generation, but MiniMax Plus subscribers don't have
a backend that consumes their bundled Token Plan credits.

Changes

  • New plugin: plugins/image_gen/minimax/ (__init__.py, plugin.yaml)
  • New tests: tests/plugins/image_gen/test_minimax_provider.py (38 tests)

Features

  • text-to-image
  • image-to-image via subject_reference (single reference image)
  • Signed response URLs cached locally via save_url_image
  • Aspect ratio mapping (landscape/square/portrait16:9/1:1/9:16)
  • MiniMax business-error handling (base_resp.status_code)
  • HTTP non-2xx error mapping
  • Empty-prompt validation
  • Model override via MINIMAX_IMAGE_MODEL or image_gen.minimax.model
  • Base URL override via MINIMAX_BASE_URL (env-only, for tests)

Auth

MINIMAX_API_KEY env var (Subscription Key, sk-cp-...). Falls back to
MINIMAX_SUBSCRIPTION_KEY / MINIMAX_SUBS_KEY.

Verification

  • python -m pytest tests/plugins/image_gen/test_minimax_provider.py -v → 38 passed
  • python -m py_compile plugins/image_gen/minimax/__init__.py tests/plugins/image_gen/test_minimax_provider.py → OK
  • Live end-to-end: provider.generate(...) returns success with a cached local JPEG
    on Windows 11 / Python 3.11 / real MiniMax API.

Adds an image_gen backend for MiniMax's Token Plan / Subscription API
(POST https://api.minimax.io/v1/image_generation, model image-01).

Features:
- text-to-image
- image-to-image via subject_reference (1 reference image)
- signed response URLs cached locally via save_url_image
- aspect ratio mapping (landscape/square/portrait -> 16:9/1:1/9:16)
- MiniMax business-error handling (base_resp.status_code)
- HTTP non-2xx error mapping
- empty-prompt validation
- model override via MINIMAX_IMAGE_MODEL or image_gen.minimax.model
- base URL override via MINIMAX_BASE_URL (env-only, for tests)

Auth: env var MINIMAX_API_KEY (Subscription Key, sk-cp-...) with fallback
to MINIMAX_SUBSCRIPTION_KEY / MINIMAX_SUBS_KEY.

Tests: 38 unit tests covering availability, config resolution, auth
header, payload shape, success/error/cache-fallback paths, image-to-image
reference handling, kwargs tolerance, and registry wiring.

Verified end-to-end: provider.generate() returns success with cached
local path against the live MiniMax API.
@alt-glitch alt-glitch added type/feature New feature or request comp/plugins Plugin system and bundled plugins tool/vision Vision analysis and image generation provider/minimax MiniMax (Anthropic transport) P3 Low — cosmetic, nice to have duplicate This issue or pull request already exists labels Jun 25, 2026
@alt-glitch

Copy link
Copy Markdown
Contributor

This was generated by AI during triage.

Duplicate of #25451 (the earliest open MiniMax image_gen plugin at the same plugins/image_gen/minimax/ path). Same feature and same dedicated ImageGenProvider approach; #47660 is also tracked against #25451. Related: #44167 (Chinese image-gen provider feature request). Leaving open for the maintainer to pick the canonical PR from the cluster.

@teknium1

Copy link
Copy Markdown
Collaborator

Thanks for the MiniMax image-generation implementation and the dedicated provider tests.

This automated hermes-sweeper review is closing the PR under the standing in-tree-provider-integration policy: third-party vendor integrations must be published as standalone plugins rather than as new directories in the repository's plugins/ tree.

  • This PR adds the MiniMax-specific backend at plugins/image_gen/minimax/__init__.py and its bundled manifest at plugins/image_gen/minimax/plugin.yaml (PR head 2f236afe3727).
  • Hermes supports the intended extension path: image providers register through ImageGenProvider / ctx.register_image_gen_provider(...), with user-installed backends at ~/.hermes/plugins/image_gen/<name>/ or pip entry points (website/docs/developer-guide/image-gen-provider-plugin.md:17-25).
  • The duplicate discussion is useful context: the earlier MiniMax implementation, feat(image-gen): add MiniMax image-01 backend plugin #25451, was resolved under this same maintenance-boundary policy.

Please publish or continue this as a standalone MiniMax image-generation plugin repository and share it in #plugins-skills-and-skins.


Automated hermes-sweeper review; closed as not planned under standing policy in-tree-provider-integration. This is a maintenance-boundary decision, not a judgment of the implementation's quality.


Closed as not-planned per standing maintainer policy (in-tree-provider-integration). This is a design-direction decision, not a code-quality judgment — see the Contribution Rubric in AGENTS.md for what the project is looking for. If you believe this policy was misapplied to your change, comment here and a maintainer will take a look.

@teknium1 teknium1 closed this Jul 15, 2026
@teknium1 teknium1 added sweeper:not-planned Sweeper: closed per standing maintainer policy (design direction) sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have provider/minimax MiniMax (Anthropic transport) sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:not-planned Sweeper: closed per standing maintainer policy (design direction) sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades tool/vision Vision analysis and image generation type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants