openclaw - 💡(How to fix) Fix Feature Request: Auto-route messages with images to imageModel for multi-modal processing [1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

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#61963Fetched 2026-04-08 03:10:40
View on GitHub
Comments
1
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
commented ×1

Error Message

  • No attachment dropped; no "model does not support images" error

Code Example

parseMessageWithAttachments: 1 attachment(s) dropped — model does not support images

---

"agents": {
  "defaults": {
    "model": {
      "primary": "minimax/MiniMax-M2.7",
      "input": ["text"]
    },
    "imageModel": {
      "primary": "minimax/mini-max-vision",
      "input": ["text", "image"]
    }
  }
}
RAW_BUFFERClick to expand / collapse

Is your feature request related to a problem? Yes.

The current primary model (e.g., minimax/MiniMax-M2.7) only supports text input (input: ["text"]). When sending an image attachment via WebChat/Feishu, the attachment is dropped with the log:

parseMessageWithAttachments: 1 attachment(s) dropped — model does not support images

The imageModel config exists in the schema but does not trigger automatic model switching when images are detected. The core function resolveGatewayModelSupportsImages only checks the current session's primary model, not the configured imageModel.

Describe the solution you'd like Implement automatic model routing based on input type:

  • When a message contains only text: use the default model.primary (text-only model).
  • When a message contains image attachments:
    • Auto-detect image attachments
    • Auto-switch to use agent.imageModel.primary (multi-modal model)
    • Process images and respond normally
    • No manual model switching required by the user.

Expected behavior

  • Text only → handled by text-only model (MiniMax-M2.7)
  • Text + images → automatically routed to multi-modal imageModel
  • No attachment dropped; no "model does not support images" error

Configuration example

"agents": {
  "defaults": {
    "model": {
      "primary": "minimax/MiniMax-M2.7",
      "input": ["text"]
    },
    "imageModel": {
      "primary": "minimax/mini-max-vision",
      "input": ["text", "image"]
    }
  }
}

Use case

  • Cost optimization: use lightweight text model for daily chat
  • Auto-switch to vision model only when images are uploaded
  • Improve user experience without manual model changes

extent analysis

TL;DR

Implement automatic model routing to switch between the primary text model and the image model based on the input type, specifically detecting image attachments and switching to the multi-modal image model.

Guidance

  • Modify the resolveGatewayModelSupportsImages function to check for the presence of image attachments in the input and switch to the agent.imageModel.primary if images are detected.
  • Update the parseMessageWithAttachments function to handle image attachments and trigger the model switching logic.
  • Verify that the imageModel configuration is correctly set up in the schema and that the agent.imageModel.primary model supports image inputs.
  • Test the automatic model routing with different input scenarios, including text-only, text with images, and images-only, to ensure the correct model is used in each case.

Example

// Example configuration for automatic model routing
"agents": {
  "defaults": {
    "model": {
      "primary": "minimax/MiniMax-M2.7",
      "input": ["text"]
    },
    "imageModel": {
      "primary": "minimax/mini-max-vision",
      "input": ["text", "image"]
    }
  }
}

Notes

The implementation details may vary depending on the specific requirements and constraints of the project. It is essential to test the automatic model routing thoroughly to ensure it works correctly in all scenarios.

Recommendation

Apply a workaround by modifying the resolveGatewayModelSupportsImages function to check for image attachments and switch to the agent.imageModel.primary model, as this will allow for automatic model routing based on input type without requiring manual model switching.

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