windmill-labs/windmill · error

cache point type is required

Error message

cache point type is required

What it means

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.

Source

Thrown at backend/windmill-ai/src/ai_bedrock.rs:129

/// Claude 4.6 and later are published under several id spellings for the same
/// model (`anthropic.claude-sonnet-4-6`, `...-4-6-v1`, `...-4-6-v1:0`), so they
/// are matched by family prefix rather than by exact id.
const BEDROCK_PROMPT_CACHING_SUPPORTED_MODEL_PREFIXES: &[&str] = &[
    "anthropic.claude-fable-5",
    "anthropic.claude-opus-4-6",
    "anthropic.claude-opus-4-7",
    "anthropic.claude-opus-4-8",
    "anthropic.claude-opus-5",
    "anthropic.claude-sonnet-4-6",
    "anthropic.claude-sonnet-5",
];

fn build_default_cache_point() -> aws_sdk_bedrockruntime::types::CachePointBlock {
    aws_sdk_bedrockruntime::types::CachePointBlock::builder()
        .r#type(aws_sdk_bedrockruntime::types::CachePointType::Default)
        .build()
        .expect("cache point type is required")
}

fn normalize_bedrock_model_id(model: &str) -> String {
    let model = model
        .rsplit('/')
        .next()
        .unwrap_or(model)
        .to_ascii_lowercase();

    for prefix in ["global.", "us.", "eu.", "apac.", "au."] {
        if let Some(normalized_model) = model.strip_prefix(prefix) {
            return normalized_model.to_string();
        }
    }

    model
}

View on GitHub (pinned to e474e8803c)

Solutions

  1. Set the cache point type explicitly (typically the default/incremental type) when building the CachePointBlock
  2. Ensure the AWS SDK version in use supports CachePointBlock types for the model family
  3. Disable prompt caching for models where the type cannot be resolved
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at backend/windmill-ai/src/ai_bedrock.rs:129 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/32ba29604503bea5. Report an issue: GitHub.