Form validation missing for Vector Database Provider when creating Search API server with AI Search backend

Created on 21 July 2025, 15 days ago

Problem/Motivation

When attempting to create a Search API server with the AI Search backend, if no Vector Database Providers are installed or configured, the form submission results in a PHP error. Additionally, the server gets created without any Vector DB provider selected, which leads to an invalid configuration.

Although the form currently displays an informational message when no Vector Database Providers are available, there is no form validation to enforce this requirement. As a result, users can inadvertently create an incomplete server configuration, which might cause runtime errors and instability. Attaching screen recording of the error generation.

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

  • Enable the AI Search module.
  • Ensure that no Vector Database Providers are installed or configured (uninstall any if present).
  • Navigate to: /admin/config/search/search-api/add-server.
  • Select Backend as AI Search.
  • Submit the form without selecting any Vector Database Provider.

Proposed resolution

  • Implement form validation to ensure that when the backend is AI Search, at least one Vector Database Provider must be selected.
  • Prevent form submission and server creation if the condition is not met.
  • Display a clear validation error indicating that a Vector Database Provider is required for AI Search backend.

Remaining tasks

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

🐛 Bug report
Status

Active

Version

1.2

Component

AI Search

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