Checks
Strands Version
1.4.0
Python Version
3.13.3
Operating System
macOS 15.5
Installation Method
pip
Steps to Reproduce
- Create agent using Bedrock DeepSeek R1 model and FileSessionManager or S3SessionManager
With FileSessionManager:
from strands import Agent
from strands.models import BedrockModel
from strands.session.file_session_manager import FileSessionManager
bedrock_model = BedrockModel(model_id="us.deepseek.r1-v1:0")
session_manager = FileSessionManager(session_id="test-session")
agent = Agent(model=bedrock_model, session_manager=session_manager)
With S3SessionManager:
from strands import Agent
from strands.models import BedrockModel
from strands.session.s3_session_manager import S3SessionManager
bedrock_model = BedrockModel(model_id="us.deepseek.r1-v1:0")
session_manager = S3SessionManager(session_id="test-session", bucket="test-bucket")
agent = Agent(model=bedrock_model, session_manager=session_manager)
- Send multiple messages and get ValidationException error
Expected Behavior
Should not give error and remember previous messages and continue conversation.
Actual Behavior
Gives error "An error occurred (ValidationException) when calling the ConverseStream operation: User messages cannot contain reasoning content. Please remove the reasoning content and try again."
Additional Context
No response
Possible Solution
I think the FileSessionManager is appending the reasoning generated content as well to the user messages which is leading to this error.
Related Issues
No response