{"record":{"id":"e1d3bae972bfaef7","repo":"langgenius/dify","slug":"vector-store-type-is-not-configured","errorCode":null,"errorMessage":"Vector store type is not configured.","messagePattern":"Vector store type is not configured\\.","errorType":"exception","errorClass":"ValueError","httpStatus":400,"severity":"error","filePath":"api/controllers/console/datasets/datasets.py","lineNumber":372,"sourceCode":")\n\n\ndef _get_retrieval_methods_by_vector_type(vector_type: str | None, is_mock: bool = False) -> dict[str, list[str]]:\n    \"\"\"\n    Get supported retrieval methods based on vector database type.\n\n    Args:\n        vector_type: Vector database type, can be None\n        is_mock: Whether this is a Mock API, affects MILVUS handling\n\n    Returns:\n        Dictionary containing supported retrieval methods\n\n    Raises:\n        ValueError: If vector_type is None or unsupported\n    \"\"\"\n    if vector_type is None:\n        raise ValueError(\"Vector store type is not configured.\")\n\n    # Define vector database types that only support semantic search\n    semantic_only_types = {\n        VectorType.RELYT,\n        VectorType.CHROMA,\n        VectorType.PGVECTO_RS,\n        VectorType.VIKINGDB,\n        VectorType.UPSTASH,\n    }\n\n    # Define vector database types that support all retrieval methods\n    full_search_types = {\n        VectorType.QDRANT,\n        VectorType.WEAVIATE,\n        VectorType.OPENSEARCH,\n        VectorType.ANALYTICDB,\n        VectorType.MYSCALE,\n        VectorType.ORACLE,","sourceCodeStart":354,"sourceCodeEnd":390,"githubUrl":"https://github.com/langgenius/dify/blob/ef8544b173fd6cd7a8e71df2cab576e52bebbfbc/api/controllers/console/datasets/datasets.py#L354-L390","documentation":"ValueError raised by the retrieval-methods helper (used to advertise supported search modes) when vector_type is None. The vector store type comes from dify_config.VECTOR_STORE; a None means the deployment never configured a vector database, so retrieval capabilities cannot be determined.","triggerScenarios":"Any code path (e.g., GET /datasets retrieving supported retrieval methods, or dataset creation/validation flows) calling the helper while dify_config.VECTOR_STORE is unset/None. Typically surfaces when the environment lacks VECTOR_STORE configuration.","commonSituations":"Fresh deployment missing VECTOR_STORE in .env / docker env; misconfigured config parser returning None; test environment that did not set the variable.","solutions":["Set VECTOR_STORE in the environment (e.g., VECTOR_STORE=weaviate, qdrant, milvus, pgvector) and restart.","Verify the value loads: check dify_config.VECTOR_STORE at runtime in a shell.","For Docker, ensure docker/.env or the matching docker/envs/*.env.example defines VECTOR_STORE."],"exampleFix":"# before\n# .env (VECTOR_STORE missing)\n# after\nVECTOR_STORE=weaviate","handlingStrategy":"validation","validationCode":"from configs import dify_config\n\ndef vector_store_configured() -> bool:\n    return getattr(dify_config, \"VECTOR_STORE\", None) is not None","typeGuard":"def has_vector_store(cfg) -> bool:\n    return getattr(cfg, \"VECTOR_STORE\", None) not in (None, \"\")","tryCatchPattern":null,"preventionTips":["Set VECTOR_STORE in the deployment environment before first run.","Add a startup config check that fails fast with a clear message if VECTOR_STORE is unset.","Include VECTOR_STORE in deployment smoke tests."],"tags":["vector-store","config","rag","value-error","deployment"],"backgroundTag":null,"analyzedSha":"ef8544b173fd6cd7a8e71df2cab576e52bebbfbc","analyzedAt":"2026-08-12T05:15:17.394Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}