优化 ai_auto_response 队列过期丢弃与超时策略

- 为 ai_auto_response 队列消息记录入队时刻,并增加消息过期丢弃机制
- 在出队前与发送前各检查一次消息是否过期,避免补发过时群聊回复
- 为 skip 日志补充 age 字段,便于观察排队老化情况
- 将 ai_auto_response 外层总超时收紧到 20 秒,并新增 message_expire_sec=12 配置
- 将 Dify auto_reply.group 请求超时收紧到 15 秒,并关闭重试以提升群聊时效性
This commit is contained in:
liuwei
2026-04-24 15:03:35 +08:00
parent ed7af06555
commit 7cee7a99e2
4 changed files with 74 additions and 4 deletions

View File

@@ -115,8 +115,11 @@ llm:
endpoint: "workflows/run"
workflow_output_key: "result_json"
response_mode: "blocking"
request_timeout: 60
max_retries: 3
# 群聊自动回复强调时效性:
# 1. Dify 请求不能等太久,否则容易出现“过了场子再补回”的违和感;
# 2. 这里把单次请求超时收紧,并关闭重试,让过期消息尽快放弃。
request_timeout: 15
max_retries: 1
retry_delay_seconds: 1.0
# 场景路由层:插件建议优先使用 scene而不是直接绑定 backend。
# 这样当模型或供应商切换时,只需要改这里,不需要逐个改插件配置。