openclaw - ✅(Solved) Fix parseMessageWithAttachments drops images for bigmodel/glm-5v-turbo despite model declaring input: [text, image] [1 pull requests, 2 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#66253Fetched 2026-04-14 05:38:41
View on GitHub
Comments
2
Participants
3
Timeline
3
Reactions
0
Author
Timeline (top)
commented ×2cross-referenced ×1

Images sent from Control UI webchat are silently dropped with the warning:

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

This happens for bigmodel/glm-5v-turbo, which is explicitly declared in openclaw.json with input: ["text", "image"] (multimodal vision model).

Error Message

Gateway Error Log

  • #66095 — qwen/qwen3.6-plus affected (same error)

Root Cause

This is the same root cause as several recently reported issues:

  • #66095 — qwen/qwen3.6-plus affected (same error)
  • #65424 — minimax/MiniMax-M2.7 (root cause identified in provider catalog)
  • #65431 — minimax/MiniMax-M2.7 (image tool layer)
  • #65450 — bailian/kimi-k2.5 (custom provider)
  • #64839 — regression from v2026.4.10
  • #65211 — PR that fixes this (pending merge)

Fix Action

Fixed

PR fix notes

PR #66275: fix(gateway): include configured custom provider models

Description (problem / solution / changelog)

Summary

  • Problem: gateway attachment capability checks only consulted the runtime model catalog, and that catalog could omit config-defined custom provider models even when models.json preserved them.
  • Why it matters: multimodal OpenAI-compatible custom models like bigmodel/glm-5v-turbo were treated as text-only, so image attachments were dropped before the model ever saw them.
  • What changed: loadModelCatalog() now merges configured provider models into the runtime catalog before gateway capability checks consume it, and a regression test locks in the custom-provider omission case.
  • What did NOT change (scope boundary): this does not change attachment parsing semantics, provider auth flows, or Pi discovery behavior outside catalog assembly.

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 #66253
  • Related #65211
  • This PR fixes a bug or regression

Root Cause (if applicable)

  • Root cause: resolveGatewayModelSupportsImages() fails closed when the selected provider/model pair is missing from loadGatewayModelCatalog(), and config-defined custom provider models were not being merged into that catalog.
  • Missing detection / guardrail: there was no catalog-level regression test covering a custom provider model that exists in config but is omitted by Pi discovery.
  • Contributing context (if known): Pi discovery can omit custom provider models, while ensureOpenClawModelsJson() still writes them into models.json, so the gateway catalog and the actual configured runtime diverged.

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/model-catalog.test.ts
  • Scenario the test should lock in: a configured custom provider model with input: ["text", "image"] is present in the runtime catalog even when Pi discovery omits it.
  • Why this is the smallest reliable guardrail: the regression happens at catalog assembly time, before attachment parsing or gateway RPC handling.
  • Existing test that already covers this (if any): src/gateway/session-utils.test.ts already covers the image-capability helper once a matching catalog row exists.
  • If no new test is added, why not: N/A

User-visible / Behavior Changes

Custom OpenAI-compatible provider models configured with image input now stay image-capable during gateway attachment checks, so image attachments are no longer dropped just because the runtime catalog omitted that provider/model row.

Diagram (if applicable)

Before:
[configured custom vision model] -> [missing from runtime catalog] -> [supportsImages=false] -> [gateway drops image attachments]

After:
[configured custom vision model] -> [merged into runtime catalog] -> [supportsImages=true] -> [gateway keeps image attachments]

Security Impact (required)

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

Repro + Verification

Environment

  • OS: macOS 25.3.0 (arm64)
  • Runtime/container: local dev checkout
  • Model/provider: bigmodel/glm-5v-turbo
  • Integration/channel (if any): gateway / Control UI-style attachment path
  • Relevant config (redacted): custom models.providers.bigmodel with api: "openai-completions", baseUrl: "https://open.bigmodel.cn/api/coding/paas/v4", and model input: ["text", "image"]

Steps

  1. Configure a custom provider model such as bigmodel/glm-5v-turbo with input: ["text", "image"].
  2. Send an image through a gateway path that calls resolveGatewayModelSupportsImages() before parseMessageWithAttachments().
  3. Observe whether the selected model exists in the gateway runtime catalog.

Expected

  • The configured model appears in the runtime catalog.
  • supportsImages resolves to true.
  • The gateway keeps the image attachment.

Actual

  • Before this change, the configured model could be absent from the runtime catalog even though models.json contained it.
  • The gateway then resolved supportsImages to false and dropped the image attachment.

Evidence

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

  • Verified scenarios:
    • Ran pnpm test src/agents/model-catalog.test.ts -t "includes configured custom provider models even when Pi discovery omits them".
    • Ran pnpm test src/gateway/session-utils.test.ts -t "resolveGatewayModelSupportsImages".
    • Ran pnpm check.
    • Reproduced the exact catalog lookup path locally with a temporary bigmodel/glm-5v-turbo config and auth profile; before the fix the catalog probe returned found: false, and after the fix it returned found: true with supportsImages: true.
  • Edge cases checked:
    • Existing registry and provider-plugin dedupe still go through the same normalized provider/id key path.
  • What you did not verify:
    • I did not run a full end-to-end webchat/manual UI attachment flow in this branch.

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/No): Yes
  • Config/env changes? (Yes/No): No
  • Migration needed? (Yes/No): No
  • If yes, exact upgrade steps: N/A

