Skip to content

Conversation

@kevmyung
Copy link

@kevmyung kevmyung commented Jan 6, 2026

  • Remove 'from future import annotations' to fix forward reference issues
  • Use Optional[T] instead of T | None for Pydantic compatibility
  • Remove upper bound on strands-agents version

Issue #, if available:
Fixes #89

Description of changes:
from future import annotations(PEP 563) causes forward reference issues with strands-agents >= 1.16's@tool` decorator when generating Pydantic models.

Error:
PydanticUserError: Agent_clickTool is not fully defined;
you should define ClickType, then call Agent_clickTool.model_rebuild().

Solution

  • Remove from __future__ import annotations to fix forward reference issues
  • Use Optional[T] instead of T | None for Pydantic compatibility
  • Remove upper bound on strands-agents version

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

  - Remove 'from __future__ import annotations' to fix forward reference issues
  - Use Optional[T] instead of T | None for Pydantic compatibility
  - Remove upper bound on strands-agents version

  Fixes aws#89
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.

Relax strands-agents upper bound (currently <=1.14.0)

1 participant