HKUDS/DeepTutor · error · HTTPException
PageIndex OSS mode must be 'flash', 'standard', or omitted.
Error message
PageIndex OSS mode must be 'flash', 'standard', or omitted.
What it means
Enum-validation guard in POST /knowledge-bases (create): when rag_provider is the PageIndex OSS provider, pageindex_mode must be 'flash', 'standard', or omitted/empty. Any other value is rejected with 400 before the KB is created, since the mode selects an engine-specific parsing profile that has no fallback.
Solutions
- Set pageindex_mode to 'flash' or 'standard'
- Omit pageindex_mode entirely to use the default
- Send the request again with a supported mode value
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at deeptutor/api/routers/knowledge.py:2657 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of HKUDS/DeepTutor@3e82f13042 (2026-08-27).
Data as JSON: /api/errors/c4b49fbb193e86c6.
Report an issue: GitHub.
Appendix: source
Thrown at deeptutor/api/routers/knowledge.py:2657
try:
try:
name = validate_knowledge_base_name(name)
except ValueError as exc:
raise HTTPException(status_code=400, detail=str(exc)) from exc
manager = get_kb_manager()
kb_base_dir = _current_kb_base_dir()
if name in manager.list_knowledge_bases():
raise HTTPException(status_code=400, detail=f"Knowledge base '{name}' already exists")
rag_provider = _validate_registered_provider(rag_provider)
pageindex_mode = str(pageindex_mode or "").strip().lower()
if rag_provider == PAGEINDEX_OSS_PROVIDER and pageindex_mode not in {
"",
"flash",
"standard",
}:
raise HTTPException(
status_code=400,
detail="PageIndex OSS mode must be 'flash', 'standard', or omitted.",
)
_assert_provider_ready(rag_provider)
_enforce_provider_formats(rag_provider, files)
allowed_extensions = FileTypeRouter.get_supported_extensions()
_validate_upload_batch(files, allowed_extensions=allowed_extensions, rel_paths=rel_paths)
logger.info(f"Creating KB: {name} (provider={rag_provider})")
task_id = _build_unique_task_id("kb_init", name)
get_task_stream_manager().ensure_task(task_id)
# Register KB to kb_config.json immediately with "initializing" status
# This ensures the KB appears in the list right away
manager.update_kb_status(
name=name,
status="initializing",
progress={View on GitHub (pinned to 3e82f13042)