Repository navigation
fix(qq-official): 群里 @ 机器人时对话对象标成点名自己,不再被模型当闲聊不出声 - #1234
Merged
Merged
Conversation
QQ 官方机器人把 @ 机器人的那一段从正文里剥掉,被点名只体现在 ToMe 上; addressingForEvent 只认 at 段,于是告诉模型 mentions_self=false,模型把明明叫它的话 当成群友闲聊,send 空正文。现在官方机器人群消息 ToMe 时补一条指向自己的提及。
SuInk
force-pushed
the
claude/qq-official-at-addressing
branch
from
October 27, 2026 17:16
e5143ce to
0253778
Compare
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.
QQ 官方机器人在群里被 @ 时,给模型的「当前消息的对话对象」现在会标明点名了自己(
mentions_self=true)。以前这一项一直是 false,模型可能把明明在叫它的话当成群友闲聊,send空正文、不出声。Why
生产上 2026-10-28 00:04 有人在群里 @ 机器人说「试试发个md表格」,事件页显示「模型判断这轮不需要回复:send 正文为空」。
根因:QQ 官方机器人会把 @ 机器人的那一段从正文里剥掉,「被点名」只体现在事件的
ToMe=true上(GROUP_AT_MESSAGE_CREATE 或 mentions 里的is_you)。addressingForEvent只从at段和MentionTargets里找提及,于是给模型的对话对象是{"reply_target":"none","mentions":[],"mentions_self":false},等于告诉它「没人叫你」。路由那一步按 ToMe 判定要回复,但到了主回复模型这里,它按这份对话对象选择了沉默。改了什么
addressingForEvent:QQ 官方机器人的群消息ToMe=true且还没有指向自己的提及时,补一条{target: "self"},mentions_self=true。ToMe也可能来自叫名字,照旧只认at段;全量群消息模式下没 @ 机器人的消息ToMe=false,不会被补成点名。用户影响
QQ 官方机器人在群里被 @ 后不会再因为「以为没人叫它」而不回。其他平台不变。
验证
scripts/test-serial.sh ./model/assistant:-race和TZ=UTC均通过。TestAddressingMarksQQOfficialGroupAtAsSelf:官方机器人 ToMe 的群消息标成点名自己;ToMe=false 不补;OneBot 的 ToMe 不受影响。send空正文;改后 3/3 次正常发出 Markdown 表格。context canceled不是故障:同一个人 4 秒后追发「表格」,那一轮按追发合并被取消后带着两条重答并正常发出,与本 PR 无关。