fix(dingtalk): bridge 请求参数错误导致消息无法转发给小龙虾

问题:routeToAgent 调用 OpenClaw bridge /task 时传了 timeoutSeconds
(bridge schema 不认识),且缺少必须字段 idempotencyKey,导致 bridge
返回 INVALID_REQUEST,机器人沉默不回复。

修复:
- 移除 timeoutSeconds(不是 bridge API 参数)
- 改用 msg.msgId 作为 idempotencyKey(每条消息唯一,满足 bridge 要求)

根因定位:
  docker logs openclaw-83cc9ac3 显示
  "invalid chat.send params: must have required property 'idempotencyKey';
   at root: unexpected property 'timeoutSeconds'"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-03-08 11:53:52 -07:00
parent 64499a5d86
commit 54e6f13405
1 changed files with 1 additions and 1 deletions

View File

@ -506,7 +506,7 @@ export class DingTalkRouterService implements OnModuleInit, OnModuleDestroy {
{
prompt: text,
sessionKey: `agent:main:dt-${userId}`,
timeoutSeconds: TASK_TIMEOUT_S,
idempotencyKey: msg.msgId,
},
(TASK_TIMEOUT_S + 5) * 1000,
);