LLM API key errors
Symptoms: The backend starts but immediately returns401 Unauthorized, Invalid API key, or AuthenticationError when you try to use any feature.
Causes and fixes
- Wrong key: Verify the key by running a test request directly against your provider’s API outside of DeepTutor.
-
Incorrect
LLM_HOST: Every provider has a different base URL. Make sureLLM_HOSTmatches the provider set inLLM_BINDING.Provider LLM_HOSTOpenAI https://api.openai.com/v1Azure OpenAI https://<resource>.openai.azure.com/openai/deployments/<deployment>DeepSeek https://api.deepseek.com/v1Anthropic https://api.anthropic.com/v1Ollama (local) http://localhost:11434/v1 -
LLM_BINDINGmismatch: TheLLM_BINDINGvalue must match the provider you are using (e.g.,openai,anthropic,deepseek,ollama). An incorrect binding causes the client to send requests in the wrong format. -
Key in wrong variable: Confirm the key is in
LLM_API_KEY, notEMBEDDING_API_KEYor another variable.
Embedding model errors
Symptoms: Knowledge base creation fails, or RAG retrieval returns empty results. You may seeConnectionError, EmbeddingError, or similar errors in the terminal.
Common causes
EMBEDDING_HOSTpoints to the wrong endpoint for your provider.EMBEDDING_DIMENSIONdoes not match the actual output dimension of your model. For example,text-embedding-3-smalloutputs 1536 dimensions by default, whiletext-embedding-3-largeoutputs 3072.- You are using an OpenAI-compatible local model (e.g., via Ollama or LM Studio) but
EMBEDDING_BINDINGis set toopenaiinstead ofollamaorlm_studio.
Knowledge base creation failures
Document parsing errors
Symptoms: Uploading a PDF shows an error or the processing stalls in the terminal. Possible causes and fixes- Corrupted or password-protected PDF: DeepTutor cannot parse encrypted PDFs. Remove the password with a PDF tool before uploading.
- Scanned PDF without OCR text layer: The default parser relies on extractable text. Use a PDF that has been OCR-processed, or enable the Docling parser (available in v0.5.2+) which handles scanned documents.
-
MinerU model not downloaded: Question generation’s mimic mode and some parsing pipelines use MinerU, which downloads models from HuggingFace on first use. If you are behind a firewall or running in an offline environment, set
HF_ENDPOINTto a mirror orHF_HUB_OFFLINE=1with a pre-downloaded cache.
File size and count limits
Very large documents (hundreds of pages) or batches of many files can cause the embedding pipeline to time out or exhaust memory. As a workaround:- Split large PDFs into smaller sections before uploading.
- Upload documents in smaller batches rather than all at once.
- Monitor memory usage in the terminal while processing runs.
uvloop.Loop error during numbered items extraction
Symptom:
uvloop by default, which is incompatible with nest_asyncio.
Fix: Run the extraction script directly instead of going through the API:
Docker volume permissions
Symptoms: The container starts but fails to write todata/ with a PermissionError or Operation not permitted.
Cause: The data/ directory on the host may be owned by root or another user, while the process inside the container runs as a different UID.
Fix
docker-compose.yml:
Memory and resource issues during document processing
Symptoms: The process is killed (OOM), the terminal showsMemoryError, or the system becomes unresponsive while building a large knowledge base.
Recommendations
- Building a knowledge base is the most memory-intensive operation. Ensure the host has at least 4 GB of free RAM for typical workloads.
- Reduce the number of documents processed at the same time.
-
If running in Docker, increase the container’s memory limit:
-
For very large corpora, run the knowledge base builder via the CLI to avoid the overhead of the web server:
Search provider not working
Symptoms: Web search returns no results, or the research and solver modules skip web search silently. Common causes and fixes-
SEARCH_API_KEYis not set: Web search is disabled unless you provide a key for your chosen provider. -
Wrong provider selected: The supported values for
SEARCH_PROVIDERareperplexity,tavily,serper,jina, andexa. An unrecognized value disables web search. -
Global web search switch is off: The
tools.web_search.enabledflag inconfig/main.yamlis a global override. If it is set tofalse, web search is disabled regardless of your API key. - Firewall blocking outbound requests: Verify that the backend can reach the search provider’s API from the host machine.
Chinese language support
DeepTutor has full Chinese language support as of v0.6.0. If the UI or outputs are not appearing in Chinese:-
Set the system language in
config/main.yaml: - Ensure your LLM supports Chinese output. Most general-purpose models (GPT-4o, DeepSeek, Claude) do. Smaller or quantized local models may produce lower-quality Chinese text.
- Restart the backend after changing the language setting.
The
language setting in config/main.yaml controls the language of agent-generated content (prompts, reports, answers). The UI language is determined by your browser’s locale settings.Node.js version compatibility
Symptom: The frontend fails to build with syntax errors or missing module errors. Cause: DeepTutor’s frontend requires Node.js 18 or higher. Older versions do not support the required JavaScript APIs. Diagnostic- conda
- nvm
- Official installer