From 7760c6ff3efe01094cf176fbd3d69fc728314270 Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Sun, 4 May 2025 16:04:37 -0700 Subject: [PATCH] fix skyvern_v1 in run task endpoint (#2288) --- skyvern/forge/sdk/routes/agent_protocol.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/skyvern/forge/sdk/routes/agent_protocol.py b/skyvern/forge/sdk/routes/agent_protocol.py index f38f773c..f11a5d34 100644 --- a/skyvern/forge/sdk/routes/agent_protocol.py +++ b/skyvern/forge/sdk/routes/agent_protocol.py @@ -1467,7 +1467,7 @@ async def run_task( analytics.capture("skyvern-oss-run-task", data={"url": run_request.url}) await PermissionCheckerFactory.get_instance().check(current_org, browser_session_id=run_request.browser_session_id) - if run_request.engine in CUA_ENGINES: + if run_request.engine in CUA_ENGINES or run_request.engine == RunEngine.skyvern_v1: # create task v1 # if there's no url, call task generation first to generate the url, data schema if any url = run_request.url @@ -1589,6 +1589,7 @@ async def run_task( publish_workflow=run_request.publish_workflow, ), ) + LOG.error("Invalid agent engine", engine=run_request.engine, organization_id=current_org.organization_id) raise HTTPException(status_code=400, detail=f"Invalid agent engine: {run_request.engine}")