sdk get_run bug fix (#2139)

This commit is contained in:
Shuchang Zheng
2025-04-12 19:17:24 -07:00
committed by GitHub
parent 83e8a3c0af
commit e8efcc0bd7

View File

@@ -81,7 +81,7 @@ class SkyvernClient:
run_id: str,
) -> RunResponse:
run_obj = await self.client.agent.get_run(run_id=run_id)
if run_obj.run_type in [RunType.task_v1, RunType.task_v2]:
if run_obj.run_type in [RunType.task_v1, RunType.task_v2, RunType.openai_cua]:
return TaskRunResponse.model_validate(run_obj.dict())
elif run_obj.run_type == RunType.workflow_run:
return WorkflowRunResponse.model_validate(run_obj.dict())