#3586656: return tool calls as a flat ToolsFunctionOutput list from EchoProvider

Closes #3586656

EchoProvider::chat() passed a ToolsOutput container to setTools(), while the fixture path in the same method returns ToolsFunctionOutput. Both paths now match. ToolsInterfaceTest asserted the container and is updated.

echoai still returns only the first function, with the tool id hardcoded to test.

Testing:

  1. vendor/bin/phpunit -c web/core/phpunit.xml web/modules/contrib/ai/tests/src/Kernel/OperationType/Chat/Tools/ToolsInterfaceTest.php
  2. Enable ai_test and ai_agents_explorer, configure an agent with a sub agent tool such as ai_agents::ai_agent::taxonomy_agent_config, and run it on echoai from /admin/config/ai/agents/explore. Before this change it fails with Call to undefined method ToolsOutput::getName() in PostRequestEventSubscriber::logAgentPostRequest().
Edited by Giorgio Alfredo Pagano

Merge request reports

Loading