openclaw - ✅(Solved) Fix MiniMax image-to-image generation fails with "minimax edit does not support resolution overrides" [3 pull requests, 3 comments, 3 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#58870Fetched 2026-04-08 02:31:44
View on GitHub
Comments
3
Participants
3
Timeline
12
Reactions
0
Timeline (top)
cross-referenced ×3referenced ×3commented ×2labeled ×2

MiniMax image-to-image generation fails with "minimax edit does not support resolution overrides"

Error Message

  1. Observe error: "minimax edit does not support resolution overrides" Image generation with reference image should work without error. Error: minimax edit does not support resolution overrides

Root Cause

MiniMax image-to-image generation fails with "minimax edit does not support resolution overrides"

Fix Action

Fixed

PR fix notes

PR #58891: fix(image-generate): skip resolution inference for providers that don…

Description (problem / solution / changelog)

fix(image-generate): skip resolution inference for providers that don't support it

When using image-to-image mode with providers like MiniMax that have supportsResolution=false, the tool was incorrectly auto-inferring resolution from input images. This caused validation to fail with 'minimax edit does not support resolution overrides'.

Now the code checks provider capability before inferring resolution, skipping inference when the provider doesn't support resolution.

Fixes #58870

Summary

  • Problem: MiniMax image-to-image generation fails with "minimax edit does not support resolution overrides" error
  • Why it matters: Users cannot use reference images with MiniMax provider, blocking a core image generation workflow
  • What changed: Moved provider resolution before resolution inference; added capability check to skip auto-inference when supportsResolution=false
  • What did NOT change (scope boundary): No changes to MiniMax provider implementation, validation logic, or other providers; only the inference timing and conditional logic

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #58870
  • Related # N/A
  • This PR fixes a bug or regression

Root Cause / Regression History (if applicable)

  • Root cause: The image_generate tool auto-infers resolution from input images unconditionally when in edit mode, without checking if the target provider supports resolution overrides. MiniMax declares supportsResolution: false but the inferred resolution was still passed to validation.
  • Missing detection / guardrail: The resolution inference logic did not consult provider capabilities before inferring.
  • Prior context: The resolution inference was added to improve quality for providers that support it (like OpenAI), but the capability check was missing.
  • Why this regressed now: This is not a regression; it's a latent bug that existed since resolution inference was added. It became visible when users started using MiniMax for image-to-image workflows.
  • If unknown, what was ruled out: N/A - root cause is clear.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file: src/agents/tools/image-generate-tool.test.ts
  • Scenario the test should lock in: When using a provider with supportsResolution=false in edit mode, resolution should not be auto-inferred from input images
  • Why this is the smallest reliable guardrail: Unit test directly validates the conditional inference logic without requiring provider API calls
  • Existing test that already covers this (if any): None - existing tests don't cover the interaction between resolution inference and provider capabilities
  • If no new test is added, why not: Existing tests pass; a dedicated test for this edge case would be valuable as a follow-up

User-visible / Behavior Changes

  • MiniMax image-to-image generation now works without resolution errors
  • No configuration changes required
  • Other providers with supportsResolution=false will also benefit from this fix

Diagram (if applicable)

Before:
[user: image_generate with reference image]
  -> [load reference images]
  -> [infer resolution from images]  <-- always runs
  -> [resolve provider]
  -> [validate capabilities]  <-- FAILS: "does not support resolution"

After:
[user: image_generate with reference image]
  -> [load reference images]
  -> [resolve provider]  <-- moved earlier
  -> [check supportsResolution]
  -> [infer resolution only if supported]  <-- conditional
  -> [validate capabilities]  <-- PASSES

Security Impact (required)

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? No
  • New/changed network calls? No
  • Command/tool execution surface changed? No
  • Data access scope changed? No
  • If any Yes, explain risk + mitigation: N/A

Repro + Verification

Environment

  • OS: macOS 26.4 (as reported in issue)
  • Runtime/container: Node.js
  • Model/provider: MiniMax image-01 (minimax-portal)
  • Integration/channel (if any): N/A
  • Relevant config (redacted): Default image generation config with MiniMax provider

Steps

  1. Configure MiniMax as image generation provider
  2. Use image_generate tool with a reference image (image parameter)
  3. Observe the request

Expected

  • Image generation with reference image should work without error

Actual

  • Before fix: Error "minimax edit does not support resolution overrides"
  • After fix: Request proceeds without resolution parameter

Evidence

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)
# Test results after fix:
pnpm test -- src/agents/tools/image-generate-tool.test.ts
✓ 13 tests passed

pnpm test -- src/agents/openclaw-tools.image-generation.test.ts
✓ 3 tests passed

pnpm check
✓ All lint and format checks pass

Human Verification (required)

  • Verified scenarios:
    • Code review: confirmed resolution inference now checks modeCaps.supportsResolution !== false
    • TypeScript compilation passes
    • All existing image generation tests pass
    • Lint and format checks pass
  • Edge cases checked:
    • Provider is undefined (handled by optional chaining)
    • Generate mode vs edit mode (both respect their respective supportsResolution flags)
    • Explicit resolution parameter (still passed through, validation still applies)
  • What you did NOT verify:
    • Live API call to MiniMax (requires API key)
    • Other providers with supportsResolution=false (if any exist)

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? No
  • Migration needed? No
  • If yes, exact upgrade steps: N/A

