fix: align agent-builder with longer pack timeouts
All checks were successful
build / build (push) Successful in 27s

This commit is contained in:
robert
2026-05-20 19:41:22 -03:00
parent 4c8cd8ab2f
commit 1411a445e1
6 changed files with 37 additions and 4 deletions

View File

@@ -9,6 +9,7 @@ from dataclasses import dataclass
class Settings:
sandbox_url: str
sandbox_timeout_s: int
deploy_wait_timeout_s: int
litellm_url: str
litellm_key: str
litellm_model: str
@@ -24,7 +25,8 @@ def load_settings() -> Settings:
sandbox_url=os.environ.get(
"SANDBOX_URL", "http://sandbox.sandbox.svc.cluster.local:8000"
),
sandbox_timeout_s=int(os.environ.get("SANDBOX_TIMEOUT_S", "240")),
sandbox_timeout_s=int(os.environ.get("SANDBOX_TIMEOUT_S", "1200")),
deploy_wait_timeout_s=int(os.environ.get("DEPLOY_WAIT_TIMEOUT_S", "900")),
litellm_url=os.environ.get(
"A2A_LITELLM_URL", "http://litellm.llm.svc.cluster.local:4000"
),

View File

@@ -38,7 +38,7 @@ class ToolContext:
async def _wait_for_live_card(
url: str | None,
expected_version: str | None,
timeout_s: float = 180.0,
timeout_s: float = 900.0,
) -> tuple[bool, dict[str, Any]]:
"""Poll ``{url}/.well-known/agent-card`` until ``version`` matches
``expected_version`` or ``timeout_s`` elapses. Returns
@@ -435,7 +435,11 @@ def build_tools(ctx: ToolContext) -> list[Any]:
# so the LLM can verify the input_schema actually matches the
# code it wrote — catches the schema/code skew that causes
# downstream 400s on call_agent.
live, live_card = await _wait_for_live_card(url_, version_)
live, live_card = await _wait_for_live_card(
url_,
version_,
timeout_s=settings.deploy_wait_timeout_s,
)
out: dict[str, Any] = {
"ok": live,
"name": name_,