Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion wallbreaker/dashboard/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down