Skip to content

feat: add MiniMax H3 text-to-image tools - #1008

Open
octo-patch wants to merge 1 commit into
crestalnetwork:mainfrom
octo-patch:octo/20261118-h3-text-to-image-tool-reczz28bAjugnsNt
Open

octo-patch wants to merge 1 commit into
crestalnetwork:mainfrom
octo-patch:octo/20261118-h3-text-to-image-tool-reczz28bAjugnsNt

Conversation

@octo-patch

Copy link
Copy Markdown

Reason: The image toolset offers MiniMax image-01 but cannot send a prompt to the H3 image generation API or decode its output into an IntentKit attachment.

Description

Add two opt-in tools, image_minimax_h3 and image_minimax_h3_highspeed. Each accepts a text prompt, requests one image as b64_json, and passes the decoded bytes to the shared attachment uploader. An image-level error is surfaced to the caller. A single generation request can take ten minutes, so the client uses a 610-second timeout and submits once.

Both tools use the configured MiniMax API key and the existing 30-credit MiniMax image tool price. Deployments select the international API (default) or the China API with MINIMAX_IMAGE_REGION=global|cn. The existing image_minimax tool keeps its image-01 generation and reference-image behavior.

International API · China API

Type of Change

  • New Feature

Checklist

  • Read the contribution guidelines.
  • Added tests for model lookup, both regional requests, prompt-only validation, successful decoding and failed images.
  • Ran the repository's Python CI lint and unit suite.

Verification

  • sh lint.sh ci passed (Ruff, BasedPyright, import layers and dependency checks).
  • OPENROUTER_API_KEY=test uv run pytest -q -m 'not bdd and not integration' completed with 1,787 tests passed and 113 deselected. The placeholder key is for existing mocked tests. The new tests use an in-process HTTP transport.

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