feat: support workflow version specification in workflow and chat APIs (#23188)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
qiaofenlin
2025-08-03 16:27:12 +08:00
committed by GitHub
parent 6d5a7684b4
commit 20f0238aab
20 changed files with 846 additions and 13 deletions

View File

@@ -129,7 +129,10 @@ class WorkflowService:
if not workflow:
return None
if workflow.version == Workflow.VERSION_DRAFT:
raise IsDraftWorkflowError(f"Workflow is draft version, id={workflow_id}")
raise IsDraftWorkflowError(
f"Cannot use draft workflow version. Workflow ID: {workflow_id}. "
f"Please use a published workflow version or leave workflow_id empty."
)
return workflow
def get_published_workflow(self, app_model: App) -> Optional[Workflow]: