[Tracker]
Update Summary: [One-line status update for stakeholders]
Check-in Date: MM/DD/YYYY
Additional Collaborators:
Metadata is used by the AI Tracker. Docs and additional fields here.
[/Tracker]

Problem/Motivation

Gemini is one of the only providers that has file embeddings, outside of AWS Titan. This means that you can index and search using an image and image likeness.

Currently the embedding solution only allows for text, we should add at least images here (and think about other multimodal in the AI module)

Proposed resolution

Add the image input to embeddings.

Target date or deadline

Remaining tasks

AI usage (if applicable)

[ ] AI Assisted Issue
This issue was generated with AI assistance, but was reviewed and refined by the creator.

[ ] AI Assisted Code
This code was mainly generated by a human, with AI autocompleting or parts AI generated, but under full human supervision.

[ ] AI Generated Code
This code was mainly generated by an AI with human guidance, and reviewed, tested, and refined by a human.

[ ] Vibe Coded
This code was generated by an AI and has only been functionally tested.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

marcus_johansson created an issue. See original summary.

a.dmitriiev’s picture

Assigned: Unassigned » a.dmitriiev

a.dmitriiev’s picture

Assigned: a.dmitriiev » Unassigned
Status: Active » Needs review

Embeddings model 001 supports also text + image, but doesn't support image on its own. Embeddings model 2 supports all combinations: text, image and text + image. I have also added the unit tests for this.

jucs7’s picture

Assigned: Unassigned » jucs7
jucs7’s picture

I tested the MR locally using the API Explorer module (Branch from #3586422) against both models. With gemini-embedding-2 the embeddings behave correctly across all three combinations (text, image, text+image) — different inputs produce different vectors as expected.

However, with embedding-001, a text-only request and an image+same text request produce identical embedding vectors, which indicates the image input is not affecting the output.

jucs7’s picture

Assigned: jucs7 » Unassigned
Status: Needs review » Needs work