fix: convert Union[Pydantic, Pydantic] tool args at runtime
FunctionTool._preprocess_args only converted dict args to a Pydantic model for single-model and Optional[Model] annotations. A Union[ModelA, ModelB] parameter was left as a raw dict, so isinstance checks inside the tool failed with "Unexpected entity type: <class 'dict'>" Use pydantic.TypeAdapter to validate against the full Union so pydantic picks the matching member. None and instances of any declared union member pass through unchanged; instances of unrelated BaseModels fall back to the existing graceful-failure warning path. Close #5799 Change-Id: Ie69f8efc8395162eac375a0eaad0c77ed2097cec
G
George Weale committed
104edc83170a5871075285b336d19ac9515c1a90
Parent: b3d0759