HKUDS/DeepTutor · error · RuntimeError
PageIndex OSS needs an active LLM. Configure one under Setti
Error message
PageIndex OSS needs an active LLM. Configure one under Settings → Catalog.
What it means
resolve_oss_sdk_config requires a configured active LLM to drive PageIndex OSS indexing; it reads the active model from config and raises RuntimeError when the model field is empty. The UI path for the fix is Settings → Catalog.
Source
Thrown at deeptutor/services/rag/pipelines/pageindex/client.py:43
return cloud_type(api_key)
def _prefixed_model(prefix: str, model: str) -> str:
return model if model.startswith(f"{prefix}/") else f"{prefix}/{model}"
def resolve_oss_sdk_config() -> tuple[str, dict[str, Any]]:
"""Translate DeepTutor's active LLM into PageIndex's indexing lane."""
from deeptutor.services.config import resolve_llm_runtime_config
cfg = resolve_llm_runtime_config()
model = str(getattr(cfg, "model", "") or "").strip()
binding = str(
getattr(cfg, "binding", None) or getattr(cfg, "provider_name", None) or "openai"
).strip()
spec = find_by_name(binding)
if not model:
raise RuntimeError(
"PageIndex OSS needs an active LLM. Configure one under Settings → Catalog."
)
if (
spec is None
or spec.is_oauth
or spec.backend
in {
"openai_codex",
"github_copilot",
"codebuddy",
}
):
raise RuntimeError(
"PageIndex OSS indexing needs an API-key or local LLM profile; "
"the active OAuth-only provider cannot be used."
)
resolved_model = strip_provider_prefix(model, spec)View on GitHub (pinned to 3e82f13042)
Solutions
- Configure an active LLM under Settings → Catalog (or set the model in the runtime settings JSON), then retry.
- Verify data/user/settings/*.json contains a non-empty model for the active binding; process-env overrides can also set it.
- Check that get_active_llm() returns a cfg whose model attribute is populated in your embedding/indexing script.
Example fix
# before
result = await pageindex_client.local(...) # RuntimeError: needs an active LLM
# after
# settings.json: {"llm": {"binding": "openai", "model": "gpt-4o-mini", ...}}
result = await pageindex_client.local(...) Defensive patterns
Strategy: validation
Validate before calling
cfg = get_active_llm()
if not str(getattr(cfg, "model", "") or "").strip():
raise RuntimeError("configure an active LLM before PageIndex OSS") Type guard
def has_active_llm() -> bool:
cfg = get_active_llm()
return bool(str(getattr(cfg, "model", "") or "").strip()) Try / catch
try:
cfg = resolve_oss_sdk_config()
except RuntimeError as e:
if "active LLM" in str(e):
prompt_user_to_configure_llm() # route to Settings -> Catalog
return
raise Prevention
- Run first-time setup so an active LLM always exists.
- Assert model is non-empty before OSS workflows.
- Back up data/user/settings so resets are recoverable.
When it happens
Trigger: Calling list_pipelines() or starting a local PageIndex OSS flow (_pageindex_oss_preflight) while no active LLM model is set in runtime settings (empty cfg.model).
Common situations: Fresh install with no LLM configured, settings JSON reset or deleted (data/user/settings), or an OAuth flow that never persisted a default model choice.
Related errors
- PageIndex OSS indexing needs an API-key or local LLM profile
- The active LLM transport is not supported by PageIndex OSS i
- Model is required for cloud LLM provider
- Anthropic API key is missing from the active LLM profile.
- Cohere API key is missing from the active LLM profile.
AI-assisted analysis of HKUDS/DeepTutor@3e82f13042 (2026-08-27).
Data as JSON: /api/errors/de06f75fda8da9a4.
Report an issue: GitHub.