AI chatbot response limited to 10 items when querying config entities like taxonomy vocabularies

Created on 31 July 2025, 4 days ago

Problem/Motivation

When using the AI chatbot (via Drupal CMS Assistant setup), queries that involve listing or counting configuration entities—such as taxonomy vocabularies—are limited to 10 results, even when more items exist in the system.

This leads to incorrect answers and truncated lists from the chatbot. Attaching screen recording to demonstrate the issue.

Steps to reproduce

  1. Enable the AI Agents module using the Drupal CMS Assistant setup.
  2. Create 11 taxonomy vocabularies.
  3. Ask the chatbot: How many taxonomy vocabularies are there in this website?
  4. Observe the result: the chatbot lists only 10 vocabularies and reports the count as 10.

Proposed resolution

Fix the context-setting logic in the plugin to ensure that a value of 0 for the amount context is not treated as empty.

Currently, when amount is 0, it is mistakenly treated as an empty value and therefore skipped. As a result, the default value 10 is used (as defined in the context field definition), which limits the query output.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.2

Component

Code

Created by

🇮🇳India sijumpk

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024