Skip to content

Xcomputer v2.0.116

Choose a tag to compare

@xxccdl xxccdl released this 21 Jul 10:34
· 3 commits to master since this release
  1. 修复集群模式下偶发的 400 错误(msg with role "tool" must be a response to...)
  2. 根因:trimMessages 和 compressContextIfNeeded 裁剪消息历史时,可能把 assistant.tool_calls 消息裁剪掉,但保留了对应的 tool 结果消息,导致下次 AI 调用时 API 返回 400。
  3. 修复:
    1. swarm-manager.ts trimMessages:丢弃 tail 开头孤立的 tool 消息,并检查 assistant.tool_calls 是否有对应 tool 响应
    1. task-orchestrator.ts compressContextIfNeeded:丢弃 recentMessages 开头孤立的 tool 消息
    1. isTransientError:增加 5xx/429/503/504/408 和中继后端偶发 400(含 tool_call 字样)的重试支持
    1. callAiWithRetry:失败时记录详细错误日志(含状态码和错误消息前 300 字符)