{"record":{"id":"433bf02d2b4083f1","repo":"mem0ai/mem0","slug":"host-must-be-provided-for-opensearch","errorCode":null,"errorMessage":"Host must be provided for OpenSearch","messagePattern":"Host must be provided for OpenSearch","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"mem0/configs/vector_stores/opensearch.py","lineNumber":33,"sourceCode":"    use_ssl: bool = Field(False, description=\"Use SSL for connection (default False for OpenSearch)\")\n    http_auth: Optional[object] = Field(None, description=\"HTTP authentication method / AWS SigV4\")\n    connection_class: Optional[Union[str, Type]] = Field(\n        \"RequestsHttpConnection\", description=\"Connection class for OpenSearch\"\n    )\n    pool_maxsize: int = Field(20, description=\"Maximum number of connections in the pool\")\n    auto_refresh: bool = Field(\n        False,\n        description=\"Automatically refresh index after insert operations to make documents \"\n        \"immediately searchable. Disabled by default for OpenSearch Serverless compatibility. \"\n        \"OpenSearch automatically refreshes indices every ~1 second, so most users don't need this.\",\n    )\n\n    @model_validator(mode=\"before\")\n    @classmethod\n    def validate_auth(cls, values: Dict[str, Any]) -> Dict[str, Any]:\n        # Check if host is provided\n        if not values.get(\"host\"):\n            raise ValueError(\"Host must be provided for OpenSearch\")\n\n        return values\n\n    @model_validator(mode=\"before\")\n    @classmethod\n    def validate_extra_fields(cls, values: Dict[str, Any]) -> Dict[str, Any]:\n        allowed_fields = set(cls.model_fields.keys())\n        input_fields = set(values.keys())\n        extra_fields = input_fields - allowed_fields\n        if extra_fields:\n            raise ValueError(\n                f\"Extra fields not allowed: {', '.join(extra_fields)}. Allowed fields: {', '.join(allowed_fields)}\"\n            )\n        return values\n\n    model_config = ConfigDict(arbitrary_types_allowed=True)\n","sourceCodeStart":15,"sourceCodeEnd":50,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/mem0/configs/vector_stores/opensearch.py#L15-L50","documentation":"Error \"Host must be provided for OpenSearch\" thrown in mem0ai/mem0.","triggerScenarios":"Thrown at mem0/configs/vector_stores/opensearch.py:33 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set host in the OpenSearch config (and port, user, password as needed)."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"001c235229be8795e3834520467bd0d661ed8f34","analyzedAt":"2026-08-15T01:55:42.685Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}