We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed53c69 commit 4c303d1Copy full SHA for 4c303d1
vertexai/_genai/_agent_engines_utils.py
@@ -590,6 +590,11 @@ def _is_pydantic_serializable(param: inspect.Parameter) -> bool:
590
if param.annotation == inspect.Parameter.empty:
591
return True
592
593
+ # Forward references can't be resolved by Pydantic if the type is not
594
+ # available at runtime (e.g. inside `if TYPE_CHECKING:`).
595
+ if "ForwardRef" in repr(param.annotation):
596
+ return False
597
+
598
if isinstance(param.annotation, str):
599
return False
600
0 commit comments