generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 465
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Checks
- I have updated to the lastest minor and patch version of Strands
- I have checked the documentation and this is not expected behavior
- I have searched ./issues and there are no duplicates of my issue
Strands Version
1.10.0
Python Version
3.13
Operating System
mac
Installation Method
pip
Steps to Reproduce
Run the following script:
from strands import Agent
from strands.models import BedrockModel
agent = Agent(
messages=[
{
"role": "user",
"content": [
{
"text": "What is the current time in New York."
},
],
},
{
"role": "assistant",
"content": [
{
"toolUse": {
"input": {
"city": "New York",
},
"name": "current_time",
"toolUseId": "t1",
},
},
],
},
{
"role": "user",
"content": [
{
"toolResult": {
"content": [
{
"text": "12:31",
},
],
"status": "success",
"toolUseId": "t1",
},
},
],
},
],
model=BedrockModel(
model_id="us.anthropic.claude-sonnet-4-20250514-v1:0",
max_tokens=5000,
),
)
agent("Please summarize this conversation.")This is the logic that is implemented in SummarizingConversationManger. Executing results in the following exception:
botocore.errorfactory.ValidationException: An error occurred (ValidationException) when calling the ConverseStream operation: The toolConfig field must be defined when using toolUse and toolResult content blocks.Expected Behavior
The messages array is successfully summarized.
Actual Behavior
We instead get the following exception:
botocore.errorfactory.ValidationException: An error occurred (ValidationException) when calling the ConverseStream operation: The toolConfig field must be defined when using toolUse and toolResult content blocks.Additional Context
We can work around this right now by specifying at least one tool and configuring an appropriate system prompt:
from strands import Agent, tool
from strands.agent.conversation_manager import SummarizingConversationManager
@tool
def noop() -> None:
pass
agent = Agent(..., system_prompt="You summarize 'messages'. You do not call tools.", tools=[noop])
conversation_manager = SummarizingConversationManager(..., summarization_agent=agent)Possible Solution
No response
Related Issues
No response
kmukher-amz and dbschmigelski
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working