Skip to content

fix: 提升消息与工具链路稳定性并补齐群成员检索能力#28

Merged
69gg merged 13 commits intomainfrom
bugfix/bugs-0
Feb 14, 2026
Merged

fix: 提升消息与工具链路稳定性并补齐群成员检索能力#28
69gg merged 13 commits intomainfrom
bugfix/bugs-0

Conversation

@69gg
Copy link
Owner

@69gg 69gg commented Feb 14, 2026

Summary

  • 修复消息发送链路中的多处问题:@人格式、昵称显示、B 站卡片重复发送,以及 NagaAgent 提示词相关错误。
  • 增强 AI 调度与模型调用稳定性:补充队列级重试、解耦 thinking 配置项,并修复 end_summary_storage.save() 缺少 await 导致的摘要持久化失败。
  • 新增 group.find_member 工具,支持按昵称/拼音检索群成员,完善群工具能力与相关配置。

69gg and others added 12 commits February 13, 2026 22:51
end 工具的参数在 tool_calls 循环中解析一次后未保存,
在后续专门处理段又重新解析,导致同一条修复警告输出两次。
现在循环中保存已解析的参数,后续直接复用。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
模型 API 调用失败(rate limit、超时、5xx 等)后,请求自动放回
队列最前端优先重试,避免用户消息静默丢失。通过 any_tool_executed
标志确保仅在无副作用时重试,防止消息重复发送。

- 新增 ai_request_max_retries 配置项(默认2,范围0-5)
- ModelQueue 新增 retry_queue,调度循环优先处理
- ask() 在首次模型调用失败时向上传播异常
- 热重载注册为需重启项

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
思维链工具调用兼容功能不限于 DeepSeek,GLM 等模型同样适用。
移除所有 DeepSeek 品牌硬编码,修复思维链内容重复日志问题。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
将是否发送 budget_tokens 从 compat 中独立出来,用户可单独控制是否
在请求中传递思维预算,避免 compat 开启时预算被静默丢弃。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
移除 send_message 工具的 at_user 参数,改为在消息文本中使用 [@{qq_id}]
格式自动检测并转换为 CQ:at。支持 \[...\] 转义避免触发 @。
转换统一在 MessageSender.send_group_message 中完成。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 提示词去掉 {QQ号} 占位符写法,用具体示例避免歧义
- 正则兼容 [@{xxx}] 花括号格式作为兜底
- 传入 @ 消息段有昵称时显示为 [@qq(昵称)]

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
支持精确匹配和模糊匹配(子串、拼音首字母/全拼、编辑距离容错),
按匹配优先级排序返回结果。新增 pypinyin 依赖。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
关键词也需要转拼音才能与名字拼音做比较,否则中文关键词
无法通过拼音匹配同音/近音的名字(如洛兰匹配紫罗兰)。
save() 是 async 方法,缺少 await 导致协程未执行,end 摘要不会写入磁盘。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c56f130b4d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 1040 to 1045

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve legacy deepseek_new_cot_support config alias

This parser now only reads thinking_include_budget/thinking_tool_call_compat, so existing deployments that still use deepseek_new_cot_support (or its old env vars) silently fall back to defaults (thinking_include_budget=True, thinking_tool_call_compat=False). For DeepSeek users who previously enabled the old flag to avoid strict thinking payload incompatibilities, this can reintroduce 400 failures immediately after upgrade unless they manually migrate every config key.

Useful? React with 👍 / 👎.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate find_member count before int conversion

Casting count with int(args.get("count", 10) or 10) can raise ValueError when the model emits a non-numeric string (which still happens in function-call arguments despite schema hints), and this occurs before the surrounding try block, so the tool crashes instead of returning a clear validation error. This makes group.find_member brittle on malformed tool arguments.

Useful? React with 👍 / 👎.

@69gg 69gg merged commit 562a813 into main Feb 14, 2026
1 check passed
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

Comments