{"record":{"id":"819b9d038ae13b29","repo":"JuliusBrussee/caveman","slug":"bedrock-endpoint-must-be-runtime-or-mantle-819b9d","errorCode":null,"errorMessage":"bedrock endpoint must be runtime or mantle","messagePattern":"bedrock endpoint must be runtime or mantle","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"packages/sdk/python/caveman_cloud/core.py","lineNumber":591,"sourceCode":"        )\n\n    def openai(self, upstream_key: str | None = None) -> \"Provider\":\n        return Provider(self, \"/openai/v1\", upstream_key)\n\n    def anthropic(self, upstream_key: str | None = None) -> \"Provider\":\n        return Provider(self, \"/anthropic\", upstream_key)\n\n    def gemini(self, upstream_key: str | None = None) -> \"Provider\":\n        return Provider(self, \"/gemini\", upstream_key)\n\n    def bedrock(self, region: str, *, endpoint: str = \"runtime\") -> dict[str, Any]:\n        \"\"\"Describe the first-party Bedrock gateway surface.\n\n        Runtime is the default. Mantle is an explicit opt-in descriptor. This\n        method performs no network request and carries no AWS secret.\n        \"\"\"\n        if endpoint not in {\"runtime\", \"mantle\"}:\n            raise ValueError(\"bedrock endpoint must be runtime or mantle\")\n        return {\n            \"region\": region,\n            \"endpoint\": endpoint,\n            \"gateway_prefix\": \"/bedrock/anthropic\" if endpoint == \"mantle\" else \"/bedrock\",\n            \"instrumented\": True,\n            \"sdk_only\": False,\n        }\n\n    def vertex(self, upstream_key: str | None = None) -> \"Provider\":\n        \"\"\"Vertex AI client proxied through the gateway (``/vertex`` prefix).\n\n        Routes Google Gemini and Anthropic Claude calls through Caveman for\n        metering. ``upstream_key`` is a Google OAuth2 access token (e.g. from\n        ``gcloud auth print-access-token`` or Application Default Credentials);\n        the gateway forwards it as ``Authorization: Bearer …``. Mirrors the\n        TypeScript ``Cave.vertex``.\n        \"\"\"\n        return Provider(self, \"/vertex\", upstream_key)","sourceCodeStart":573,"sourceCodeEnd":609,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/packages/sdk/python/caveman_cloud/core.py#L573-L609","documentation":"Error \"bedrock endpoint must be runtime or mantle\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at packages/sdk/python/caveman_cloud/core.py:591 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the bedrock endpoint to \"runtime\" or \"mantle\"."],"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"}