v0.26.4
v0.26.4 — 重要修复:带参数工具调用全部失败的问题
感谢真实设备反馈:部分模型下所有需要参数的工具调用(搜索、打开应用、应用列表等)都会失败,提示「收到的参数不是有效 JSON(JsonLiteral is not a JsonObject)」,而不带参数的工具正常。此问题会导致 AI 反复重试耗尽轮次。
根因(两端都有问题)
- 模型参数格式兼容:部分模型/网关会把参数双重编码(把整个 JSON 对象再包一层字符串)或夹带说明文字,旧解析层只认标准 JSON 对象,直接拒绝
- 流式分片合并缺陷:参数分片到达时不满足"前缀扩展"的片段会被静默丢弃,导致参数不完整
修复
- 参数解析三层容错:标准 JSON 对象 → 双重编码自动解码 → 从文本中提取
{...}对象;失败时保留原文片段便于诊断 - 分片合并自适应:前缀增长 / 重复整发 / 乱序分片拼接 / 垃圾片段保护——不再丢任何分片
- 新增 13 个单元测试覆盖上述所有解析场景
影响
搜索、打开应用、安装列表等所有带参数工具恢复正常;这也是此前「AI 连续写错指令」的根本原因之一。
SHA-256:
- full:
06f0eb530a83e2c7795dd3f0a0cb0b215bc96ab319d56a647fe5219dd0820392 - lite:
c9435822ba5344bcca1dd46684c26700415d2c839945166e2ae28db75349baf5
v0.26.4 — Critical fix: parameterized tool calls all failing
Thanks to a real-device report: with some models, every tool call that takes parameters (search, open app, installed apps, etc.) failed with "received arguments are not valid JSON (JsonLiteral is not a JsonObject)", while no-argument tools worked. This made the AI burn rounds retrying.
Root causes (both ends)
- Argument format compatibility: some models/gateways double-encode arguments (the whole JSON object wrapped in a string) or wrap them in prose; the old parser only accepted a plain JSON object and rejected everything else
- Streaming fragment merge defect: argument fragments that didn't match prefix-growth were silently dropped, producing incomplete arguments
Fixes
- Three-layer tolerant parsing: plain JSON object → double-encoded auto-decode → extract
{...}span from text; failure keeps the raw payload snippet for diagnosis - Adaptive fragment merge: prefix growth / full resend / out-of-order concatenation / junk protection — no fragment is dropped anymore
- 13 new unit tests covering every parsing scenario
Impact
Search, open-app, app lists and all parameterized tools work again; this was one of the root causes behind the AI "repeatedly writing wrong commands".
SHA-256:
- full:
06f0eb530a83e2c7795dd3f0a0cb0b215bc96ab319d56a647fe5219dd0820392 - lite:
c9435822ba5344bcca1dd46684c26700415d2c839945166e2ae28db75349baf5