Risks and Mitigations

  • Risk: a config-defined provider model could collide with an already discovered provider/id pair.
    • Mitigation: catalog assembly now uses the same normalized provider/id dedupe key across discovered, configured, and supplemental entries, preserving existing discovered rows as authoritative when they already exist.

AI assistance: used for implementation and drafting, with local verification by targeted tests plus a direct runtime repro.

Made with Cursor

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • src/agents/model-catalog.test.ts (modified, +84/-0)
  • src/agents/model-catalog.ts (modified, +62/-13)

Code Example

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

---

{
  "id": "glm-5v-turbo",
  "name": "GLM-5V Turbo",
  "api": "openai-completions",
  "reasoning": true,
  "input": ["text", "image"],
  "contextWindow": 202752,
  "maxTokens": 131072
}

---

2026-04-14T09:05:29+860 [gateway] parseMessageWithAttachments: 1 attachment(s) dropped — model does not support images
2026-04-14T09:05:44.283+08:00 [gateway] parseMessageWithAttachments: 1 attachment(s) dropped — model does not support images
2026-04-14T09:09:15.993+08:00 [gateway] parseMessageWithAttachments: 1 attachment(s) dropped — model does not support images
2026-04-14T09:13:07.005+08:00 [gateway] parseMessageWithAttachments: 1 attachment(s) dropped — model does not support images
RAW_BUFFERClick to expand / collapse

Description

Images sent from Control UI webchat are silently dropped with the warning:

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

This happens for bigmodel/glm-5v-turbo, which is explicitly declared in openclaw.json with input: ["text", "image"] (multimodal vision model).

Reproduction

  1. Set agents.defaults.model.primary to bigmodel/glm-5v-turbo (custom provider, api: "openai-completions")
  2. Send an image attachment via Control UI webchat (or any channel)
  3. Gateway logs show the warning above; the agent never receives the image
  4. If the message is image-only (no text), it arrives as an empty message body

Expected behavior

Images should be passed through to the LLM for models that declare input: ["text", "image"]. The user's explicit config in openclaw.json should be respected by parseMessageWithAttachments.

Evidence

Model Config (openclaw.json)

{
  "id": "glm-5v-turbo",
  "name": "GLM-5V Turbo",
  "api": "openai-completions",
  "reasoning": true,
  "input": ["text", "image"],
  "contextWindow": 202752,
  "maxTokens": 131072
}

Gateway Error Log

2026-04-14T09:05:29+860 [gateway] parseMessageWithAttachments: 1 attachment(s) dropped — model does not support images
2026-04-14T09:05:44.283+08:00 [gateway] parseMessageWithAttachments: 1 attachment(s) dropped — model does not support images
2026-04-14T09:09:15.993+08:00 [gateway] parseMessageWithAttachments: 1 attachment(s) dropped — model does not support images
2026-04-14T09:13:07.005+08:00 [gateway] parseMessageWithAttachments: 1 attachment(s) dropped — model does not support images

Environment

  • OpenClaw: 2026.4.11
  • OS: macOS 25.3.0 (arm64)
  • Node: v22.22.1
  • Channel: webchat (Control UI)
  • Provider: bigmodel (custom, baseUrl: https://open.bigmodel.cn/api/coding/paas/v4)
  • Model: bigmodel/glm-5v-turbo

Related Issues

This is the same root cause as several recently reported issues:

  • #66095 — qwen/qwen3.6-plus affected (same error)
  • #65424 — minimax/MiniMax-M2.7 (root cause identified in provider catalog)
  • #65431 — minimax/MiniMax-M2.7 (image tool layer)
  • #65450 — bailian/kimi-k2.5 (custom provider)
  • #64839 — regression from v2026.4.10
  • #65211 — PR that fixes this (pending merge)

Root cause hypothesis: parseMessageWithAttachments checks image capability against the bundled Pi Model Registry catalog (~850 built-in models). User-defined custom provider models (like bigmodel/*) are never loaded into this registry at gateway startup, so the check always returns false and images are silently dropped.

The fix in PR #65211 (server-model-catalog.ts + session-utils.ts) should also cover this case if merged.

extent analysis

TL;DR

The issue can be resolved by merging the fix in PR #65211, which updates the model catalog to include custom provider models.

Guidance

  • Verify that the custom provider model bigmodel/glm-5v-turbo is correctly declared in openclaw.json with input: ["text", "image"].
  • Check the gateway logs to confirm that the warning message is related to the parseMessageWithAttachments function.
  • Review the code changes in PR #65211 to understand the proposed fix and its potential impact on the model catalog.
  • Consider testing the fix in a non-production environment before merging it into the main codebase.

Example

No code snippet is provided as the issue is related to a specific fix in a pending PR.

Notes

The root cause of the issue is likely due to the custom provider model not being loaded into the Pi Model Registry catalog, causing the parseMessageWithAttachments function to incorrectly drop image attachments.

Recommendation

Apply the workaround by merging the fix in PR #65211, as it addresses the root cause of the issue and should resolve the problem for custom provider models.

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 passed through to the LLM for models that declare input: ["text", "image"]. The user's explicit config in openclaw.json should be respected by parseMessageWithAttachments.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING