openclaw - 💡(How to fix) Fix [Bug] Native image dropped after sanitization on /v1/responses with anthropic/claude-sonnet-4-5 (WhatsApp via wa-bridge) [1 pull requests]

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…

Images sent via the /v1/responses HTTP API are silently dropped by the embedded PI runner's sanitizeImageBlocks, even though the Anthropic model supports vision. The gateway accepts the input_image block (200 OK) but strips it before the prompt reaches the model. The model then hallucinates or says "I don't see any photo."

Root Cause

Images sent via the /v1/responses HTTP API are silently dropped by the embedded PI runner's sanitizeImageBlocks, even though the Anthropic model supports vision. The gateway accepts the input_image block (200 OK) but strips it before the prompt reaches the model. The model then hallucinates or says "I don't see any photo."

Fix Action

Fixed

Code Example

{
  "model": "openclaw",
  "input": [{
    "type": "message",
    "role": "user",
    "content": [
      {"type": "input_text", "text": "What is in this photo?"},
      {"type": "input_image", "source": {"type": "base64", "media_type": "image/jpeg", "data": "<base64>"}}
    ]
  }],
  "user": "test"
}

---

Logs:

agent model: anthropic/claude-sonnet-4-5 (thinking=medium, fast=off)
Native image: dropped 1 image(s) after sanitization (prompt:images).
I don't see any photo attached to your message.

Model capability mismatch:

# Configured view (wrong):
openclaw models list
anthropic/claude-sonnet-4-5    text    195k    default

# Full provider catalog (correct):
openclaw models list --all
anthropic/claude-sonnet-4-5    text+image    195k    default
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Images sent via the /v1/responses HTTP API are silently dropped by the embedded PI runner's sanitizeImageBlocks, even though the Anthropic model supports vision. The gateway accepts the input_image block (200 OK) but strips it before the prompt reaches the model. The model then hallucinates or says "I don't see any photo."

Steps to reproduce

  1. Configure OpenClaw with anthropic/claude-sonnet-4-5 (or claude-sonnet-4-6) as the default model
  2. Send a POST to /v1/responses with an input_image block:
{
  "model": "openclaw",
  "input": [{
    "type": "message",
    "role": "user",
    "content": [
      {"type": "input_text", "text": "What is in this photo?"},
      {"type": "input_image", "source": {"type": "base64", "media_type": "image/jpeg", "data": "<base64>"}}
    ]
  }],
  "user": "test"
}
  1. Observe gateway log: Native image: dropped 1 image(s) after sanitization (prompt:images).
  2. Model responds: "I don't see any photo attached to your message."

Expected behavior

Images should pass through sanitization to the model when the provider catalog reports the model as vision-capable (text+image).

Actual behavior

Images are dropped. The model never sees them. If the model is Georgia (a business agent), she hallucinates a plausible description instead of saying she can't see the image.

OpenClaw version

2026.5.18 (50a2481)

Operating system

Ubuntu 24.04 (Azure VM)

Install method

npm global

Model

anthropic/claude-sonnet-4-5

Provider / routing chain

WhatsApp → wa-bridge (FastAPI) → POST /v1/responses → anthropic

Additional provider/model setup details

openclaw models list shows the configured model as text-only:

anthropic/claude-sonnet-4-5 text 195k no no default

But openclaw models list --all (full provider catalog) correctly shows:

anthropic/claude-sonnet-4-5 text+image 195k no no default

The embedded PI runner's sanitizeImageBlocks checks the resolved/configured model capability (which says text), not the full provider catalog (which says text+image). Since the model appears text-only, all images are stripped.

This affects every Anthropic model accessed via the direct anthropic provider — claude-sonnet-4-5, claude-sonnet-4-6, etc. all show text in the configured view despite the provider catalog listing them as text+image.

Logs, screenshots, and evidence

Logs:

agent model: anthropic/claude-sonnet-4-5 (thinking=medium, fast=off)
Native image: dropped 1 image(s) after sanitization (prompt:images).
I don't see any photo attached to your message.

Model capability mismatch:

# Configured view (wrong):
openclaw models list
anthropic/claude-sonnet-4-5    text    195k    default

# Full provider catalog (correct):
openclaw models list --all
anthropic/claude-sonnet-4-5    text+image    195k    default

Impact and severity

Affected: WhatsApp users sending images via wa-bridge → /v1/responses Severity: High (all inbound images silently dropped, model hallucinates responses) Frequency: 100% — every image sent via /v1/responses to any direct Anthropic model Consequence: Vision completely broken on the /v1/responses HTTP API path for Anthropic provider. Model fabricates image descriptions instead of processing actual image content.

Additional information

No response

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 pass through sanitization to the model when the provider catalog reports the model as vision-capable (text+image).

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 - 💡(How to fix) Fix [Bug] Native image dropped after sanitization on /v1/responses with anthropic/claude-sonnet-4-5 (WhatsApp via wa-bridge) [1 pull requests]