Support Amazon Nova Multimodal Embeddings in BedrockVectorizer

Aperta
#889 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
aws, python
Ambito
ai, backend

Direzione di ricerca

Start by locating BedrockVectorizer and its tests, then read the Nova embeddings schema linked in the issue for the exact text and image field names. Implement model ID based routing while preserving Titan request bodies and responses, and cover Nova parsing, option overrides, embed_many, and Titan regressions with mocked client tests. Done means the requested API test and updates to the API reference and vectorizers guide are also in place.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

Let BedrockVectorizer call Amazon Nova Multimodal Embeddings for text and image input. Nova uses a different request and response schema from Titan, which is all the vectorizer speaks today.

Nova takes exactly one modality per request, so it cannot support MultimodalInput (#885). The default capability check rejects it.

Current state

  • BedrockVectorizer._serialize_request_body builds Titan's body ({"inputText": ...} or {"inputImage": ...}) and reads response_body["embedding"].
  • The "Attempted to embed image with text model" error depends on the inputImage key being in the body.
  • The vectorizer is sync-only, and the default model is amazon.titan-embed-text-v2:0.

Provider facts (AWS docs, 2026-12-02)

  • Model ID: amazon.nova-2-multimodal-embeddings-v1:0.
  • Request: schemaVersion: "nova-multimodal-embed-v1" and taskType: "SINGLE_EMBEDDING", plus singleEmbeddingParams. That object holds embeddingPurpose (for example GENERIC_INDEX or GENERIC_RETRIEVAL), embeddingDimension, and exactly one of text, image, video or audio.
  • Response: an embeddings array of {embeddingType, embedding} objects. A text or image request returns one entry.
  • Dimensions: 256, 384, 1024 or 3072, with 3072 the default.
  • Limits:
    • inline payload 25 MB after base64 encoding;
    • text 8,192 characters inline;
    • images PNG, JPEG, WEBP or GIF.
  • Input longer than the sync limits needs the async API and S3.
  • The field names inside the text and image objects are not reproduced here. Take them from the schema page.

Design

  • Request routing: choose the request schema from the model ID. Models starting with amazon.nova use the Nova body and response parser, and everything else keeps the Titan path unchanged. Split _serialize_request_body and response parsing into one implementation per schema.
  • Accepted items on Nova: str, PIL.Image.Image and Path to an image, as on Titan.
  • Embedding purpose: add an embedding_purpose constructor argument, defaulting to GENERIC_INDEX, that can be overridden per call so queries can use GENERIC_RETRIEVAL.
  • Dimensions: add an embedding_dimension constructor argument. It sets dims and is fixed for the vectorizer's lifetime.
  • Errors: the image-with-text-model error should work for both schemas. Nova inputs over the sync limits surface the provider error.

Out of scope

  • Video and audio input.
  • The async and segmented embedding APIs, and S3 input.
  • An async client for BedrockVectorizer.
  • MultimodalInput (Nova does not support it).

Definition of done

  • Text and image embedding work on amazon.nova-2-multimodal-embeddings-v1:0, as single items and inside embed_many.
  • Titan request bodies and results are byte-for-byte unchanged.
  • Unit tests: the Nova request body and response parsing against a mocked client, Titan regression tests, embedding_purpose overrides, and embedding_dimension setting dims.
  • An integration test marked as an API test.
  • Docs: the API reference and the vectorizers guide.

References

Lingua principale
Python
Stelle
435
Fork
123
Merge medio
8g 1h
PR unite (30g)
39

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di redis/redis-vl-python

Tutte le issue di redis/redis-vl-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.