Symptom
Using openrouter/healer-alpha (a vision-capable model), sending an image
via Feishu/tool results — the model says "the image is too dark" or "can't see the content"
because it literally never received the image data.
Root cause
When an OpenRouter model is not in the static snapshot
(models.generated.ts), resolveModelWithRegistry falls back to
input: ["text"]. This causes two independent filters to drop images:
detectAndLoadPromptImages checks model.input.includes("image")
→ returns empty, no image loaded into user message
openai-completions.js convertMessages checks
model.input.includes("image") → strips image blocks from tool results
Both are silent — no error, no warning. The model receives
"Read image file [image/jpeg]" as plain text with no actual image data.
Evidence
Captured the actual API request sent to OpenRouter for the same image,
same query:
With fallback input: ["text"] (current behavior):
{"role":"tool","content":"Read image file [image/jpeg]","tool_call_id":"2e8b1f235"}
// No user message with image_url follows — images silently dropped
With correct input: ["text","image"]:
{"role":"tool","content":"Read image file [image/jpeg]","tool_call_id":"call091c1c3ac38a4c6997ed9998"},
{"role":"user","content":[
{"type":"text","text":"Attached image(s) from tool result:"},
{"type":"image_url","image_url":{"url":"data:image/jpeg;base64,..."}}
]}
Why this keeps happening
The built-in model list is a static snapshot baked at build time:
- OpenRouter adds a new model
- Someone manually runs
npm run generate-models in pi-mono
- pi-ai publishes to npm
- openclaw updates the dependency and releases
- User updates openclaw
No step is automated. Until the full chain completes, every new model
is silently broken for vision use.
Proposed fix
OpenRouter provides a public API (/api/v1/models) that returns model
capabilities in real time — ~465KB, under a second, no auth required.
A lightweight runtime lookup with disk + in-memory caching eliminates this
entire dependency chain at minimal cost.
See #45824 for implementation — tested end-to-end with healer-alpha
successfully receiving and describing images after the fix.
Symptom
Using
openrouter/healer-alpha(a vision-capable model), sending an imagevia Feishu/tool results — the model says "the image is too dark" or "can't see the content"
because it literally never received the image data.
Root cause
When an OpenRouter model is not in the static snapshot
(
models.generated.ts),resolveModelWithRegistryfalls back toinput: ["text"]. This causes two independent filters to drop images:detectAndLoadPromptImageschecksmodel.input.includes("image")→ returns empty, no image loaded into user message
openai-completions.jsconvertMessageschecksmodel.input.includes("image")→ strips image blocks from tool resultsBoth are silent — no error, no warning. The model receives
"Read image file [image/jpeg]"as plain text with no actual image data.Evidence
Captured the actual API request sent to OpenRouter for the same image,
same query:
With fallback
input: ["text"](current behavior):{"role":"tool","content":"Read image file [image/jpeg]","tool_call_id":"2e8b1f235"} // No user message with image_url follows — images silently droppedWith correct
input: ["text","image"]:{"role":"tool","content":"Read image file [image/jpeg]","tool_call_id":"call091c1c3ac38a4c6997ed9998"}, {"role":"user","content":[ {"type":"text","text":"Attached image(s) from tool result:"}, {"type":"image_url","image_url":{"url":"data:image/jpeg;base64,..."}} ]}Why this keeps happening
The built-in model list is a static snapshot baked at build time:
npm run generate-modelsin pi-monoNo step is automated. Until the full chain completes, every new model
is silently broken for vision use.
Proposed fix
OpenRouter provides a public API (
/api/v1/models) that returns modelcapabilities in real time — ~465KB, under a second, no auth required.
A lightweight runtime lookup with disk + in-memory caching eliminates this
entire dependency chain at minimal cost.
See #45824 for implementation — tested end-to-end with healer-alpha
successfully receiving and describing images after the fix.