lili
|
c372837762
|
feat(deps): 升级 AgentScope 2.0.2→2.0.3(代码+文档,创始人 2026-07-06 拍板)
contract-gates / contract-gates (push) Has been cancelled
docs-gate / docs-gate (push) Has been cancelled
不为某个新特性,而是没道理把底座停在带并行 tool-result 缺陷的补丁版;2.0.3
是同线相邻补丁版,升级面窄、收益确定。承 tech-decisions §11-13「护城河进洋葱、
框架件谨慎审计」线。
代码:两 worker requirements 钉 2.0.3+溯源注;4 个 cheap-worker patch 的版本
guard 更 2.0.3——主控逐一源码核实 2.0.3 锚点仍成立:compress_context@_agent.py:259
未漂移 / _parse_stream_response@_openai_chat/_model.py:297·index 分桶:417 未漂移 /
list_tools@_local_workspace.py:660 / get_toolkit 装配点迁 _chat.py:354(patch 替
绑定名不依赖行号);patch 头 pin 声明同步 2.0.3+复核标记,根因 2.0.2 期实证保留。
文档:current-truth 面扫除(agentscope-2.0-facts 改掉一处「2.0.3 是笔误」错陈述+
行号漂移开源码更新 594→622/136→162/33→42/857→884/875→902、tech-decisions §15
升级决策散文、运行时 SoT 当前选型句、活代码注释、tier2 README 死链修);留痕层
(plans/HANDOFF/patch 根因分析/ADR 历史核验句)按两层纪律不动。
兼容三证:源码逐处 diff(RedisMessageBus/OpenAI formatter 零变化、Anthropic
formatter 仅并行 tool-result bug 修、ModelCallEndEvent 无变化、MiddlewareBase
加性 get_middleware_key)/ cheap 393+tier2 140+patch 20 测试全绿 / dev 两 venv
升级后 3 服务健康。收敛真跑:cheap 便宜档 ReAct 全链路 356 trace 零升级异常+
真出游戏过九门 9/9;tier2 Anthropic 工具循环跑满 40 轮写 15 文件 gen.log/trace
零升级异常(decision=fix 属 tier2 生成质量、非升级回归)。
2.0.3 新增原生 ReplyBudgetControlMiddleware(历史反复核验 2.0.2 不存在的类)/
tool 级洋葱/RAG/mem0,列而不迁(自建 ¥ 两段式 fail-closed 硬闸是护城河,原生
token 软控替不了),follow-up 见 §15。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-07-06 02:06:14 -07:00 |
|
lili
|
21186b81b0
|
fix(cheap): 封死 M3 400 流式 tool_calls 聚合炸弹——parallel_tool_calls=False 主防线 + 同 index 异 id 按 id 分桶兜底补丁 (fix400 A/B/C)
根因(前置诊断坐实):agentscope 2.0.2 _parse_stream_response 按 tool_call.index 分桶,
M3 经 new-api 并行 call 不区分 index → 第二 call 的 arguments 拼进首桶(非法 JSON)→
服务端丢 call → tool result 孤儿 → 400 code 2013 → ChatService.run 吞异常 → SSE 无终结 →
driver idle 600s 慢失败。触发开关 = Service get_model 不传 stream(类默认 True)。
A 主防线:driver session parameters 加 parallel_tool_calls=False(经 Parameters 透传,
_call_api 对 API 带 parallel_tool_calls=false,源头禁并行);fake-SSE 契约测试加断言锚。
B 纵深兜底:m3_stream_patch 运行时 monkeypatch(绝不改 venv 本体;钉 agentscope==2.0.2,
升级必须复核):chunk 流 index 重映射——同 index 但携非空且不同 id 按 id 开新桶;聚合完
args 非法 JSON log.warning 带指纹。挂载 build_cheap_app(import agentscope 后)。
单测 6 项:2.0.2 真聚合函数复刻 93001 炸弹指纹对照 + 补丁分桶 + 正常流不回归 +
同 id 复帧同桶 + 坏 args warning 指纹 + apply 幂等。
C 对账:tier2 服务路 anthropic_credential → AnthropicChatModel(stream 同样默认 True),
但其聚合由 content_block_start 显式开桶(_anthropic/_model.py:359-368 赋值建桶,
非 += 隐式拼接),无本炸弹路径;parallel_tool_calls 参数仅 openai_chat/dashscope 有。
tier2 进程内路 build_model stream=False(worker/config.py)不走流式聚合。均不动。
测试:test_m3_stream_patch 6/6 + test_cheap_service_driver/app 19/19 全绿。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
2026-07-02 21:09:44 -07:00 |
|