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")