{"record":{"id":"9bfce278ff9e20fb","repo":"run-llama/llama_index","slug":"vector-store-must-be-a-basepydanticvectorstore","errorCode":null,"errorMessage":"vector_store must be a BasePydanticVectorStore","messagePattern":"vector_store must be a BasePydanticVectorStore","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"llama-index-core/llama_index/core/memory/memory_blocks/vector.py","lineNumber":70,"sourceCode":"        description=\"Maximum number of messages to include for context when retrieving.\",\n    )\n    format_template: BasePromptTemplate = Field(\n        default=DEFAULT_RETRIEVED_TEXT_TEMPLATE,\n        description=\"Template for formatting the retrieved information.\",\n    )\n    node_postprocessors: List[BaseNodePostprocessor] = Field(\n        default_factory=list,\n        description=\"List of node postprocessors to apply to the retrieved nodes containing messages.\",\n    )\n    query_kwargs: Dict[str, Any] = Field(\n        default_factory=dict,\n        description=\"Additional keyword arguments for the vector store query.\",\n    )\n\n    @field_validator(\"vector_store\", mode=\"before\")\n    def validate_vector_store(cls, v: Any) -> \"BasePydanticVectorStore\":\n        if not isinstance(v, BasePydanticVectorStore):\n            raise ValueError(\"vector_store must be a BasePydanticVectorStore\")\n        if not v.stores_text:\n            raise ValueError(\n                \"vector_store must store text to be used as a retrieval memory block\"\n            )\n\n        return v\n\n    @field_validator(\"format_template\", mode=\"before\")\n    @classmethod\n    def validate_format_template(cls, v: Any) -> \"BasePromptTemplate\":\n        if isinstance(v, str):\n            if \"{{\" in v and \"}}\" in v:\n                v = RichPromptTemplate(v)\n            else:\n                v = PromptTemplate(v)\n\n        return v\n","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/run-llama/llama_index/blob/afd0fef371831f9bda13e5af7167cf4e981278ab/llama-index-core/llama_index/core/memory/memory_blocks/vector.py#L52-L88","documentation":"Error \"vector_store must be a BasePydanticVectorStore\" thrown in run-llama/llama_index.","triggerScenarios":"Thrown at llama-index-core/llama_index/core/memory/memory_blocks/vector.py:70 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass an instance of BasePydanticVectorStore as vector_store.","Wrap or replace the store with a supported vector store integration."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"afd0fef371831f9bda13e5af7167cf4e981278ab","analyzedAt":"2026-08-15T05:42:58.429Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}