hermes - 💡(How to fix) Fix DingTalk inbound media URLs are skipped as unreadable native image paths

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…

Fix Action

Fix / Workaround

Local Workaround / Patch

A local patch caches resolved DingTalk media URLs before assigning them back to the incoming message object and includes regression coverage for single image content, rich text picture content, and cache failure fallback.

Code Example

Image routing: native (model supports vision). 1 image(s) will be attached inline.
Native image attachment: skipped 1 unreadable path(s): ['https://<temporary-dingtalk-oss-url-redacted>']
RAW_BUFFERClick to expand / collapse

Bug Description

DingTalk inbound image/file messages can be lost before they reach the agent. The adapter resolves DingTalk downloadCode values into short-lived OSS download URLs, then passes those remote URLs through MessageEvent.media_urls. The native image routing path later treats each media_urls entry as a local filesystem path and skips it as unreadable.

Steps to Reproduce

  1. Configure DingTalk Stream Mode with a model/provider that routes inbound images natively.
  2. Send an image to the DingTalk bot.
  3. Observe the gateway logs.

Expected Behavior

DingTalk media should be cached locally while the temporary download URL is still valid, and MessageEvent.media_urls should contain agent-readable local cache paths (for example, Hermes image/document/audio cache paths).

Actual Behavior

The DingTalk adapter resolves the media code to a temporary remote URL and leaves that URL in media_urls. The later native image pipeline calls filesystem path checks on the URL string, causing the image to be skipped as unreadable.

Sanitized log pattern:

Image routing: native (model supports vision). 1 image(s) will be attached inline.
Native image attachment: skipped 1 unreadable path(s): ['https://<temporary-dingtalk-oss-url-redacted>']

Impact

  • User-sent DingTalk images are not visible to the agent in native image mode.
  • Rich text images using downloadCode / pictureDownloadCode are affected.
  • Other DingTalk media that is passed as a remote temporary URL can also be lost or expire before manual recovery.

Proposed Fix

Cache resolved DingTalk download URLs immediately inside the DingTalk adapter:

  • images via Hermes image cache helpers;
  • audio via Hermes audio cache helpers;
  • generic files via Hermes document cache helpers;
  • keep failure non-fatal and log only sanitized URLs.

Local Workaround / Patch

A local patch caches resolved DingTalk media URLs before assigning them back to the incoming message object and includes regression coverage for single image content, rich text picture content, and cache failure fallback.

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