Skip to content

fix(wecom): a refused image upload sent as a link is not a delivered image (faeb5b2b class) - #121

Merged
teknium1 merged 1 commit into
mainfrom
wecom/link-fallback-not-delivered
Nov 29, 2026
Merged

teknium1 merged 1 commit into
mainfrom
wecom/link-fallback-not-delivered

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

What

hermes-agent faeb5b2b ("no adapter counts a link fallback as a delivered image", #160210 class) added SendResult.link_fallback to core. It also made every core adapter's URL-as-text fallback for a refused image upload set that flag, so the base batch loop stops counting the link as a delivered image. WeCom left core with hermes-agent#159649 before that commit landed. As a result, the plugin's own fallback in WeComMediaMixin.send_image still counted as delivered, and a WeCom turn whose only image upload was refused ended as SUCCESS.

Fix: the same one-line rule core applied to QQ Bot (ported to the official qqbot plugin in NousResearch/hermes-official-plugins#560). sent.link_fallback = True on the text fallback. The per-call result stays success=True, because the link did go out.

Found by the class sweep of core fixes the moved plugins missed. DingTalk's send_image renders a markdown inline image, which is its native image delivery and not a fallback, so it is unchanged. Yuanbao has no text fallback.

Tests

wecom/tests/test_wecom_image_link_fallback.py, run against hermes-agent main 941f55a5:

  • before the fix it failed with assert sent.link_fallback is True (got False), so the batch counted the link as a delivered image
  • after the fix the whole wecom suite passes (97 tests)

Follow-up: re-pin plugin-catalog/wecom.yaml in hermes-agent to this PR's merge commit.

…image

hermes-agent faeb5b2b (#160210 class) made every core adapter's URL-as-text
fallback mark its SendResult link_fallback, so the base batch loop no longer
counts it as a delivered image. WeCom had left core (#159649) by then, so its
own fallback in send_image still reported a media-only turn whose only image
upload was refused as delivered. Same one-line rule as core's QQ Bot fix.
@teknium1
teknium1 merged commit 4530438 into main Nov 29, 2026
31 checks passed
teknium1 added a commit to NousResearch/hermes-agent that referenced this pull request Nov 29, 2026
… is not a delivered image)

NousResearch/hermes-labs-plugins#121 applies hermes-agent faeb5b2's rule to
the WeCom plugin: a refused image upload sent as a link no longer counts as a
delivered image.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant