openclaw - ✅(Solved) Fix [Bug]: Image attachments dropped even when model supports images Description [1 pull requests, 1 comments, 2 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#68272Fetched 2026-04-18 05:53:25
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×2commented ×1cross-referenced ×1referenced ×1

Bug: Image attachments dropped even when model supports images

Environment: OpenClaw 2026.4.14 / 2026.4.15, minimax/MiniMax-M2.7

Problem: When sending images via webchat, the image appears as a thumbnail momentarily then disappears. The gateway log shows:

parseMessageWithAttachments: 1 attachment(s) dropped — model does not support images Expected: Image should be processed and sent to the agent.

Config:

agents.defaults.model.primary: minimax/MiniMax-M2.7 minimax model has input: ["text", "image"] configured models.mode: replace Logs show the model IS minimax/MiniMax-M2.7 but attachments are still dropped. Also, setting models.mode: replace changed the behavior — now image URLs (from OSS) are shown in chat instead of the image disappearing entirely, suggesting a merge-mode bug with model capability detection.

Root Cause

Bug: Image attachments dropped even when model supports images

Environment: OpenClaw 2026.4.14 / 2026.4.15, minimax/MiniMax-M2.7

Problem: When sending images via webchat, the image appears as a thumbnail momentarily then disappears. The gateway log shows:

parseMessageWithAttachments: 1 attachment(s) dropped — model does not support images Expected: Image should be processed and sent to the agent.

Config:

agents.defaults.model.primary: minimax/MiniMax-M2.7 minimax model has input: ["text", "image"] configured models.mode: replace Logs show the model IS minimax/MiniMax-M2.7 but attachments are still dropped. Also, setting models.mode: replace changed the behavior — now image URLs (from OSS) are shown in chat instead of the image disappearing entirely, suggesting a merge-mode bug with model capability detection.

Fix Action

Fixed

PR fix notes

PR #68346: fix: use normalized model lookup in resolveGatewayModelSupportsImages (#68272)

Description (problem / solution / changelog)

Problem

Image attachments are dropped with 'model does not support images' even when the model has image capability configured. The issue is in resolveGatewayModelSupportsImages() which uses case-sensitive exact matching on model ID, failing for custom models with mixed-case IDs (e.g. minimax/MiniMax-M2.7).

Fix

Switch to findModelInCatalog() which normalizes both provider and model ID, matching the behavior already used elsewhere in the codebase.

Changes

  • src/gateway/session-utils.ts: Use findModelInCatalog() instead of direct map lookup
  • src/gateway/session-utils.test.ts: 4 new tests for mixed-case, custom models, and replace mode

Fixes #68272

Changed files

  • src/gateway/session-utils.test.ts (modified, +61/-0)
  • src/gateway/session-utils.ts (modified, +8/-5)
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Bug: Image attachments dropped even when model supports images

Environment: OpenClaw 2026.4.14 / 2026.4.15, minimax/MiniMax-M2.7

Problem: When sending images via webchat, the image appears as a thumbnail momentarily then disappears. The gateway log shows:

parseMessageWithAttachments: 1 attachment(s) dropped — model does not support images Expected: Image should be processed and sent to the agent.

Config:

agents.defaults.model.primary: minimax/MiniMax-M2.7 minimax model has input: ["text", "image"] configured models.mode: replace Logs show the model IS minimax/MiniMax-M2.7 but attachments are still dropped. Also, setting models.mode: replace changed the behavior — now image URLs (from OSS) are shown in chat instead of the image disappearing entirely, suggesting a merge-mode bug with model capability detection.

Steps to reproduce

Run: openclaw config set models.mode replace

  1. Set minimax/MiniMax-M2.7 as the primary model (ensure model has image capability configured)
  2. Open webchat interface
  3. Send a message with an image attachment
  4. Observe — image disappears or shows as a URL link instead of being processed

Expected: Image is analyzed and agent can see it Actual: Image dropped with log: "parseMessageWithAttachments: 1 attachment(s) dropped — model does not support images"

Expected behavior

Images should be processed and sent to the agent when the model configuration declares image support.

Prior behavior: With models.mode: replace, images appear as URLs in chat (indicating images reached OSS/attachment system). This proves the model CAN handle images if properly routed.

Reference: minimax model has input: ["text", "image"] configured — capability is declared but not respected at message parse time.

Actual behavior

Images are dropped at parse time, even though the model is configured with image support.

Evidence from gateway log: parseMessageWithAttachments: 1 attachment(s) dropped — model does not support images

User-visible result: Image thumbnail appears briefly then disappears, or image is converted to a URL link in chat. The agent receives no image data and cannot analyze it.

Note: When models.mode is set to replace, the symptom changes from "image disappears" to "image shows as URL" — suggesting the capability check runs in merge/parse logic before the mode replacement takes effect.

OpenClaw version

2026.4.15

Operating system

Win10 pro 22h2 / Ubuntu 22.04

Install method

No response

Model

MiniMax-M2.7

Provider / routing chain

openclaw->minimax

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The issue can be resolved by adjusting the models.mode configuration to ensure proper model capability detection for image support.

Guidance

  • Verify that the minimax/MiniMax-M2.7 model is correctly configured with image support by checking the input field in the model configuration, which should include "image".
  • Investigate the merge-mode logic to understand why the model capability check fails to detect image support, causing attachments to be dropped.
  • Temporarily set models.mode to replace to observe if the image is processed and sent to the agent, which can help isolate the issue to the merge-mode logic.
  • Review the gateway log messages to ensure that the parseMessageWithAttachments function is correctly handling image attachments when the model supports images.

Example

No code snippet is provided as the issue does not require a specific code change, but rather a configuration adjustment and potential logic fix in the merge-mode capability detection.

Notes

The issue seems to be related to the merge-mode logic and model capability detection. The fact that setting models.mode to replace changes the behavior suggests that the issue lies in the merge-mode logic before the mode replacement takes effect.

Recommendation

Apply a workaround by setting models.mode to replace until the root cause of the merge-mode logic issue is identified and fixed, as this allows images to be processed and sent to the agent, albeit as URLs.

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

Images should be processed and sent to the agent when the model configuration declares image support.

Prior behavior: With models.mode: replace, images appear as URLs in chat (indicating images reached OSS/attachment system). This proves the model CAN handle images if properly routed.

Reference: minimax model has input: ["text", "image"] configured — capability is declared but not respected at message parse time.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Bug]: Image attachments dropped even when model supports images Description [1 pull requests, 1 comments, 2 participants]