JuliusBrussee/caveman · error · ValueError

artifact_id is required

Error message

artifact_id is required

What it means

Error "artifact_id is required" thrown in JuliusBrussee/caveman.

Source

Thrown at packages/sdk/python/caveman_cloud/core.py:1195

                "x-cave-artifact-source": str(options["source"]),
            },
        )
        if response.get("stored") is False:
            return value
        if response.get("stored") is not True or not isinstance(response.get("artifact_id"), str) or not response["artifact_id"].strip():
            raise RuntimeError("cave artifact response missing artifact_id")
        content_type = options.get("content_type") or "application/json"
        return (
            f"[cave-artifact id={response['artifact_id']} source={options['source']} type={content_type}]\n"
            f"summary: artifact stored.\n"
            f"retrieve: authenticated GET /sdk/v1/artifacts/{response['artifact_id']} or trace.artifacts.get(\"{response['artifact_id']}\").\n"
            f"[/cave-artifact]"
        )

    def get_artifact(self, artifact_id: str) -> Any:
        """Retrieve and JSON-decode one artifact produced by :meth:`page_artifact`."""
        if not isinstance(artifact_id, str) or not artifact_id.strip():
            raise ValueError("artifact_id is required")
        return self._get(f"/sdk/v1/artifacts/{quote(artifact_id, safe='')}")

    @property
    def artifacts(self) -> "_Artifacts":
        """Artifact handle mirroring the TS ``trace.artifacts`` namespace.

        ``trace.artifacts.page(value, options)`` is the mirror-named entry point
        for :meth:`page_artifact`; both hit ``/sdk/v1/artifacts`` with an
        identical wire body.
        """
        return _Artifacts(self)

    def checkpoint(self, messages: list[Any], options: dict[str, Any]) -> dict[str, Any]:
        # `workflow` mirrors the TS SDK body; the gateway's checkpoint.Request
        # carries it (omitempty) so both SDKs send the identical wire.
        return self._request("/sdk/v1/checkpoints", {"messages": messages, "options": options, "workflow": self.workflow})

    def expand(self, source_ref: str) -> dict[str, Any]:

View on GitHub (pinned to 27d5a3981a)

Solutions

  1. Pass a non-empty artifact_id.

When it happens

Trigger: Thrown at packages/sdk/python/caveman_cloud/core.py:1195 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15). Data as JSON: /api/errors/d9608e180dac79e7. Report an issue: GitHub.