generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 499
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Checks
- I have updated to the lastest minor and patch version of Strands
- I have checked the documentation and this is not expected behavior
- I have searched ./issues and there are no duplicates of my issue
Strands Version
1.16.0
Python Version
3.10.17
Operating System
macOS 15.6.1
Installation Method
pip
Steps to Reproduce
#1089 introduced differences to how types are interpreted for ToolSpecs. In nova-act, we have a few tools which are implemented via strands and which have typing.Literal argument types. See, specifically:
- https://github.com/aws/nova-act/blob/9ea9851401bf5ee8223875f29fc17e3eb87d522f/src/nova_act/tools/browser/interface/browser.py#L75-L79
- https://github.com/aws/nova-act/blob/9ea9851401bf5ee8223875f29fc17e3eb87d522f/src/nova_act/tools/browser/interface/types/click_types.py#L21
Following release of strands v1.16.0, users started seeing failures as follows:
pydantic.errors.PydanticUserError: `Agent_clickTool` is not fully defined;
you should define `ClickType`, then call `Agent_clickTool.model_rebuild()`.
We were able to resolve the issue by either fixing the strands version to <=1.14.0 or by setting pydantic to <=pydantic==2.11.10.
However, it would be better if Strands support newer Pydantic versions.
See: aws/nova-act#79 for full information.
Expected Behavior
@tool works when passing a typing.Literal type and having Pydantic 2.12.0 installed
Actual Behavior
pydantic.errors.PydanticUserError: `Agent_clickTool` is not fully defined;
you should define `ClickType`, then call `Agent_clickTool.model_rebuild()`.
Additional Context
No response
Possible Solution
No response
Related Issues
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working