From a934ba86690f1249f01f8c334bcef09c88d4c8dd Mon Sep 17 00:00:00 2001 From: Petar Date: Mon, 24 Aug 2026 15:32:51 +0200 Subject: [PATCH] fix(dashboard): accept plain dict in agent_run for V2 executions --- wallbreaker/dashboard/server.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wallbreaker/dashboard/server.py b/wallbreaker/dashboard/server.py index 99f7a4d..597f3f3 100644 --- a/wallbreaker/dashboard/server.py +++ b/wallbreaker/dashboard/server.py @@ -1614,7 +1614,13 @@ async def agent_run(body: AgentRunRequest): nonlocal agent_active, agent_control, agent_task from fastapi.responses import StreamingResponse - body = body.model_dump(exclude_defaults=True) + # The direct route hands us a pydantic AgentRunRequest, but the V2 execution + # engine (_agent_execution) calls this with a plain dict. Tolerate both so a + # dict doesn't blow up on .model_dump() (AttributeError). + if hasattr(body, "model_dump"): + body = body.model_dump(exclude_defaults=True) + else: + body = dict(body) if config is None: raise HTTPException(status_code=400, detail="no [target] configured in config.toml")