Repository navigation
fix(wecom): a refused image upload sent as a link is not a delivered image (faeb5b2b class) - #121
Merged
Merged
Conversation
…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
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
hermes-agent
faeb5b2b("no adapter counts a link fallback as a delivered image", #160210 class) addedSendResult.link_fallbackto 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 inWeComMediaMixin.send_imagestill 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 = Trueon the text fallback. The per-call result stayssuccess=True, because the link did go out.Found by the class sweep of core fixes the moved plugins missed. DingTalk's
send_imagerenders 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:assert sent.link_fallback is True(gotFalse), so the batch counted the link as a delivered imageFollow-up: re-pin
plugin-catalog/wecom.yamlin hermes-agent to this PR's merge commit.