{"record":{"id":"124f8cf4ada05c84","repo":"JuliusBrussee/caveman","slug":"assemble-requires-model-and-session-id","errorCode":null,"errorMessage":"assemble requires model and session_id","messagePattern":"assemble requires model and session_id","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"packages/sdk/python/caveman_cloud/core.py","lineNumber":416,"sourceCode":"        \"\"\"A fresh :class:`RetryLoopBreaker` that interrupts a repeated identical\n        tool-call loop after ``threshold`` consecutive repeats.\n        \"\"\"\n        return RetryLoopBreaker(threshold=threshold)\n\n    def assemble(self, options: AssembleOptions) -> AssemblyResult:\n        \"\"\"Build a provider request with stable/session content above volatile.\n\n        Pure client-side: no account and no network call. The hash ledger is\n        in-process and scoped by ``session_id``; deterministic slot content\n        across processes remains the builder's obligation.\n\n        ``emit_cache_hints=\"gateway\"`` (default) emits no provider hint so the\n        gateway optimizer retains attribution. ``\"self\"`` places provider\n        hints for direct calls but mints nothing.\n        \"\"\"\n        provider = options.provider.strip().lower()\n        if not options.model or not options.session_id:\n            raise ValueError(\"assemble requires model and session_id\")\n        if options.emit_cache_hints not in {\"gateway\", \"self\", \"none\"}:\n            raise ValueError(f\"unknown emit_cache_hints value {options.emit_cache_hints!r}\")\n\n        ids: set[str] = set()\n        normalized: list[AssemblySlot] = []\n        for slot in options.slots:\n            if not slot.id or slot.id in ids:\n                raise ValueError(f\"assembly slot id must be non-empty and unique: {slot.id!r}\")\n            ids.add(slot.id)\n            if slot.stability not in {\"stable\", \"session\", \"volatile\"}:\n                raise ValueError(\n                    f\"assembly slot {slot.id!r} has unknown stability {slot.stability!r}\"\n                )\n            try:\n                content_json = _canonical_json(slot.content)\n                content = json.loads(content_json)\n            except (TypeError, ValueError):\n                raise ValueError(","sourceCodeStart":398,"sourceCodeEnd":434,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/packages/sdk/python/caveman_cloud/core.py#L398-L434","documentation":"Error \"assemble requires model and session_id\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at packages/sdk/python/caveman_cloud/core.py:416 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass both model and session_id to assemble."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"27d5a3981a347890211bb1bf2439e5c821a63bc9","analyzedAt":"2026-08-15T09:26:11.751Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}