Skip to content

Conversation

@pgrayy
Copy link
Member

@pgrayy pgrayy commented Dec 5, 2025

Description

Removing the python 3.11+ features used directly in the bidi subpackage. Specifically I am replacing use of:

  • asyncio.TaskGroup: Used in BidiAgent.run. Replacing with an internally implemented shim of TaskGroup.
  • ExceptionGroup: Used in _async.stop_all. Replacing with a custom RuntimeException.
    • Note, we are replacing an exception that could be propagated up to the user. However, it is unlikely anyone is looking to explicitly catch an ExceptionGroup. More likely, if they are catching unexpected, internal errors, they would do so with Exception. So for all intents and purposes, I would call this a backwards compatible change. Regardless, bidi is experimental.

Note, this is part of a larger effort to have bidi run in Python 3.10 and 3.11. Only the BidiNovaSonicModel provider requires Python 3.12+. The rest of bidi however should be runnable in all other versions of Python that Strands as a whole supports.

Related Issues

#1299

Documentation PR

N/A

Type of Change

Other (please describe): On the way to supporting 3.10 and 3.11 for bidi.

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

  • I ran hatch run prepare
  • I ran hatch run bidi:prepare: Updated some existing unit tests.

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • 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.

@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@pgrayy pgrayy marked this pull request as ready for review December 5, 2025 22:12
zastrowm
zastrowm previously approved these changes Dec 5, 2025
zastrowm
zastrowm previously approved these changes Dec 8, 2025
zastrowm
zastrowm previously approved these changes Dec 9, 2025
Copy link
Contributor

@mkmeral mkmeral left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do it as another step, but can we also update AGENTS.md :)

@pgrayy pgrayy merged commit 60bd291 into strands-agents:main Dec 11, 2025
13 of 14 checks passed
@pgrayy pgrayy deleted the bidi-remove-311-features branch December 11, 2025 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants