shu/fallback to skyvern actions when cua returns no action (#2141)

This commit is contained in:
Shuchang Zheng
2025-04-12 20:55:38 -07:00
committed by GitHub
parent e8efcc0bd7
commit db7f1abeab
5 changed files with 72 additions and 14 deletions

View File

@@ -136,7 +136,7 @@ async def cancel_run(run_id: str, organization_id: str | None = None, api_key: s
detail=f"Run not found {run_id}",
)
if run.task_run_type == RunType.task_v1:
if run.task_run_type in [RunType.task_v1, RunType.openai_cua]:
await cancel_task_v1(run_id, organization_id=organization_id, api_key=api_key)
elif run.task_run_type == RunType.task_v2:
await cancel_task_v2(run_id, organization_id=organization_id)