Resolved with:
- comment: Optional[Union[str, Literal[""]]] = None,
+ comment: Optional[str] = None,
The problematic pattern was specifically Optional[Union[str, Literal[""]]] which combined Optional with Union with Literal for an empty string and confused the schema generator. The simple Union[str, dict] patterns are standard and should work fine.
When deployed to Agent Engine, it raises:
`do_update_security_alert` functionDeclaration `parameters.comment` schema didn\'t specify the schema type field.