Problem/Motivation

ai_provider_universal returns array

Steps to reproduce

when i try to configure search server and i want to use embedings engine configured in ai_provider_universal the dropdown shown "Universal|Array" and this breaks indexing as no valid embedings engine can be configured.

universal|array

CommentFileSizeAuthor
universal_array.png50.79 KBpersuader

Comments

persuader created an issue. See original summary.

leofishman’s picture

Assigned: Unassigned » leofishman

I am working on a fix, will rewrite part of the module so it will not require any patch to ai_core or ai_search, new version with the fix will be released today.
Thanks for reporting and for your patiente

  • leofishman committed 2291fa57 on 1.0.x
    fix: flat model options and dot ID separator so AI core resolves models...
leofishman’s picture

Version: 1.0.0-beta1 » 1.0.0-beta2
Status: Active » Fixed

Thanks for the report, @persuader.

Cause: getConfiguredModels() returned models nested by server (for optgroups). ai_search builds the embeddings dropdown with a flat foreach and concatenates the label, so PHP rendered "Universal | Array".

Fix in 1.0.0-beta2:
- Model options are always a flat model_id => label map (labels like "Server: model").
- Model entity IDs use a dot separator (server.model) so AI core's provider__model parsing and ai_search work without AI core patches.

Upgrade from beta1: drush updb (update 10102 rewrites stored model IDs) then drush cr. Re-open the Search API server form and pick the embeddings engine again if needed.

Release: https://www.drupal.org/project/ai_provider_universal/releases/1.0.0-beta2

Please confirm on beta2 and re-open if anything still fails.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.