Skip to content

Conversation

@RingoIngo2
Copy link
Contributor

@RingoIngo2 RingoIngo2 commented Jun 26, 2025

Description

strands exposes messages, system_prompt, and tool_configs. Still, one cannot completely reconstruct the converse API request bodies since e.g., the conversation_manager might truncate messages / tool outputs. The one-liner added in this PR will log the request bodies. This is helpful to exactly reconstruct what was sent to the model.

We do this in types.models.model.Model abstract base class such that the logging is effective for all model providers.

Related Issues

N/A

Documentation PR

N/A

Type of Change

Chore: Adding more debug logging

Testing

For testing, we added a unit test (which we think is not really required and we are happy to remove it before merging in a new revision).

  • I ran hatch run prepare

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • [N/A] I have updated the documentation accordingly
  • [N/A] I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@RingoIngo2 RingoIngo2 temporarily deployed to manual-approval June 26, 2025 20:40 — with GitHub Actions Inactive
@zastrowm zastrowm merged commit 91fd7f1 into strands-agents:main Jun 27, 2025
12 checks passed
@zastrowm
Copy link
Member

Thanks - nice improvement 👍

jsamuel1 pushed a commit to jsamuel1/sdk-python that referenced this pull request Jul 9, 2025
dbschmigelski pushed a commit to Ketansuhaas/sdk-python that referenced this pull request Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants