Repository navigation
[1342] 修复 all-in-one 链遇未启用模型时中断链式调度 - #37
Merged
PinkMagicFly merged 2 commits intoNov 25, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
任务上下文
[1342] 修复 all-in-one 链遇未启用模型时中断链式调度。
链中某节点模型已落盘但不在
models/<provider>.json的models白名单内时,resolve-pi-config抛pi-config-error(Model ... is not available for provider ...)。该异常发生在真实请求返回结构化 assistant 之前,调度器只识别stop-reason=error的顺延逻辑捕获不到它,导致整条链直接 error 而不是切换到后续节点。实现摘要
%execute-node在%node-config配置解析边界用catch 'pi-config-error只收敛未启用模型产生的pi-config-error。新增%node-config-failure用pi-alarm-log!写一条节点级[FAIL](错误分类config-error,message 保留原始Model ... is not available for provider ...原因,不记录凭据),再返回stop-reason=error的结构化失败交回%run-chain-turn,由它统一调用%record-and-skip记录故障、清粘性并继续后续节点。未启用节点不产生active_node、不进入真实请求桩,不放宽resolve-pi-config白名单语义。providers.json重复/格式错等全局配置错误抛出的value-error/type-error不在此捕获,维持原有冒泡行为,避免被误当成节点故障顺延、掩盖真正问题,也不会进入 exhausted/recovery 长时间等待。%probe-node-config的全类型catch与空 baseUrl 兜底配置,让pi-config-error冒泡到pi-probe-node的外层catch。%request-exception-failure将pi-config-error单独归类为config-error,其余异常沿用既有error=>exception收敛,保留原始错误文本。[EXHAUSTED]与 recovery 出口。测试
pi-all-in-one-disabled-model-failover-test.scm:active_node缺失、[FAIL]/[EXHAUSTED]日志。providers.json触发value-error,断言整次请求**抛出value-error**而非收敛为节点故障,请求桩不被调用,也不进入 exhausted/recovery。pi-probe-node-test.scm:夹具补全 kimi1 使主探活路径真实可解析;新增用例断言未启用候选探活返回#f、记config-error与原始原因且不进入请求桩。验证
gf fmt --check:OK;gf check:全 OK(源文件均 ≤450 行)。gf test目标套件全 PASS:all-in-one 62、config 81、flow 6、compaction 63。code/tests/e2e/有 5 个用例失败,已在干净 main 上复现,确认为与本任务无关的既有环境问题。遗留
真实本机按任务文档 3.1 手动验收(未启用链首节点、粘性节点、全链未启用、普通显式调用边界),不在本 PR 覆盖范围。