{"record":{"id":"189687b56c7321f5","repo":"mem0ai/mem0","slug":"either-host-and-port-or-url-and-api-key-or","errorCode":null,"errorMessage":"Either 'host' and 'port' or 'url' and 'api_key' or 'path' must be provided.","messagePattern":"Either 'host' and 'port' or 'url' and 'api_key' or 'path' must be provided\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"mem0/configs/vector_stores/qdrant.py","lineNumber":36,"sourceCode":"    api_key: Optional[str] = Field(None, description=\"API key for Qdrant server\")\n    https: Optional[bool] = Field(\n        None,\n        description=\"Whether to force HTTPS on or off. Explicit schemes in url take precedence.\",\n    )\n    on_disk: Optional[bool] = Field(False,description=\"Enables persistent storage. Vectors are kept on disk (True) or in memory (False). Does not delete the local database path.\")\n\n    @model_validator(mode=\"before\")\n    @classmethod\n    def check_host_port_or_path(cls, values: Dict[str, Any]) -> Dict[str, Any]:\n        host, port, path, url, api_key = (\n            values.get(\"host\"),\n            values.get(\"port\"),\n            values.get(\"path\"),\n            values.get(\"url\"),\n            values.get(\"api_key\"),\n        )\n        if not path and not (host and port) and not (url and api_key):\n            raise ValueError(\"Either 'host' and 'port' or 'url' and 'api_key' or 'path' must be provided.\")\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)}. Please input only the following fields: {', '.join(allowed_fields)}\"\n            )\n        return values\n\n    model_config = ConfigDict(arbitrary_types_allowed=True)\n","sourceCodeStart":18,"sourceCodeEnd":52,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/mem0/configs/vector_stores/qdrant.py#L18-L52","documentation":"Error \"Either 'host' and 'port' or 'url' and 'api_key' or 'path' must be provided.\" thrown in mem0ai/mem0.","triggerScenarios":"Thrown at mem0/configs/vector_stores/qdrant.py:36 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide either host and port, or url and api_key, or a local path for Qdrant."],"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"}