mem0ai/mem0 · error · ValueError

Must provide at least one of `connection_params` and `client

Error message

Must provide at least one of `connection_params` and `client`

What it means

Error "Must provide at least one of `connection_params` and `client`" thrown in mem0ai/mem0.

Source

Thrown at mem0/configs/vector_stores/oracledb.py:80

    index_type: Literal["HNSW", "IVF"] = Field("HNSW", description="Optional index type, HNSW or IVF")
    index_name: Optional[str] = Field(None, description="Optional custom name for the vector index")
    index_parameters: Optional[dict] = Field(
        None,
        description="Optional structured CREATE VECTOR INDEX parameters",
    )
    index_accuracy: Optional[int] = Field(None, description="Optional index accuracy")

    @field_validator("distance_metric", "index_type", mode="before")
    @classmethod
    def _normalize_uppercase(cls, value: Any) -> Any:
        return value.upper() if isinstance(value, str) else value

    @model_validator(mode="after")
    def _validate_model(self):
        """Normalise attributes and validate identifiers/metrics."""

        if not self.connection_params and not self.client:
            raise ValueError("Must provide at least one of `connection_params` and `client`")

        if self.index_name is None:
            self.index_name = f"{self.collection_name}_VEC_IDX"

        self.index_name = _quote_identifier(self.index_name)
        self.collection_name = _quote_identifier(self.collection_name)

        if self.index_parameters is not None:
            parameter_model = HnswParams if self.index_type == "HNSW" else IvfParams
            self.index_parameters = parameter_model.model_validate(self.index_parameters).model_dump(
                by_alias=True,
                exclude_none=True,
            )

        if self.index_accuracy is not None:
            if not (0 < self.index_accuracy <= 100):
                raise ValueError("`index_accuracy` must be between 1 and 100")

View on GitHub (pinned to 001c235229)

Solutions

  1. Provide connection_params (user, password, dsn) or pass a pre-configured oracledb client.

When it happens

Trigger: Thrown at mem0/configs/vector_stores/oracledb.py:80 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/0297bf254eb7f691. Report an issue: GitHub.