Risks and Mitigations

  • Risk: Providers that previously failed may now make API calls without resolution, potentially affecting output quality

    • Mitigation: This is the intended behavior - providers that don't support resolution should not receive it. Quality is determined by the provider's default behavior.
  • Risk: The capability check uses !== false which treats undefined as supporting resolution

    • Mitigation: This matches the existing validation logic in validateImageGenerationCapabilities and maintains backward compatibility with providers that don't explicitly declare the capability.

Changed files

  • src/agents/tools/image-generate-tool.ts (modified, +14/-6)

PR #58894: fix(image): skip resolution validation when provider does not support it

Description (problem / solution / changelog)

Summary

Fixes #58870

When a model includes a resolution parameter but the provider declares supportsResolution: false (e.g. MiniMax image-to-image with subject_reference), validateImageGenerationCapabilities() throws a ToolInputError that blocks the request entirely.

Root cause

The validation has a strict check:

if (params.resolution) {
  if (!modeCaps.supportsResolution) {
    throw new ToolInputError(...)  // blocks the request
  }
}

But the provider's generateImage() implementation already ignores the resolution field when unsupported — so the validation is more restrictive than the actual capability.

Fix

Combine the conditions: only validate resolution values when the provider actually supports them. When supportsResolution: false, the entire resolution check is skipped and the provider uses its own default.

- if (params.resolution) {
-   if (!modeCaps.supportsResolution) {
-     throw new ToolInputError(...)
-   }
+ if (params.resolution && modeCaps.supportsResolution) {

Test plan

  • MiniMax image-to-image with reference image no longer fails with resolution error
  • Providers that DO support resolution still get proper validation

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) [email protected]

Changed files

  • src/agents/tools/image-generate-tool.ts (modified, +1/-6)

PR #58981: fix: skip resolution auto-inference for image edit when provider declares supportsResolution: false (#58870)

Description (problem / solution / changelog)

Summary

Fixes #58870.

When a user sends a reference image for image-to-image editing without specifying an explicit resolution, inferResolutionFromInputImages() is called unconditionally and always returns a resolution value. However, MiniMax's edit capabilities declare supportsResolution: false. The auto-inferred resolution then fails validateImageGenerationCapabilities with "minimax edit does not support resolution overrides".

Root cause

The resolution auto-inference at line 563 ran before the provider was selected at line 570, so there was no way to check whether the provider's edit mode actually supports resolution.

Changes

  • src/agents/tools/image-generate-tool.ts: Move resolveSelectedImageGenerationProvider() before the resolution computation. Gate inferResolutionFromInputImages() on whether the selected provider's edit capabilities declare supportsResolution (defaulting to true for backwards compatibility when no provider is resolved or for generate mode).
  • src/agents/tools/image-generate-tool.test.ts: Add regression test with a MiniMax-like provider (supportsResolution: false for edit) verifying that resolution is passed as undefined instead of being auto-inferred.

Test plan

  • pnpm test -- src/agents/tools/image-generate-tool.test.ts — 14 tests pass
  • pnpm check — clean

Changed files

  • src/agents/tools/image-generate-tool.test.ts (modified, +55/-0)
  • src/agents/tools/image-generate-tool.ts (modified, +13/-6)
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

MiniMax image-to-image generation fails with "minimax edit does not support resolution overrides"

Steps to reproduce

  1. Use the image generation tool with a reference image (image parameter) on minimax-portal model
  2. Observe error: "minimax edit does not support resolution overrides"

Expected behavior

Image generation with reference image should work without error.

Actual behavior

Error: minimax edit does not support resolution overrides

OpenClaw version

3.24

Operating system

macOS26.4

Install method

ClawX

Model

MiniMax image-01 (minimax-portal)

Provider / routing chain

minimax-portal

Additional provider/model setup details

When using MiniMax image generation with a reference image (image parameter), the request fails with: "minimax edit does not support resolution overrides" MiniMax's image generation API does not support the resolution parameter when subject_reference is present. The issue appears to be in how OpenClaw assembles the request for image-to-image mode.

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

Remove the resolution override parameter when using the MiniMax image generation tool with a reference image to potentially resolve the "minimax edit does not support resolution overrides" error.

Guidance

  • Verify that the error message "minimax edit does not support resolution overrides" is consistently reproduced when using the resolution override parameter with a reference image in the MiniMax image generation tool.
  • Check the OpenClaw documentation to see if there are any known limitations or workarounds for using the resolution override parameter with the MiniMax image generation API.
  • Test the image generation tool without the resolution override parameter to see if it works as expected with a reference image.
  • If the issue persists, investigate how OpenClaw assembles the request for image-to-image mode to identify any potential issues with the request formatting.

Example

No specific code example is provided due to the lack of detailed technical information about the OpenClaw API or the MiniMax image generation tool.

Notes

The provided information suggests that the issue is related to the use of the resolution override parameter with the MiniMax image generation API, but the exact cause and solution may depend on the specific implementation details of the OpenClaw and MiniMax tools.

Recommendation

Apply workaround: Remove the resolution override parameter when using the MiniMax image generation tool with a reference image, as this parameter is not supported by the MiniMax edit API.

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…

FAQ

Expected behavior

Image generation with reference image should work without error.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING