openclaw - 💡(How to fix) Fix [Bug] image_generate with reference image fails: 'minimax-portal edit does not support resolution overrides' [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#56237Fetched 2026-04-08 01:43:11
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

Error Message

When using the image_generate tool with an image parameter (reference image / edit mode), the request fails with error: 2. The tool fails with error: minimax-portal edit does not support resolution overrides

  • Same error occurs regardless of prompt complexity or image path format
  • Error is consistent across all reference image attempts

Root Cause

Possible Root Cause

Fix Action

Workaround

None available. Pure text-to-image works but reference image (edit mode) is broken.

Code Example

minimax-portal edit does not support resolution overrides
RAW_BUFFERClick to expand / collapse

Bug Description

When using the image_generate tool with an image parameter (reference image / edit mode), the request fails with error:

minimax-portal edit does not support resolution overrides

Environment

  • OpenClaw version: 2026.3.24
  • OS: Windows (node 24.14.0)
  • Model: minimax-portal/image-01

Steps to Reproduce

  1. Call image_generate tool with a prompt and an image parameter (local file path or URL)
  2. The tool fails with error: minimax-portal edit does not support resolution overrides

Expected Behavior

Reference image should be used as input for image-to-image generation, similar to how the standard API supports image references in edit mode.

Additional Context

  • Plain text-to-image generation (without image parameter) works fine
  • The issue appears to be in the OpenClaw tool layer: it passes size or resolution parameters to the minimax API even in edit mode, but minimax API does not support resolution overrides when using reference images
  • Same error occurs regardless of prompt complexity or image path format
  • Error is consistent across all reference image attempts

Possible Root Cause

The minimax API in edit mode does not accept size/aspect_ratio overrides. The OpenClaw image generation tool may be unconditionally passing these parameters regardless of whether the request is in edit mode or not.

Workaround

None available. Pure text-to-image works but reference image (edit mode) is broken.

extent analysis

Fix Plan

To resolve the issue, we need to modify the OpenClaw image_generate tool to conditionally pass size and aspect_ratio parameters only when not in edit mode.

Here are the steps:

  • Check if the request is in edit mode (i.e., an image parameter is provided)
  • If in edit mode, do not pass size or aspect_ratio parameters to the minimax API
  • If not in edit mode, pass size and aspect_ratio parameters as before

Example code changes:

def image_generate(prompt, image=None, size=None, aspect_ratio=None):
    # ...
    if image is not None:  # edit mode
        # Do not pass size or aspect_ratio parameters
        minimax_api_call(prompt, image)
    else:  # not edit mode
        # Pass size and aspect_ratio parameters
        minimax_api_call(prompt, size=size, aspect_ratio=aspect_ratio)
    # ...

Verification

To verify the fix, test the image_generate tool with both text-to-image and image-to-image (edit mode) requests. The tool should now successfully generate images in both modes without returning the minimax-portal edit does not support resolution overrides error.

Extra Tips

  • Ensure that the minimax API documentation is up-to-date and reflects the correct usage of size and aspect_ratio parameters in edit mode.
  • Consider adding error handling to the OpenClaw image_generate tool to provide more informative error messages when invalid parameters are passed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING