run-llama/llama_index · error · ValueError
Cannot initialize from a vector store that does not store te
Error message
Cannot initialize from a vector store that does not store text.
What it means
MultiModalVectorStoreIndex.from_vector_store() reconstructs an index purely from an existing vector store, which requires the store to return the node text itself (stores_text=True). If the store only returns ids/embeddings (stores_text=False, e.g. many stores that rely on a separate docstore), there is no way to rebuild text and image nodes from it alone, so the constructor raises ValueError immediately.
Source
Thrown at llama-index-core/llama_index/core/indices/multi_modal/base.py:212
retriever=self.as_retriever(**kwargs),
multi_modal_llm=llm,
**kwargs,
)
return super().as_chat_engine(chat_mode, llm, **kwargs)
@classmethod
def from_vector_store(
cls,
vector_store: BasePydanticVectorStore,
embed_model: Optional[EmbedType] = None,
# Image-related kwargs
image_vector_store: Optional[BasePydanticVectorStore] = None,
image_embed_model: EmbedType = "clip",
**kwargs: Any,
) -> "MultiModalVectorStoreIndex":
if not vector_store.stores_text:
raise ValueError(
"Cannot initialize from a vector store that does not store text."
)
storage_context = StorageContext.from_defaults(vector_store=vector_store)
return cls(
nodes=[],
storage_context=storage_context,
image_vector_store=image_vector_store,
image_embed_model=image_embed_model,
embed_model=(
resolve_embed_model(
embed_model, callback_manager=kwargs.get("callback_manager")
)
if embed_model
else Settings.embed_model
),
**kwargs,
)View on GitHub (pinned to afd0fef371)
Solutions
- Use a vector store that keeps text (stores_text=True), e.g. most local or metadata-retaining stores.
- Or build the multimodal index with nodes: MultiModalVectorStoreIndex(nodes=..., vector_store=..., image_vector_store=...) so text is ingested rather than reconstructed.
- Check the flag before calling: assert vector_store.stores_text, and pick the construction method accordingly.
Example fix
# before index = MultiModalVectorStoreIndex.from_vector_store(vector_store=my_store) # stores_text=False # after assert my_store.stores_text index = MultiModalVectorStoreIndex.from_vector_store(vector_store=my_store) # or ingest nodes directly: # index = MultiModalVectorStoreIndex(nodes=nodes, vector_store=my_store)
Defensive patterns
Strategy: validation
Validate before calling
assert vector_store.stores_text, (
"from_vector_store requires a text-storing store; "
"build with nodes=... instead"
)
index = MultiModalVectorStoreIndex.from_vector_store(vector_store=vector_store) Type guard
def usable_for_mm_from_vector_store(store) -> bool:
return bool(getattr(store, "stores_text", False)) Try / catch
try:
index = MultiModalVectorStoreIndex.from_vector_store(vector_store=store)
except ValueError as e:
if "does not store text" in str(e):
index = MultiModalVectorStoreIndex(nodes=nodes, vector_store=store)
else:
raise Prevention
- Check vector_store.stores_text before choosing from_vector_store vs node ingestion.
- Keep the same requirement in mind for image_vector_store in multimodal setups.
- Encapsulate index construction so the right path is chosen per store capability.
When it happens
Trigger: Passing a stores_text=False vector store (e.g. some docstore-backed integrations) to MultiModalVectorStoreIndex.from_vector_store(); also note the image store path: image_vector_store has its own stores_text requirement in the surrounding code.
Common situations: Reusing a VectorStoreIndex setup with a docstore-dependent store for multimodal from_vector_store; switching a working single-modal pipeline to MultiModalVectorStoreIndex while keeping the same store; stores whose stores_text flag differs by version.
Related errors
- Unknown retriever mode: {retriever_mode}
- Unknown retriever mode: {retriever_mode}
- Vector store query result should return at least one of node
- llm must start with str 'local' or of type LLM or BaseLangua
- Token limit must be set and greater than 0.
AI-assisted analysis of run-llama/llama_index@afd0fef371 (2026-08-15).
Data as JSON: /api/errors/3c6608dd5494a028.
Report an issue: GitHub.