fix(weixin): send single message per response instead of splitting - #7528
Closed
Liuwei1125 wants to merge 2 commits into
Closed
fix(weixin): send single message per response instead of splitting#7528Liuwei1125 wants to merge 2 commits into
Liuwei1125 wants to merge 2 commits into
Conversation
added 2 commits
April 10, 2026 23:12
Fix AttributeError when self.request_overrides is None in gateway mode, causing UnboundLocalError on api_kwargs and breaking all messaging platform integrations (Weixin, Telegram, etc.). Line 5522 called .get() directly on self.request_overrides without null-checking. While __init__ initializes it as dict(), gateway mode may create AIAgent instances without passing request_overrides.
Contributor
|
Merged via PR #8665 which synthesizes the best fixes from ~25 community PRs into a single consolidated change. Your contribution (single message per response) was reviewed and informed the final implementation. Thank you @Liuwei1125 for your work on this! |
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.
Summary
优化微信消息回复策略:将原来按换行/markdown 单元拆分多条消息的方式,改为"一次回复 = 一条消息"。
Problem
之前的
_split_text_for_weixin_delivery会把一条回复按换行、markdown 单元拆成多条消息发送,导致用户体验碎片化。Solution