Rebuild agent-builder on a2a-pack 0.1.51
All checks were successful
build / build (push) Successful in 16s
All checks were successful
build / build (push) Successful in 16s
This commit is contained in:
18
agent.py
18
agent.py
@@ -190,7 +190,7 @@ class AgentBuilder(A2AAgent[BuilderConfig, NoAuth]):
|
||||
if isinstance(out, dict):
|
||||
final_state = out
|
||||
except Exception as exc: # noqa: BLE001
|
||||
return {"error": f"build graph failed: {type(exc).__name__}: {exc}"}
|
||||
return {"error": _build_failure_error(exc)}
|
||||
finally:
|
||||
heartbeat_task.cancel()
|
||||
with suppress(asyncio.CancelledError):
|
||||
@@ -278,4 +278,20 @@ def _find_url(value: Any) -> str | None:
|
||||
m = _URL_RE.search(value)
|
||||
return m.group(0) if m else None
|
||||
return None
|
||||
|
||||
|
||||
def _build_failure_error(exc: BaseException) -> str:
|
||||
message = str(exc)
|
||||
lowered = message.lower()
|
||||
if (
|
||||
"budget has been exceeded" in lowered
|
||||
or "budget exceeded" in lowered
|
||||
or "ratelimiterror" in type(exc).__name__.lower()
|
||||
or "rate limit" in lowered
|
||||
):
|
||||
return (
|
||||
"LLM budget exceeded before deployment; retry with a larger budget "
|
||||
"or a smaller build scope"
|
||||
)
|
||||
return f"build graph failed: {type(exc).__name__}: {exc}"
|
||||
# rebuild against a2a-pack 0.1.47 for manifest-backed meta-agent defaults
|
||||
|
||||
Reference in New Issue
Block a user