Partner QR onboarding (WeChat, WeCom, Feishu) renders its code server-side,
so `qrcode` is the only thing between an operator and a scannable code. It was
reachable only through the `partners` extra, which means the documented first
step — `pip install -e .` — produces a Channels page whose "Scan to connect"
button silently yields nothing: `render_qr_svg` swallows the ImportError and
returns an empty string, and `_qr_data_url` returns None. Neither the UI nor
the logs say a word, so the failure reads as a broken feature rather than a
missing extra.
The package is pure Python, holds no compiled or system dependencies, and every
scan-based channel needs it, so it belongs in the core set — the same call
already made for `mcp` in issue #792.
- pyproject.toml: move `qrcode` from the `partners` extra into core
- requirements/cli.txt: mirror it, since that file images the core deps
- requirements/partners.txt: drop it; it now arrives via `-r server.txt`
- tests: reword the degradation test, which now guards trimmed deployments
rather than the default install
The lazy-import fallback itself is kept on purpose: a build assembled without
the full requirement set must still serve a usable page carrying the raw scan
payload.
* fix(cli): declare standalone runtime dependencies
* style: satisfy ruff format in the packaging metadata test
`ruff format --check .` is a CI gate and wanted the `open("rb")` call on one
line (99 chars). This was the only red check; every test job passed.
---------
Co-authored-by: Frank <bingxizhao@novix.science>
Adds PageIndex OSS as a knowledge-base type and moves PageIndex retrieval from traditional RAG to reasoning-based retrieval: a small workflow-owned agent loop reads the document tree instead of going through the built-in MCP server, which this removes.
The `mcp` client was declared only under the `partners` extra, but the MCP
connection manager and the built-in PageIndex MCP server are core: the manager
overlays a reserved `pageindex` entry onto the config whenever a PageIndex API
key is set, on any turn. A plain `pip install deeptutor` therefore had no `mcp`,
so the connection task raised ModuleNotFoundError, never resolved the caller's
ready future, and every turn stalled for the full 15s connect timeout before
reporting the one cause that was not responsible: "connect timed out after 15s".
Declare `mcp>=1.26.0,<2.0.0` as a core dependency of both published
distributions and drop it from the `partners` extra, which now inherits it.
Mirror the move in requirements/ (cli.txt gains it, partners.txt inherits it
via server.txt).
Also import `mcp` inside `_run_server`'s guarded block rather than above it. At
function scope the import raised before anything could fail `ready`, which is
what turned a permanent, instantly-knowable error into a timeout plus an
orphaned "Task exception was never retrieved". Inside the block the real cause
reaches the caller immediately.
Closes#792
Work in progress carried over from earlier sessions, committed together.
Chat / DSML:
- Tolerate partial and malformed tool-call tags mid-stream, with a character
ceiling so a stray "<" cannot make the live stream wait forever for its
closing bracket.
- Narration rounds can now mark their prose as visible, so a DSML round that
keeps the text surrounding a call has it persisted as part of the answer.
Runtime observability:
- New deeptutor/runtime/memory_probe.py reports resident memory across the
process tree, exposed at /api/v1/system/memory and surfaced in the settings
status strip. psutil is a soft dependency, imported lazily with a /proc
fallback, so a missing wheel costs the strip and not the app.
Mastery:
- New deeptutor/learning/pending.py projects a persisted PendingQuestion into
the smaller public contract safe to hand the tutor model, and owns the
multiple-choice translations shared by registration and grading.
LightRAG:
- New pipelines/lightrag/worker.py moves local indexing onto a worker thread's
own event loop, so RAG-Anything's synchronous graph merging stops stalling
unrelated API and LLM work.
Also: request-scoped output artifact delivery (api/routers/outputs.py),
partner runtime and path_service adjustments, and CLI chat renderer updates.
Add Zulip as a new messaging channel for DeepTutor tutorbot.
Features:
- Private message and stream message support
- Event queue API (register/get_events/deregister) for reliable message listening
- Three-layer infinite loop protection (max_message_id, own message filter, dedup)
- File upload/download with configurable timeout and retry
- Permission control via allow_from (supports both user_id and email)
- Stream group policy: mention (respond only when mentioned) / open (respond to all)
- KaTeX/LaTeX bidirectional conversion for math formulas
- Typing indicator support for private chats (Zulip native API)
Technical highlights:
- Uses call_endpoint with custom timeout instead of send_message/upload_file
(default 15s timeout causes ReadTimeout on file uploads)
- Sync-async bridging via run_in_executor and run_coroutine_threadsafe
- Automatic event queue re-registration on BAD_EVENT_QUEUE_ID error
Tests: 88 unit tests covering all core functionality
Two independent issues that block `python scripts/start_web.py` after a
clean install on Windows:
1. UnicodeDecodeError when streaming subprocess output
`_spawn()` opened the backend / frontend stdout pipe with `text=True`
but no explicit encoding. On Windows this defaults to the system
ANSI codepage (e.g. `gbk` on Chinese Windows), which raises
`UnicodeDecodeError` as soon as the child process emits a UTF-8 byte.
Fix: pin `encoding="utf-8"` and `errors="replace"` so any locale
produces clean, lossless output.
2. Missing runtime dependencies in requirements/server.txt
`deeptutor/services/llm/provider_core/__init__.py` unconditionally
imports `AnthropicProvider`, `OpenAICompatProvider`, and
`OpenAIResponses`, which in turn import:
- `loguru` (provider_core/base.py, openai_codex_provider.py,
openai_responses/parsing.py)
- `json_repair` (anthropic_provider.py, openai_compat_provider.py,
openai_responses/parsing.py)
These are declared only in `requirements/tutorbot.txt`, so
`pip install -r requirements/server.txt && pip install -e .` followed
by `python scripts/start_web.py` crashes with `ModuleNotFoundError`
before the API server can serve a single request.
Fix: declare both packages in `server.txt` with the same version
bounds used by `tutorbot.txt`.
Reproduced and verified on Windows 11 + Python 3.12 + a fresh venv.
Closes#227. Auth is disabled by default (AUTH_ENABLED=false) so
localhost usage is unaffected. Set AUTH_ENABLED=true +
NEXT_PUBLIC_AUTH_ENABLED=true to require login when hosting publicly.
Backend
- New deeptutor/services/auth.py: bcrypt password hashing, JWT
create/decode, multi-user JSON store with role + created_at schema,
auto-migration of old flat-hash format, first-user → admin bootstrap
- New deeptutor/api/routers/auth.py: require_auth / require_admin
FastAPI dependencies; public endpoints /login /logout /status
/register /is_first_user; admin-only /users /users/{u}/role
- deeptutor/api/main.py: Depends(require_auth) applied to all 14
protected routers
- deeptutor/api/routers/unified_ws.py: cookie-based JWT check before
ws.accept() when AUTH_ENABLED
- Added bcrypt>=4.0.0 and python-jose[cryptography]>=3.3.0 to
requirements/server.txt and pyproject.toml extras
Frontend
- web/middleware.ts: route protection; /login and /register are public
- web/lib/api.ts: apiFetch wrapper — credentials:include + 401→login
- web/lib/auth.ts: login/logout/fetchAuthStatus + register() +
checkIsFirstUser()
- web/lib/admin-api.ts: listUsers / deleteUser / setUserRole
- web/lib/session-api.ts: credentials:include on all fetches;
expectJson redirects to /login on 401 instead of throwing
- web/app/(auth)/login/page.tsx: auto-redirects to /register when no
users exist; shows success banner after registration
- web/app/(auth)/register/page.tsx: new registration page with
first-user admin notice and password confirmation
- web/app/(admin)/admin/users/page.tsx: admin dashboard — user table
with role toggle and delete; guards against self-demotion/deletion
- AdminLink and LogoutButton hidden when AUTH_ENABLED=false
- .env.example and README.md updated with auth vars and setup guide
Made-with: Cursor
- Replace litellm with native openai + anthropic SDKs across both
services and tutorbot layers
- Add 5 new providers: mistral, stepfun, xiaomi_mimo, qianfan, ovms
- Add `backend` field to ProviderSpec for SDK routing
- New TutorBot OpenAICompatProvider (openai SDK) and AnthropicProvider
(anthropic SDK), replacing LiteLLMProvider
- Rewrite services/llm/executors.py to use openai SDK directly
- Remove litellm from factory.py routing, token_tracker, provider_cmd
- Auto-fallback to streaming for tool-call format errors (fixes#265)
- Settings UI: provider dropdown with auto base-url fill
- Clean up litellm from requirements/cli.txt and pyproject.toml
Made-with: Cursor