Skip to content
Merged
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
6 changes: 6 additions & 0 deletions src/magentic_ui/teams/orchestrator/_orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,12 @@ async def _orchestrate_step_planning(
cancellation_token=cancellation_token,
)
self._state.in_planning_mode = False
if self._state.plan is None:
# produce final answer if no plan was created
await self._prepare_final_answer(
"No plan was created.", cancellation_token
)
return
await self._orchestrate_step_execution(cancellation_token, first_step=True)

async def _orchestrate_step_execution(
Expand Down
Loading