{"record":{"id":"496c1d3b2918f159","repo":"langchain-ai/deepagents","slug":"failed-to-list-blueprints-e","errorCode":null,"errorMessage":"Failed to list blueprints: {e}","messagePattern":"Failed to list blueprints: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"libs/partners/runloop/langchain_runloop/provider.py","lineNumber":97,"sourceCode":"        blueprint_name: Blueprint name to resolve or create.\n        dockerfile: Dockerfile used when creating a new blueprint.\n\n    Raises:\n        RuntimeError: If listing or building fails, or a same-name blueprint\n            exists but is not ready.\n    \"\"\"\n    non_ready_status: str | None = None\n    starting_after: str | None = None\n\n    while True:\n        list_kwargs: dict[str, Any] = {\"name\": blueprint_name, \"limit\": 100}\n        if starting_after is not None:\n            list_kwargs[\"starting_after\"] = starting_after\n        try:\n            page = client.blueprints.list(**list_kwargs)\n        except Exception as e:\n            msg = f\"Failed to list blueprints: {e}\"\n            raise RuntimeError(msg) from e\n\n        for blueprint in page.blueprints:\n            if blueprint.name != blueprint_name:\n                continue\n            if blueprint.status == \"build_complete\":\n                return\n            non_ready_status = blueprint.status\n\n        if not page.has_more or not page.blueprints:\n            break\n        starting_after = page.blueprints[-1].id\n\n    if non_ready_status is not None:\n        raise RuntimeError(_not_ready_message(blueprint_name, non_ready_status))\n\n    try:\n        client.blueprints.create_and_await_build_complete(\n            name=blueprint_name,","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/langchain-ai/deepagents/blob/a1af029e6e73cb17c36bff823d227747b28e91e1/libs/partners/runloop/langchain_runloop/provider.py#L79-L115","documentation":"`_ensure_blueprint` lists Runloop blueprints via the SDK client to find one matching the requested name, and wraps any exception from `client.blueprints.list` in a `RuntimeError` with the upstream message chained (`from e`). This converts provider/API failures (auth, network, pagination errors) into a consistent library-level error.","triggerScenarios":"Calling eval/bootstrap code that needs a blueprint when `client.blueprints.list()` raises — e.g. an invalid or expired Runloop API key, network outage, rate limiting, or a malformed `starting_after` pagination cursor.","commonSituations":"Missing or rotated `RUNLOOP_API_KEY`; expired credentials; corporate proxy/firewall blocking api.runloop.ai; transient 5xx or rate-limit responses during CI; a blueprint list page cursor that no longer exists.","solutions":["Read the chained exception (`raise ... from e`) to see the root cause; fix auth if it is 401/403 by setting a valid Runloop API key.","Retry on transient network/5xx errors with backoff; list is idempotent.","Verify network/egress to the Runloop API from your environment (proxy, DNS, firewall).","If a pagination cursor is involved, restart listing from the beginning instead of a stale `starting_after`."],"exampleFix":"// before\nbp = provider._ensure_blueprint(client, \"my-blueprint\")  # opaque RuntimeError on API failure\n\n// after\ntry:\n    bp = provider._ensure_blueprint(client, \"my-blueprint\")\nexcept RuntimeError as e:\n    logger.exception(\"blueprint listing failed: %s\", e.__cause__)\n    if is_transient(e.__cause__):\n        bp = retry_with_backoff(provider._ensure_blueprint, client, \"my-blueprint\")\n    else:\n        raise","handlingStrategy":"retry","validationCode":"import os\nif not os.environ.get(\"RUNLOOP_API_KEY\"):\n    raise RuntimeError(\"RUNLOOP_API_KEY is not set; blueprint listing will fail\")","typeGuard":null,"tryCatchPattern":"try:\n    ensure_blueprint(client, name)\nexcept RuntimeError as e:\n    cause = e.__cause__\n    if is_transient_network_error(cause):\n        ensure_blueprint_with_backoff(client, name)\n    elif is_auth_error(cause):\n        raise ConfigError(\"check RUNLOOP_API_KEY\") from cause\n    else:\n        raise","preventionTips":["Always inspect `e.__cause__` on this RuntimeError for the real API error.","Set and verify RUNLOOP_API_KEY before running blueprint-dependent evals.","Retry with backoff on 429/5xx; restart pagination from scratch on cursor errors.","Test API reachability from CI/network-restricted environments."],"tags":["network","api","blueprint","provider","runloop"],"backgroundTag":"api-list-request-failed","analyzedSha":"a1af029e6e73cb17c36bff823d227747b28e91e1","analyzedAt":"2026-08-29T11:43:24.718Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}