github HKUDS/DeepTutor v0.4.0
Release ver0.4.0

latest release: v0.4.1
2 days ago

πŸš€ DeepTutor v0.4.0 Release Notes

Release Date: 2026.01.09

We're excited to announce DeepTutor v0.4.0! This release brings New home page, Expanded provider support for LLM & Embeddings provider, RAG module decoupling, Web improvement, and a bunch of minor improvements.

🚧 Possible Issues: Docker deployment and local LLM/Embeddings setup (Ollama, LM Studio) may still have compatibility issues. We're actively working on improvements. Issues and PRs are welcome! β†’ Open an Issue | Contributing Guide

⚠️ Breaking Changes: Environment Configuration

Environment variable names have been updated. Please update your .env file based on .env.example.

Old Variable New Variable Notes
OPENAI_API_KEY LLM_API_KEY Now provider-agnostic
OPENAI_API_BASE LLM_HOST Renamed for clarity
OPENAI_MODEL LLM_MODEL Renamed for clarity
EMBEDDING_DIM EMBEDDING_DIMENSION Full word naming
(hardcoded) BACKEND_PORT Now configurable in .env (default: 8001)
(hardcoded) FRONTEND_PORT Now configurable in .env (default: 3782)

New required variables:

  • LLM_BINDING β€” Provider type: openai, ollama, azure_openai, anthropic, etc.
  • EMBEDDING_BINDING β€” Provider type: openai, ollama, jina, cohere, etc.

New optional variables:

  • SEARCH_PROVIDER β€” Web search provider: perplexity (default) or baidu
  • BAIDU_API_KEY β€” For Baidu AI Search (η™ΎεΊ¦AI搜紒)
  • NEXT_PUBLIC_API_BASE β€” Frontend API URL for remote/LAN access (e.g., http://192.168.1.100:8001)

πŸ’‘ Remote Access: If accessing DeepTutor from another device on your network, set NEXT_PUBLIC_API_BASE to your server's IP. If not set, defaults to http://localhost:8001 (local machine only).

πŸ“Œ Action Required: Copy .env.example to .env and update your configuration before upgrading.

✨ Highlights

πŸ”Œ Multi-Provider LLM & Embedding Support

Expanded from local-only to a full provider ecosystem:

LLM Providers Embedding Providers
OpenAI, Anthropic, Azure OpenAI OpenAI, Azure OpenAI, Jina AI
Ollama, Ollama Cloud, LM Studio Cohere, Ollama, LM Studio
Groq, OpenRouter, DeepSeek, Gemini HuggingFace (OpenAI-compatible)

New adapter-based architecture in src/services/embedding/adapters/ enables easy addition of new providers.

🧩 RAG Module Decoupling

New RAGService class provides a unified, provider-agnostic interface:

from src.services.rag import RAGService

service = RAGService()  # Uses RAG_PROVIDER env var (default: raganything)
await service.initialize("my_kb", ["doc.pdf"])
result = await service.search("query", "my_kb")

πŸ“Œ Currently supports RAG-Anything (MinerU + LightRAG). More backends coming soon!

πŸŒ™ Dark Mode & UI Overhaul

  • Theme toggle with system preference detection & localStorage persistence
  • Collapsible sidebar with icon-only compact mode
  • Settings page rebuild: Environment variable management with category-based organization
  • Consistent dark mode styling across all pages

βš™οΈ Centralized Configuration

New settings.py using pydantic-settings for unified configuration:

Category Environment Variables
LLM LLM_BINDING, LLM_MODEL, LLM_HOST, LLM_API_KEY
Embedding EMBEDDING_BINDING, EMBEDDING_MODEL, EMBEDDING_HOST, EMBEDDING_API_KEY, EMBEDDING_DIMENSION
RAG RAG_PROVIDER
TTS TTS_MODEL, TTS_URL, TTS_API_KEY, TTS_VOICE
Search PERPLEXITY_API_KEY

Runtime updates via /api/settings/env with automatic .env persistence.

πŸ“¦ What's Changed

Core Infrastructure

  • Added settings.py with pydantic-settings for centralized config management
  • Added src/core/llm_factory.py with unified llm_complete() function
  • Added /api/embedding-providers router for embedding configuration CRUD
  • Added /api/settings/env endpoints for runtime environment management

Services Module Restructure (src/services/)

services/
β”œβ”€β”€ embedding/          # πŸ†• Adapter-based embedding providers
β”‚   β”œβ”€β”€ adapters/       # Provider implementations
β”‚   β”‚   β”œβ”€β”€ base.py, openai_compatible.py, jina.py, cohere.py, ollama.py
β”‚   β”œβ”€β”€ client.py       # Unified embedding client
β”‚   β”œβ”€β”€ provider.py     # Provider manager (singleton)
β”‚   └── provider_config.py  # Multi-provider config persistence
β”œβ”€β”€ llm/                # LLM configuration & client
β”œβ”€β”€ rag/                # πŸ†• Decoupled RAG system
β”‚   β”œβ”€β”€ service.py      # Unified RAGService entry point
β”‚   β”œβ”€β”€ factory.py      # Pipeline factory
β”‚   β”œβ”€β”€ pipelines/      # Backend implementations
β”‚   β”‚   └── raganything.py, lightrag.py, llamaindex.py, academic.py
β”‚   └── components/     # Modular RAG components
β”‚       β”œβ”€β”€ chunkers/   # Text chunking strategies
β”‚       β”œβ”€β”€ parsers/    # Document parsers (PDF, Markdown, Text)
β”‚       β”œβ”€β”€ embedders/  # Embedding wrappers
β”‚       β”œβ”€β”€ indexers/   # Vector & Graph indexers
β”‚       └── retrievers/ # Dense & Hybrid retrieval
β”œβ”€β”€ prompt/             # PromptManager singleton
β”œβ”€β”€ tts/                # TTS configuration
└── setup/              # Initialization utilities

Frontend Updates

  • πŸ†• Added Home page (web/app/page.tsx) with feature overview
  • πŸ†• Rebuilt History page (web/app/history/page.tsx) with improved activity views
  • Added web/lib/theme.ts with theme utilities (initializeTheme(), setTheme())
  • Added web/hooks/useTheme.ts for React theme hook
  • Added web/components/ThemeScript.tsx for SSR theme hydration
  • Added web/components/ChatSessionDetail.tsx for history page
  • Refactored Sidebar.tsx with collapsible mode
  • Rebuilt settings/page.tsx with environment variable management

IdeaGen Improvements

Enhanced 4-stage workflow: Loose Filter β†’ Explore Ideas β†’ Strict Filter β†’ Generate Statement

🐳 Docker

Streamlined single-container deployment:

docker compose up -d
# Exposes: backend (8001), frontend (3782)
# Volumes: ./config (ro), ./data/user, ./data/knowledge_bases

Cloud deployment supported via NEXT_PUBLIC_API_BASE_EXTERNAL.

⬆️ Upgrade

git pull origin main
docker compose build && docker compose up -d

Migration Notes:

  • Rename EMBEDDING_DIM β†’ EMBEDDING_DIMENSION
  • Default RAG provider changed to raganything

What's Changed

🀝 New Contributors

Full Changelog: v0.3.0...v0.4.0

Don't miss a new DeepTutor release

NewReleases is sending notifications on new releases.