From 905f63dc2f87949ec4f15f299a7a8cd605cd9475 Mon Sep 17 00:00:00 2001 From: hongye <60014362@kans.cn> Date: Mon, 1 Jun 2026 17:45:31 +0800 Subject: [PATCH] fix(acp): pass fallback_providers to AIAgent in editor integrations (#18452) The ACP adapter's _make_agent() was not passing fallback_model to AIAgent(), so model failover was completely broken in editor integrations (VS Code, JetBrains, Obsidian, Zed). The CLI and gateway entry points both pass fallback_model correctly; this brings ACP in line with them. Co-Authored-By: Claude Opus 4.8 --- acp_adapter/session.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/acp_adapter/session.py b/acp_adapter/session.py index c40553f267268..e2a576c9d7693 100644 --- a/acp_adapter/session.py +++ b/acp_adapter/session.py @@ -603,6 +603,11 @@ def _make_agent( "session_id": session_id, "session_db": self._get_db(), "model": model or default_model, + "fallback_model": ( + (model_cfg.get("fallback_providers") or model_cfg.get("fallback_model")) + if isinstance(model_cfg, dict) + else None + ), } try: