fix(acp): pass fallback_model chain to ACP sessions - #64868
Conversation
ACP session manager's `_make_agent` built `AIAgent` without the `fallback_model` kwarg, unlike the CLI (`cli.py`) and cron (`scheduler.py`) paths which both wire `get_fallback_chain(config)`. As a result ACP (editor) sessions could never fall back to a backup provider when the primary hit a rate-limit, overload, or connection failure — the configured `fallback_providers`/`fallback_model` chain was silently ignored. Pass `fallback_model=get_fallback_chain(config) or None` to match the other agent-construction paths. Closes NousResearch#64441
Duplicate of #18460 — same code site ( |
SummaryFive of the 11 listed PRs address the ACP fallback defect: #18460, #22200, #36720, #57418, and #64868; their changes range from canonical get_fallback_chain(config) forwarding with tests to incorrect or unsafe variants. The other six concern Discord typing retries, diary skills, attribution cleanup, or Discord regression coverage rather than the reported ACP cause. Related pull requests
Duplicates#18460, #22200, #36720, #57418, and #64868 form the ACP fallback-propagation duplicate cluster, with #57418 already closed in favor of #18460; #22398 and merged #29671 represent the same Discord typing-retry implementation, while #28363 and #28616 overlap in stated daily-diary scope. Suggested consolidationKeep #18460 open with a salvage path: preserve its focused get_fallback_chain(config) wiring and combined-key regression coverage, consistent with both its recorded best-fix designation and COMMENTED keep_open review. Close #22200 as a duplicate of #18460 despite its keep_open verdict because its aggregate diff and or-based semantics are superseded there; close #36720 and #64868 as duplicates of #18460, keep #57418 closed in that chain, and exclude #22398, #26527, #28363, #28616, #29671, and #32761 from this ACP issue complex. Complex graphflowchart TD
classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d
classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937
classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151
classDef best stroke-width:3px,stroke:#b45309
classDef target stroke-width:3px,stroke:#4338ca
I18452(["issue #18452 (open)"])
I64441(["issue #64441 (open)"])
subgraph Dup18460 ["PRs duplicating each other"]
P18460["PR #18460 (open)"]
P22200["PR #22200 (open)"]
P36720["PR #36720 (open)"]
P57418["PR #57418 (closed)"]
P64868["PR #64868 (open)"]
end
P64868 -->|fixes| I18452
P64868 -->|fixes| I64441
class I18452 open
class I64441 open
class P18460 open
class P22200 open
class P36720 open
class P57418 closed
class P64868 open
class P18460 best
class P18460 best
class P64868 target
click I18452 "https://github.com/NousResearch/hermes-agent/issues/18452"
click I64441 "https://github.com/NousResearch/hermes-agent/issues/64441"
click P18460 "https://github.com/NousResearch/hermes-agent/pull/18460"
click P22200 "https://github.com/NousResearch/hermes-agent/pull/22200"
click P36720 "https://github.com/NousResearch/hermes-agent/pull/36720"
click P57418 "https://github.com/NousResearch/hermes-agent/pull/57418"
click P64868 "https://github.com/NousResearch/hermes-agent/pull/64868"
Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed (state tag in the node label). Cross-PR triage: Reviewed 11 pull requests and 2 issues in this complex. Diffs were read for 7 of 11 PRs (rest unavailable); Assessment working set: 35 kB of PR diffs, 21 kB of issue/PR text, 12 kB of discussion (21 comments), 12 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch. |
Problem
ACP (editor) sessions built via
_make_agentconstructedAIAgentwithout thefallback_modelkwarg, unlike the CLI (cli.py) and cron (scheduler.py) paths, which both wireget_fallback_chain(config).As a result, ACP sessions silently ignored the configured
fallback_providers/fallback_modelchain — when the primary provider hit a rate-limit, overload, or connection failure, the session could never fall back to a backup provider.Closes #64441
Fix
Pass
fallback_model=get_fallback_chain(config) or Noneinacp_adapter/session.py_make_agent, matching the other agent-construction paths.Verification
ruff checkon touched files: cleanpython -m py_compile: cleantest_acp_real_agent_gets_fallback_chain_from_config) mirroring the existingtest_acp_real_agent_gets_session_db_for_recallpattern, asserting the fallback chain reachesAIAgent.Checklist