Allow upcasting to be optional in tools

Created on 1 July 2025, 2 days ago

Problem/Motivation

📌 Create Context upcaster for complex data types Active introduced data type conversion capabilities for tools. Now, various AiDataTypeConverter plugins are available to automatically convert tool parameters to their expected data_type format. For example, Drupal\ai\Plugin\AiDataTypeConverter\EntityConverter can directly provide the full node object to the execute() method of an AI tool (i.e. AiFunctionCall plugin) when a parameter like node:1 is passed.

However, in some cases, this automatic conversion is not needed. The arguments passed to the tool should be used as is. This comment highlights one such scenario. 📌 Remove AiDataTypeConverterPluginManager from Base class and load via trait Active

As suggested here 📌 Remove AiDataTypeConverterPluginManager from Base class and load via trait Active , it would be helpful to provide a way for developers to opt out of this conversion when it's not desired.

Steps to reproduce (required for bugs, but not feature requests)

Proposed resolution

Remaining tasks

Optional: Other details as applicable (e.g., User interface changes, API changes, Data model changes

Feature request
Status

Active

Version

1.2

Component

...to be triaged

Created by

🇮🇳India Akhil Babu Chengannur

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024