{"record":{"id":"32ba29604503bea5","repo":"windmill-labs/windmill","slug":"cache-point-type-is-required","errorCode":null,"errorMessage":"cache point type is required","messagePattern":"cache point type is required","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/windmill-ai/src/ai_bedrock.rs","lineNumber":129,"sourceCode":"\n/// Claude 4.6 and later are published under several id spellings for the same\n/// model (`anthropic.claude-sonnet-4-6`, `...-4-6-v1`, `...-4-6-v1:0`), so they\n/// are matched by family prefix rather than by exact id.\nconst BEDROCK_PROMPT_CACHING_SUPPORTED_MODEL_PREFIXES: &[&str] = &[\n    \"anthropic.claude-fable-5\",\n    \"anthropic.claude-opus-4-6\",\n    \"anthropic.claude-opus-4-7\",\n    \"anthropic.claude-opus-4-8\",\n    \"anthropic.claude-opus-5\",\n    \"anthropic.claude-sonnet-4-6\",\n    \"anthropic.claude-sonnet-5\",\n];\n\nfn build_default_cache_point() -> aws_sdk_bedrockruntime::types::CachePointBlock {\n    aws_sdk_bedrockruntime::types::CachePointBlock::builder()\n        .r#type(aws_sdk_bedrockruntime::types::CachePointType::Default)\n        .build()\n        .expect(\"cache point type is required\")\n}\n\nfn normalize_bedrock_model_id(model: &str) -> String {\n    let model = model\n        .rsplit('/')\n        .next()\n        .unwrap_or(model)\n        .to_ascii_lowercase();\n\n    for prefix in [\"global.\", \"us.\", \"eu.\", \"apac.\", \"au.\"] {\n        if let Some(normalized_model) = model.strip_prefix(prefix) {\n            return normalized_model.to_string();\n        }\n    }\n\n    model\n}\n","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/backend/windmill-ai/src/ai_bedrock.rs#L111-L147","documentation":"Builder guard in build_default_cache_point: constructing an aws_sdk_bedrockruntime CachePointBlock requires a CachePointType, and the default builder attempted to build one without it. It fires when appending prompt-cache breakpoints for a Claude model family that supports caching (matched by BEDROCK_PROMPT_CACHING_SUPPORTED_MODEL_PREFIXES) but no explicit type was set.","triggerScenarios":"Thrown at backend/windmill-ai/src/ai_bedrock.rs:129 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the cache point type explicitly (typically the default/incremental type) when building the CachePointBlock","Ensure the AWS SDK version in use supports CachePointBlock types for the model family","Disable prompt caching for models where the type cannot be resolved"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}