fix(dashboard): accept plain dict in agent_run for V2 executions - #32
Open
petarkrvavac wants to merge 1 commit into
Open
fix(dashboard): accept plain dict in agent_run for V2 executions#32petarkrvavac wants to merge 1 commit into
petarkrvavac wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Starting an autonomous agent run from the V2 dashboard failed immediately with:
AttributeError: 'dict' object has no attribute 'model_dump'The direct
POST /api/agent/runroute worked, but V2 executions failed before the first agent round.Root cause
agent_run()assumed thatbodywas always a PydanticAgentRunRequestand unconditionally called:body.model_dump(exclude_defaults=True)That is true for the direct FastAPI route, where the request body is validated into
AgentRunRequest.The V2 execution engine uses a different path:
_agent_execution()callsagent_run(args)with a plaindict, which does not provide.model_dump().Fix
Normalize the body at the start of
agent_run():model_dump(exclude_defaults=True)when availabledictThis keeps the direct route behavior unchanged while allowing V2 executions to use the same handler safely.
Verification
POST /api/agent/runbehavior remains unchangedmodel_dump()python -m py_compile wallbreaker/dashboard/server.pysucceeds