SIGN IN SIGN UP

fix: add PEP 604 union syntax in function tool parameters

- Support PEP 604 unions in direct parameter parser.
- Fix a bug where collapsing simple unions (e.g., `Optional[list[T]]`) lost
  nested schema properties (like `items` or `properties`) by replacing the
  parent schema with the collapsed inner schema instead of just copying its
  type.
- Update `test_required_fields_set_in_json_schema_fallback` to use
  `tuple[str, ...]` to ensure the fallback path remains tested.

Change-Id: Idc1cb55e265ba888c03aa923f60d2d4b3d1ae131
S
Spencer Bunch committed
551445e797a7f55670aac2610c33a675c65e5a1d
Parent: cae2337
Committed by George Weale <gweale@google.com> on 6/1/2026, 4:38:16 PM