From 2b578c3a9e063d9f72a1aaf08d0c8ce040c7507b Mon Sep 17 00:00:00 2001 From: luyao618 <364939526@qq.com> Date: Mon, 27 Apr 2026 21:33:58 +0800 Subject: [PATCH] fix(agents): pass agentDir to media understanding in ACP dispatch path The ACP dispatch path calls applyMediaUnderstanding without the agentDir parameter. This prevents the media understanding pipeline from locating agent-specific models.json and auth profiles, causing image understanding to fail silently for non-visual models configured with a separate image understanding model. The non-ACP reply path (get-reply.ts) already passes agentDir correctly. This aligns the ACP path with the same behavior. Closes #55046 AI-assisted (built with Hermes orchestration). --- src/auto-reply/reply/dispatch-acp.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/auto-reply/reply/dispatch-acp.ts b/src/auto-reply/reply/dispatch-acp.ts index 2ab86fa4138..00cf9f8fa7b 100644 --- a/src/auto-reply/reply/dispatch-acp.ts +++ b/src/auto-reply/reply/dispatch-acp.ts @@ -6,6 +6,7 @@ import { isSessionIdentityPending, resolveSessionIdentityFromMeta, } from "../../acp/runtime/session-identity.js"; +import { resolveAgentDir } from "../../agents/agent-scope.js"; import type { OpenClawConfig } from "../../config/types.openclaw.js"; import type { TtsAutoMode } from "../../config/types.tts.js"; import { logVerbose } from "../../globals.js"; @@ -420,6 +421,7 @@ export async function tryDispatchAcpReply(params: { await applyMediaUnderstanding({ ctx: params.ctx, cfg: params.cfg, + agentDir: resolveAgentDir(params.cfg, acpAgentId), }); } catch (err) { logVerbose(