fix: use self-hosted Skyvern API paths and LiteLLM key
Self-hosted API uses /api/v1/tasks (not /v1/run/tasks), returns task_id (not run_id). Pass LITELLM_API_KEY as OPENAI_API_KEY. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -68,12 +68,12 @@ async def execute_skyvern(config: dict, send_text=None, target_room: str = "", *
|
||||
|
||||
async with httpx.AsyncClient(timeout=30.0) as client:
|
||||
resp = await client.post(
|
||||
f"{SKYVERN_BASE_URL}/v1/run/tasks",
|
||||
f"{SKYVERN_BASE_URL}/api/v1/tasks",
|
||||
headers=headers,
|
||||
json=payload,
|
||||
)
|
||||
resp.raise_for_status()
|
||||
run_id = resp.json()["run_id"]
|
||||
run_id = resp.json()["task_id"]
|
||||
|
||||
logger.info("Skyvern pipeline task created: %s", run_id)
|
||||
|
||||
@@ -85,7 +85,7 @@ async def execute_skyvern(config: dict, send_text=None, target_room: str = "", *
|
||||
async with httpx.AsyncClient(timeout=15.0) as client:
|
||||
while elapsed < max_poll:
|
||||
resp = await client.get(
|
||||
f"{SKYVERN_BASE_URL}/v1/runs/{run_id}",
|
||||
f"{SKYVERN_BASE_URL}/api/v1/tasks/{run_id}",
|
||||
headers={"x-api-key": SKYVERN_API_KEY},
|
||||
)
|
||||
resp.raise_for_status()
|
||||
|
||||
Reference in New Issue
Block a user