{"record":{"id":"2d8faa8ee6bab1b9","repo":"HKUDS/DeepTutor","slug":"no-active-embedding-model-with-a-known-dimension","errorCode":null,"errorMessage":"No active embedding model with a known dimension. Configure one under Settings → Catalog before creating a GraphRAG knowledge base.","messagePattern":"No active embedding model with a known dimension\\. Configure one under Settings → Catalog before creating a GraphRAG knowledge base\\.","errorType":"exception","errorClass":"GraphRagNotConfiguredError","httpStatus":null,"severity":"error","filePath":"deeptutor/services/rag/pipelines/graphrag/config.py","lineNumber":269,"sourceCode":"        from deeptutor.services.embedding import get_embedding_config\n\n        embedding_cfg = get_embedding_config()\n\n    chat_model = getattr(llm_cfg, \"model\", None)\n    embed_model = getattr(embedding_cfg, \"model\", None)\n    embed_dim = int(getattr(embedding_cfg, \"dim\", 0) or 0)\n    if not chat_model:\n        raise GraphRagNotConfiguredError(\n            \"No active chat model. Configure one under Settings → Catalog before \"\n            \"creating a GraphRAG knowledge base.\"\n        )\n    if not embed_model:\n        raise GraphRagNotConfiguredError(\n            \"No active embedding model. Configure one under Settings → Catalog \"\n            \"before creating a GraphRAG knowledge base.\"\n        )\n    if not embed_dim:\n        raise GraphRagNotConfiguredError(\n            \"No active embedding model with a known dimension. Configure one under \"\n            \"Settings → Catalog before creating a GraphRAG knowledge base.\"\n        )\n\n    embedding_binding = str(getattr(embedding_cfg, \"binding\", \"\") or \"\")\n    llm_base = getattr(llm_cfg, \"effective_url\", None) or getattr(llm_cfg, \"base_url\", None)\n    embed_endpoint = getattr(embedding_cfg, \"effective_url\", None) or getattr(\n        embedding_cfg, \"base_url\", None\n    )\n    ensure_graphrag_embedding_transport(embedding_binding, embed_endpoint)\n    embed_base = graphrag_embedding_api_base(embedding_binding, embed_endpoint)\n\n    return {\n        \"completion_models\": {\n            COMPLETION_MODEL_ID: _completion_model_entry(llm_cfg, api_base=llm_base),\n        },\n        \"embedding_models\": {\n            EMBEDDING_MODEL_ID: _embedding_model_entry(","sourceCodeStart":251,"sourceCodeEnd":287,"githubUrl":"https://github.com/HKUDS/DeepTutor/blob/3e82f130422a813cdd73c10b21a44e9325f5821a/deeptutor/services/rag/pipelines/graphrag/config.py#L251-L287","documentation":"GraphRagNotConfiguredError from build_settings: an embedding model is active but its dimension (embedding_cfg.dim) is 0/unknown. GraphRAG must know the vector dimension up front to size its vector stores.","triggerScenarios":"An embedding profile was created without a dim field (custom/OpenAI-compatible endpoint where the dimension wasn't probed or specified), then GraphRAG settings are built.","commonSituations":"Manually edited custom embedding profiles missing dimensions; new/unknown embedding models without metadata; profiles migrated from older versions that didn't track dim.","solutions":["Set the embedding dimension explicitly in the embedding profile settings (e.g. 1536 for text-embedding-3-small).","Re-select the model from the catalog so its known dimension is populated.","Verify with get_embedding_config().dim > 0 before triggering GraphRAG indexing."],"exampleFix":"# before\nembedding_cfg.dim = 0\n# after\nembedding_cfg.dim = 1536","handlingStrategy":"validation","validationCode":"if not int(getattr(get_embedding_config(), \"dim\", 0) or 0):\n    raise ConfigError(\"embedding profile needs an explicit dimension\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always populate dim when creating custom embedding profiles."],"tags":["graphrag","embeddings","configuration","vector-dimension"],"backgroundTag":"embedding-dimension-missing","analyzedSha":"3e82f130422a813cdd73c10b21a44e9325f5821a","analyzedAt":"2026-08-27T06:57:25.364Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}