SearchApiAiSearchBackend should ask configured VDB provider to supply dependencies

Created on 25 August 2025, 8 days ago

Problem/Motivation

I am going to add this as a bug report because of the presence of NewServerEventSubscriber::onConfigSave.

The VDB provider mechanism should implement a robust system of dependency calculations so that Search API implementations etc. can properly calculate dependencies that VDB provider plugins depend on. For example, when synchronizing a Search API Server configuration entity, its vital that the configured vdb provider plugin has all of its configuration dependencies resolved first.

An example of this is the OpenSearch connector. Client settings are stored in a separate configuration object maintained by the provider module. When the Search API server backed by the OpenSearch VDB plugin is imported for the first time, the NewServerEventSubscriber::onConfigSave method fires off and attempts to create the associated collection, but it can't because the connector settings configuration entity for OpenSearch hasn't been imported yet, so a PHP fatal error occurs. If the Search API server properly depended on the OpenSearch settings configuration entity then it would have worked as expected.

In any event, ideally the SearchApiAiSearchBackend would collect the dependencies from the configured VDB provider plugin and then merge those dependencies into its own. The Search API Server configuration entity already checks for backend plugin dependencies, so it should just work once the SearchApiAiSearchBackend plugin implements dependency calculation.

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

Please provide information like AI modules enabled, which AI provider, browser, etc.

Proposed resolution

Implement dependency calculation for the SearchApiAiSearchBackend plugin which in turn will gather dependencies from the configured VDB provider.

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

Probably should an an update hook which will iterate over all Search API servers that use the VDB backend provider and re-save the server configuration (which will trigger dependency calculation and modify active configuration accordingly).

πŸ› Bug report
Status

Active

Version

1.2

Component

...to be triaged

Created by

πŸ‡ΊπŸ‡ΈUnited States lpeabody

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