{"record":{"id":"33f21de2aad0fc65","repo":"JuliusBrussee/caveman","slug":"bedrock-endpoint-must-be-runtime-or-mantle","errorCode":null,"errorMessage":"bedrock endpoint must be runtime or mantle","messagePattern":"bedrock endpoint must be runtime or mantle","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/sdk/typescript/src/index.ts","lineNumber":416,"sourceCode":"\n  anthropic(config: { upstreamKey?: string } = {}) {\n    return providerClient(this, \"anthropic\", \"/anthropic\", config.upstreamKey);\n  }\n\n  gemini(config: { upstreamKey?: string } = {}) {\n    return providerClient(this, \"gemini\", \"/gemini\", config.upstreamKey);\n  }\n\n  /**\n   * Describe the first-party Bedrock gateway surface for an AWS SDK or agent\n   * wrapper. Runtime is the default; Mantle remains an explicit opt-in lane.\n   *\n   * This descriptor performs no network request and carries no AWS secret.\n   */\n  bedrock(config: { region: string; endpoint?: \"runtime\" | \"mantle\" }) {\n    const endpoint = config.endpoint ?? \"runtime\";\n    if (endpoint !== \"runtime\" && endpoint !== \"mantle\") {\n      throw new Error(\"bedrock endpoint must be runtime or mantle\");\n    }\n    return {\n      region: config.region,\n      endpoint,\n      gatewayPrefix: endpoint === \"mantle\" ? \"/bedrock/anthropic\" : \"/bedrock\",\n      instrumented: true,\n      sdkOnly: false,\n    };\n  }\n\n  /**\n   * Vertex AI client proxied through the gateway (`/vertex` prefix). Routes\n   * Google Gemini and Anthropic Claude calls through Caveman for metering.\n   *\n   * `upstreamKey` is a Google OAuth2 access token (e.g. from\n   * `gcloud auth print-access-token` or Application Default Credentials); the\n   * gateway forwards it as `Authorization: Bearer …`. Use the returned client's\n   * `raw` fetch for native Vertex paths","sourceCodeStart":398,"sourceCodeEnd":434,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/packages/sdk/typescript/src/index.ts#L398-L434","documentation":"Error \"bedrock endpoint must be runtime or mantle\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at packages/sdk/typescript/src/index.ts:416 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"}