-
Notifications
You must be signed in to change notification settings - Fork 588
fix: capture reasoning content when model returns both reasoning and text in same response #1395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…text in same response Signed-off-by: joel-robin_data <[email protected]>
|
@zastrowm @dbschmigelski @pgrayy Could you please review this PR? Thanks! |
|
Hi, thanks for this, everything looks good to me. I just added some integ tests to make sure we don't break anything in the multi turn case |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
dbschmigelski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this to block merging. This PR and https://github.com/strands-agents/sdk-python/pull/1382/changes seem highly related. We should understand how they relate and if we are tackling the core of the problem with 1395 or if we need to first go deeper
Description
When using Gemini with thinking mode enabled (thinking_config), reasoning content was being lost from the message history. The model returns both reasoning (thinking process) and text content in the same response, but only the text was captured.
This affected observability, tracing, and any downstream processing that relies on the conversation history containing the full model output.
Before:
After:
Related Issues
Fix #1394
Documentation PR
N/A
Type of Change
Bug fix
Testing
How have you tested the change? Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli
hatch run prepareChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.