Skip to content

Conversation

pawel-dabro
Copy link
Contributor

@pawel-dabro pawel-dabro commented Aug 29, 2025

Why are these changes needed?

When using streaming with Bedrock client, the tool use response may not contain partialJson increments for tool argument if that argument is empty. In this case an empty string was used as input instead of the input provided in the starting chunk of the tool use block (empty json object). This led to an error during subsequent attempted tool invocation, when an empty string was being parsed as a json.
Note that added Bedrock test cases only run if AWS credentials are present in the environment variables.

Related issue number

Closes #6661

Checks

@pawel-dabro
Copy link
Contributor Author

@microsoft-github-policy-service agree

Copy link

codecov bot commented Aug 31, 2025

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.99%. Comparing base (82df9dd) to head (8bc3834).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../autogen_ext/models/anthropic/_anthropic_client.py 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6979      +/-   ##
==========================================
- Coverage   81.01%   80.99%   -0.02%     
==========================================
  Files         237      237              
  Lines       18182    18186       +4     
==========================================
  Hits        14730    14730              
- Misses       3452     3456       +4     
Flag Coverage Δ
unittests 80.99% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ekzhu ekzhu merged commit 7fbf8ab into microsoft:main Aug 31, 2025
73 of 74 checks passed
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.

Tool use fails when streaming

2 participants