Skip to content

[FEATURE] Amazon Nova tool caching with cachePoint in messages #449

Description

@malte-aws

Problem Statement

I would like strands to cache tool definitions when using Amazon Nova models.
Today Amazon Nova models do not accept prompt cache checkpoints in tools field. However Amazon Nova will cache the tool configuration if there is a cache checkpoint set in the messages payload. Strands should set that cache checkpoint for me when I specify cache_tools so that the tool configuration is cached.

Proposed Solution

When setting cache_tools with BedrockModel and model_id is an Amazon Nova model, i.e.

bedrock_model = BedrockModel(
    model_id="us.amazon.nova-premier-v1:0",
    cache_tools="default"
)

then strands should add a messages { cachePoint: { type: ‘default’ } } before adding the user messages to cache the tool configuration.

Make the following Bedrock API call when cache_tools is set and the model is an Amazon Nova model:

tool_config = { ...}

messages = [
    {
        "role": "user",
        "content": [
            {"text": "You are a helpful AI assistant. Use the tools to solve the users questions."},
            { "cachePoint": { "type": 'default' } },
           .... other messages
        ],
    },
]


response = client.converse(
    modelId=[...],
    messages=messages,
    toolConfig=tool_config
)

Use Case

This is useful to cache long tool definitions.

Alternatives Solutions

No response

Additional Context

No response

Activity

  1. Unshure commented on Jul 16, 2025

    @Unshure
    Member

    Hi @malte-aws, thanks for reaching out!

    I'm hesitant to add the feature to automatically add a cachePoint message to the messages array based on the user setting the cache_tool since the behavior of a cachePoint message caching a tool_specs seems to be an undocumented behavior (I couldnt find it in the docs you shared), and adding a cachePoint message can lead to unexpected behaviors for customers.

    Similar to the sudo-code you shared above, you can pass in a cachePoint message yourself as part of the messages array passed to the agent: https://strandsagents.com/latest/documentation/docs/user-guide/concepts/model-providers/amazon-bedrock/#messages-caching

    Let me know if this helps!

  2. added
    pythonPull requests that update python code
    on May 29, 2026
  3. added
    documentationDocumentation changes, improvements, additions, content updates, site improvements, examples, guides
    and removed on Jun 5, 2026
  4. added theissue type on Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-modelRelated to models or model providersdocumentationDocumentation changes, improvements, additions, content updates, site improvements, examples, guidesenhancementNew feature or requestpythonPull requests that update python code

    Fields

    Language

    Python

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions