add workflow_run.script_run and mark ai_fallback_triggered when the script falls back to ai run (#3433)

This commit is contained in:
Shuchang Zheng
2025-09-14 22:53:52 -07:00
committed by GitHub
parent 975376698d
commit 720ebac72c
9 changed files with 74 additions and 2 deletions

View File

@@ -380,6 +380,10 @@ class BlockRunRequest(WorkflowRunRequest):
)
class ScriptRunResponse(BaseModel):
ai_fallback_triggered: bool = False
class BaseRunResponse(BaseModel):
run_id: str = Field(
description="Unique identifier for this run. Run ID starts with `tsk_` for task runs and `wr_` for workflow runs.",
@@ -419,6 +423,10 @@ class BaseRunResponse(BaseModel):
default=None,
description="The maximum number of scrolls for the post action screenshot. When it's None or 0, it takes the current viewpoint screenshot",
)
script_run: ScriptRunResponse | None = Field(
default=None,
description="The script run result",
)
class TaskRunResponse(BaseRunResponse):