openclaw - 💡(How to fix) Fix [Bug] Anthropic models not registered as media-understanding providers — `image` tool fails on anthropic-new / anthropic-paygo [1 comments, 2 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#72195Fetched 2026-04-27 05:33:33
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Timeline (top)
closed ×1commented ×1

Fix Action

Fix / Workaround

Current Workaround

Our cron (@reboot + */15) appends 4 provider stub entries (anthropic, anthropic-new, anthropic-paygo, nexos) to the PROVIDERS array. Each delegates to the existing locally-defined describeImageWithModel / describeImagesWithModel runtime functions (function declarations are hoisted, so referenced before their lexical position — the patch leverages this).

Happy to share the runtime patch we use as a reference for the registration shape — let me know.

RAW_BUFFERClick to expand / collapse

Problem

The PROVIDERS registry inside dist/pi-embedded-*.js (the array used by the image / media-understanding tool) only registers a small set of providers. In our installed 2026.4.24 bundle the registered set excludes Anthropic.

When the agent tries to use the image tool while the active model is anthropic-new/claude-opus-4-7 (or anthropic-paygo/claude-opus-4-6, or nexos/...), the call fails with effectively:

No media-understanding provider registered for anthropic-new

…even though Claude 3.5+ and 4.x natively support image content blocks via messages.create() with {type: "image", source: {...}}. The capability exists on the provider — it's just not surfaced to OpenClaw's image tool.

Current Workaround

Our cron (@reboot + */15) appends 4 provider stub entries (anthropic, anthropic-new, anthropic-paygo, nexos) to the PROVIDERS array. Each delegates to the existing locally-defined describeImageWithModel / describeImagesWithModel runtime functions (function declarations are hoisted, so referenced before their lexical position — the patch leverages this).

It's a sed-injected JS object literal pushed to the array. Works, but fragile and breaks on every npm install -g openclaw.

Proposed Solution

Register Anthropic as a first-class media-understanding provider in source. Implementation is minimal — complete() already accepts content blocks of {type:"image",source:{type:"base64",media_type,data}} for all Claude 3.5+ and 4.x models.

This would also make any other Anthropic-flavor binding (anthropic-paygo, custom proxy bindings, etc.) work without per-binding registration.

Environment

  • OpenClaw 2026.4.24 (commit cbcfdf6)
  • Bindings in use: anthropic-new (primary), anthropic-paygo (fallback)
  • Models: Claude Opus 4.6, 4.7, Sonnet 4.6 — all support vision
  • Bundle file: dist/pi-embedded-*.js

Happy to share the runtime patch we use as a reference for the registration shape — let me know.

Thanks!

extent analysis

TL;DR

Register Anthropic as a first-class media-understanding provider in the PROVIDERS array to enable support for image content blocks.

Guidance

  • Verify that the complete() function already accepts content blocks of {type:"image",source:{type:"base64",media_type,data}} for all Claude 3.5+ and 4.x models.
  • Check the implementation of the describeImageWithModel and describeImagesWithModel runtime functions to ensure they can handle image content blocks.
  • Consider adding Anthropic as a provider in the PROVIDERS array in the source code, similar to the proposed solution.
  • Test the registration of Anthropic as a provider to ensure it works with different Anthropic-flavor bindings and models.

Example

No code snippet is provided as it is not explicitly stated in the issue, but the registration shape can be shared as a reference.

Notes

The current workaround using a cron job to append provider stub entries to the PROVIDERS array is fragile and breaks on every npm install -g openclaw. A more robust solution is needed.

Recommendation

Apply the proposed solution to register Anthropic as a first-class media-understanding provider in the source code, as it is a more robust and maintainable solution.

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

openclaw - 💡(How to fix) Fix [Bug] Anthropic models not registered as media-understanding providers — `image` tool fails on anthropic-new / anthropic-paygo [1 comments, 2 participants]