mem0ai/mem0 · error · ValueError

Either vector or payload must be provided for update

Error message

Either vector or payload must be provided for update

What it means

Error "Either vector or payload must be provided for update" thrown in mem0ai/mem0.

Source

Thrown at mem0/vector_stores/vertex_ai_vector_search.py:350

    ) -> bool:
        """Update a vector and its payload.

        Args:
            vector_id: ID of the vector to update
            vector: Optional new vector values
            payload: Optional new metadata payload

        Returns:
            bool: True if update was successful

        Raises:
            ValueError: If neither vector nor payload is provided
            GoogleAPIError: If the API call fails
        """
        logger.debug("Starting update for vector_id: %s", vector_id)

        if vector is None and payload is None:
            raise ValueError("Either vector or payload must be provided for update")

        # First check if the vector exists
        try:
            existing = self.get(vector_id)
            if existing is None:
                logger.error("Vector ID not found: %s", vector_id)
                return False

            datapoint = self._create_datapoint(
                vector_id=vector_id, vector=vector if vector is not None else [], payload=payload
            )

            logger.debug("Upserting datapoint: %s", datapoint)
            self.index.upsert_datapoints(datapoints=[datapoint])
            logger.debug("Update completed successfully")
            return True

        except google.api_core.exceptions.GoogleAPIError as e:

View on GitHub (pinned to 001c235229)

Solutions

  1. Pass vector and/or payload to update().

When it happens

Trigger: Thrown at mem0/vector_stores/vertex_ai_vector_search.py:350 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of mem0ai/mem0@001c235229 (2026-08-15). Data as JSON: /api/errors/62a277d04a2bb798. Report an issue: GitHub.