hermes - ✅(Solved) Fix [BUG] WeCom AI Bot: inbound image messages not extracted (extracted_media=0 despite image_keys present) [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
NousResearch/hermes-agent#11495Fetched 2026-04-18 06:00:44
View on GitHub
Comments
2
Participants
3
Timeline
5
Reactions
0
Author
Timeline (top)
commented ×2cross-referenced ×1labeled ×1referenced ×1

Error Message

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Fix Action

Fixed

PR fix notes

PR #11498: fix(wecom): extract inbound images delivered as image_keys (fixes extracted_media=0)

Description (problem / solution / changelog)

Problem

WeCom AI Bot delivers inbound images as a list of opaque image_keys rather than inline base64 or pre-signed URLs. The existing _extract_media() code only handles body.image (dict format), so payloads containing image_keys always produced extracted_media=0.

Fix

  • Add APP_CMD_GET_MSG_MEDIA = "aibot_get_msg_media" constant
  • Add _cache_media_by_key() method that exchanges an image_key for a download URL via aibot_get_msg_media WebSocket command
  • In _extract_media(), iterate body.image_keys and call _cache_media_by_key() for each key

Fixes #11495

Changed files

  • gateway/platforms/wecom.py (modified, +39/-0)

Code Example

[BUG] WeCom AI Bot: inbound image messages not extracted (extracted_media=0 despite image_keys present)

---
RAW_BUFFERClick to expand / collapse

Bug Description

[BUG] WeCom AI Bot: inbound image messages not extracted (extracted_media=0 despite image_keys present)

Steps to Reproduce

[BUG] WeCom AI Bot: inbound image messages not extracted (extracted_media=0 despite image_keys present)

Expected Behavior

[BUG] WeCom AI Bot: inbound image messages not extracted (extracted_media=0 despite image_keys present)

Actual Behavior

[BUG] WeCom AI Bot: inbound image messages not extracted (extracted_media=0 despite image_keys present)

Affected Component

Gateway (Telegram/Discord/Slack/WhatsApp)

Messaging Platform (if gateway-related)

No response

Debug Report

[BUG] WeCom AI Bot: inbound image messages not extracted (extracted_media=0 despite image_keys present)

Operating System

macOS 15.2

Python Version

No response

Hermes Version

No response

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

extent analysis

TL;DR

The issue with WeCom AI Bot not extracting inbound image messages despite image_keys being present may be related to a configuration or implementation issue within the Gateway component.

Guidance

  • Review the Gateway component's configuration and implementation to ensure it correctly handles image messages and updates the extracted_media field.
  • Verify that the image_keys are correctly populated and passed to the Gateway component for processing.
  • Check the documentation and implementation of the WeCom AI Bot to see if there are any specific requirements or settings for handling image messages.
  • Investigate if there are any version-specific issues or updates related to the Gateway component or WeCom AI Bot that may be contributing to the problem.

Notes

The lack of information about the Python version, Hermes version, and additional logs or traceback limits the ability to provide a more specific solution. Further investigation and debugging are necessary to determine the root cause.

Recommendation

Apply workaround: Given the limited information, it's recommended to apply a workaround by thoroughly reviewing the Gateway component's configuration and implementation to ensure correct handling of image messages, rather than waiting for a potential version upgrade.

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