support passing run_with for run_task endpoint (mostly for task v2) (#4576)

This commit is contained in:
Shuchang Zheng
2026-01-28 20:50:32 -08:00
committed by GitHub
parent 34aadb8c09
commit 69e1ea15cc
3 changed files with 12 additions and 4 deletions

View File

@@ -437,6 +437,11 @@ class TaskRunRequest(BaseModel):
description="The CDP address for the task.",
examples=["http://127.0.0.1:9222", "ws://127.0.0.1:9222/devtools/browser/1234567890"],
)
run_with: str | None = Field(
default=None,
description="Whether to run the task with agent or code.",
examples=["agent", "code"],
)
@field_validator("url", "webhook_url", "totp_url")
@classmethod