HKUDS/DeepTutor · error · GraphRagNotConfiguredError
No active chat model. Configure one under Settings → Catalog
Error message
No active chat model. Configure one under Settings → Catalog before creating a GraphRAG knowledge base.
What it means
GraphRagNotConfiguredError from build_settings: no active chat model is configured (llm_cfg.model is empty), so GraphRAG settings cannot be generated. GraphRAG requires a chat model for entity extraction and querying.
Source
Thrown at deeptutor/services/rag/pipelines/graphrag/config.py:259
``llm_cfg`` / ``embedding_cfg`` are injectable for tests; in production they
are resolved from DeepTutor's catalog. Raises
:class:`GraphRagNotConfiguredError` if either side has no usable model.
"""
if llm_cfg is None:
from deeptutor.services.config import resolve_llm_runtime_config
llm_cfg = resolve_llm_runtime_config()
if embedding_cfg is None:
from deeptutor.services.embedding import get_embedding_config
embedding_cfg = get_embedding_config()
chat_model = getattr(llm_cfg, "model", None)
embed_model = getattr(embedding_cfg, "model", None)
embed_dim = int(getattr(embedding_cfg, "dim", 0) or 0)
if not chat_model:
raise GraphRagNotConfiguredError(
"No active chat model. Configure one under Settings → Catalog before "
"creating a GraphRAG knowledge base."
)
if not embed_model:
raise GraphRagNotConfiguredError(
"No active embedding model. Configure one under Settings → Catalog "
"before creating a GraphRAG knowledge base."
)
if not embed_dim:
raise GraphRagNotConfiguredError(
"No active embedding model with a known dimension. Configure one under "
"Settings → Catalog before creating a GraphRAG knowledge base."
)
embedding_binding = str(getattr(embedding_cfg, "binding", "") or "")
llm_base = getattr(llm_cfg, "effective_url", None) or getattr(llm_cfg, "base_url", None)
embed_endpoint = getattr(embedding_cfg, "effective_url", None) or getattr(
embedding_cfg, "base_url", NoneView on GitHub (pinned to 3e82f13042)
Solutions
- Open Settings → Catalog and activate a chat model.
- Verify get_llm_config().model is non-empty in the running environment (not a stale .env).
- Restart/retry the GraphRAG KB creation after activation.
Example fix
# before: no active model
# after (Settings → Catalog, or API)
await settings.set_active_chat_model("gpt-4o") Defensive patterns
Strategy: validation
Validate before calling
if not getattr(get_llm_config(), "model", None):
raise ConfigError("activate a chat model first (Settings → Catalog)") Prevention
- Gate GraphRAG KB creation UI on presence of an active chat model.
When it happens
Trigger: Calling write_settings or add_documents for a GraphRAG pipeline before any chat model has been activated in Settings → Catalog.
Common situations: Fresh install with no model selected; active model profile was deleted or its activation cleared; settings JSON reset.
Related errors
- No active embedding model. Configure one under Settings → Ca
- No active embedding model with a known dimension. Configure
- PageIndex OSS needs an active LLM. Configure one under Setti
- GraphRAG is not installed. Run `pip install 'deeptutor[graph
- GraphRAG preflight failed: {failure_details}
AI-assisted analysis of HKUDS/DeepTutor@3e82f13042 (2026-08-27).
Data as JSON: /api/errors/f3a1c4b306174ed6.
Report an issue: GitHub.