Skip to content

[Bug] User image attachments dropped when primary model lacks vision — imageModel fallback not honored #68513

@WwNeXst

Description

@WwNeXst

Bug Description

User-sent image attachments (e.g., screenshots dragged into webchat) are dropped at the gateway layer when the primary model does not support image input, even when `agents.defaults.imageModel` is configured.

Steps to Reproduce

  1. Set primary model to MiniMax M2.7 Highspeed (`input: ["text"]`)
  2. Configure `agents.defaults.imageModel.primary` to `moonshot/kimi-k2.5` (supports vision)
  3. Drag and drop a screenshot into webchat and send
  4. Observe in gateway logs: `parseMessageWithAttachments: 1 attachment(s) dropped — model does not support images`
  5. Image never reaches the model layer; `imageModel` fallback is never triggered

Root Cause

File: `attachment-normalize-fsjzmyqL.js`

`parseMessageWithAttachments` uses `supportsImages` resolved from the primary model only. It does not check or fall back to `agents.defaults.imageModel`.

The `imageModel` config is only used for tool-generated images (via the `agents/tool-images` subsystem), not for user-sent attachments.

Expected Behavior

User-sent image attachments should be treated the same as tool-generated images: when the primary model cannot accept images, the message should be routed to the model specified in `imageModel` instead of being silently dropped.

Workaround

Manual model switch to a vision-capable model (Kimi K2.5) before each screenshot, then switch back.

Environment

  • OpenClaw: 2026.4.15
  • macOS
  • Primary model: minimax/m2.7-highspeed
  • Fallback imageModel: moonshot/kimi-k2.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions