HKUDS/DeepTutor · error · RuntimeError
PageIndex OSS indexing needs an API-key or local LLM profile
Error message
PageIndex OSS indexing needs an API-key or local LLM profile; the active OAuth-only provider cannot be used.
What it means
PageIndex OSS indexing requires an API-key or local LLM profile because the SDK must authenticate programmatically; OAuth-only providers (openai_codex, github_copilot, codebuddy) can't supply a stable API key and are rejected.
Source
Thrown at deeptutor/services/rag/pipelines/pageindex/client.py:56
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)
prefix = {
"anthropic": "anthropic",
"azure_openai": "azure",
"openai_compat": "openai",
}.get(spec.backend)
if prefix is None:
raise RuntimeError("The active LLM transport is not supported by PageIndex OSS indexing.")
sdk_model = _prefixed_model(prefix, resolved_model)
backend: dict[str, Any] = {}
api_key = str(getattr(cfg, "api_key", "") or "").strip()
base_url = str(getattr(cfg, "base_url", "") or "").strip()
api_version = str(getattr(cfg, "api_version", "") or "").strip()View on GitHub (pinned to 3e82f13042)
Solutions
- Switch the active LLM to an API-key provider (e.g., openai with an API key) or a local model (ollama/openai_compat with base_url), then retry.
- If you must keep OAuth for chat, create a separate API-key profile and activate it just for PageIndex OSS indexing.
Example fix
# before # active binding: github_copilot (OAuth) await pageindex_client.local(...) # RuntimeError: OAuth-only provider # after # active binding: openai_compat, api_key=..., base_url=http://localhost:11434/v1, model=llama3 await pageindex_client.local(...)
Defensive patterns
Strategy: validation
Validate before calling
spec = find_by_name(active_binding())
assert not (spec and (spec.is_oauth or spec.backend in {"openai_codex", "github_copilot", "codebuddy"})), \
"OAuth-only providers cannot drive PageIndex OSS" Type guard
def llm_supports_oss_indexing(spec) -> bool:
return not (spec.is_oauth or spec.backend in {"openai_codex", "github_copilot", "codebuddy"}) Try / catch
try:
cfg = resolve_oss_sdk_config()
except RuntimeError as e:
if "OAuth-only" in str(e):
switch_active_llm("openai_compat", api_key=os.environ["LOCAL_LLM_KEY"])
cfg = resolve_oss_sdk_config()
else:
raise Prevention
- Keep a dedicated API-key profile for indexing automation.
- Don't rely on interactive OAuth tokens for headless ingestion.
- Document provider requirements for PageIndex OSS in onboarding.
When it happens
Trigger: resolve_oss_sdk_config runs with an active binding whose spec is OAuth-only (is_oauth true) or whose backend is in {openai_codex, github_copilot, codebuddy}, regardless of model being set.
Common situations: User signed in via Copilot/Codex OAuth in the UI and then attempts OSS indexing; defaults pointing at an OAuth provider after a provider catalog change.
Related errors
- Anthropic API key is missing from the active LLM profile.
- Cohere API key is missing from the active LLM profile.
- OpenAI API key is not configured. Set it in Settings > Catal
- PageIndex OSS needs an active LLM. Configure one under Setti
- The active LLM transport is not supported by PageIndex OSS i
AI-assisted analysis of HKUDS/DeepTutor@3e82f13042 (2026-08-27).
Data as JSON: /api/errors/9d0196aeeacc27f3.
Report an issue: GitHub.