Immersive Reading, self-configuration, and a two-way IMA library.
- Immersive Reading: a new capability that opens a document beside the
thread. New reading engine (PDF pages / slides / page-sized sections),
five reading tools, a deterministic locate pre-pass that grounds the
turn without a second LLM call, /api/v1/reading, and a reader pane with
selection, highlights, notes, and export to an annotated PDF or Markdown.
- Setup capability: inspect the install, apply a setting, install a
parsing engine, or request a credential from a chat turn. New settings
spec table; a candidate value is probed before it is committed, and API
keys never enter the model's context.
- Tencent IMA: pipeline split into transport/envelope/models/sources/
notes/media/inventory, an additive capability with five tools, and
connected libraries that can finally be enumerated (bounded listings
are reported as a lower bound).
- Retrieval: supports_rag_retrieval() replaces is_connected_kb() for the
"can I sweep this?" question, so linked / lightrag_server / ima sources
stop being silently dropped from every book.
- Notebooks: their own console at /notebook, per-notebook locks and atomic
writes, copy / move / export routes, damaged files surfaced instead of
dropped, and renaming a record no longer clears its knowledge-base link.
- Settings persistence: one lock and one atomic replace shared by every
writer of interface.json; the PUT endpoints stop writing the
defaults-merged view back to disk.
Release notes: assets/releases/ver1-5-14.md
Two pieces of work land together because the second is built on the
first: the provider layer was consolidated onto one spec table, then six
new providers were registered against it.
Layer overhaul
- Converge seven separate provider lists (backend registry, runtime
config, settings router, CLI wizard, frontend catalog, i18n, tests)
onto a single SEARCH_PROVIDERS spec table; every consumer derives from
it instead of keeping its own copy.
- Fix three silent defects: serper's `num` never reached the API (it was
swallowed by **kwargs, so max_results did nothing), serper dropped its
proxies, and jina had no result-count limit at all.
- A runtime failure (rate limit, timeout, unreachable network) no longer
fails the whole turn. The request walks the user's other credentialed
search profiles and finally DuckDuckGo, recording the downgrade under
a top-level `search_fallback` key so the trace shows what happened.
- Drop three provider modules that were never registered (exa, baidu,
openrouter). They stay in the deprecated list, so a stale config reads
as outdated rather than as a misspelled name.
Six new providers
doubao, bocha, zhipu, firecrawl, qianfan, aliyun_iqs — selectable under
Settings > Catalog > Search with their credential fields derived from the
spec table, and offered by `deeptutor init`. All six set
`soft_fallback=False`: five are China-hosted and the DuckDuckGo fallback
is unreachable on those networks, so a missing API key has to fail
loudly instead of silently timing out somewhere else.
Baidu returns as `qianfan` on the official Qianfan API; the old `baidu`
key stays deprecated.
An adversarial pass over #818 / #789 / #780 after merging.
**Codex sign-ins from before this week stopped working (#789).**
``validate_runtime_profile`` compared the profile's ``codex_account_binding``
for equality, but that key is written only by ``sync_codex_catalog`` — every
managed profile published by #690/#774 has none, so ``None != <hash>`` made
each of them look like another account's and locked its owner out of Codex
until they re-ran "Refresh models". Absent now reads as legacy; a binding
that is present and different is still an account switch and still refused.
**Overriding reasoning effort for one turn returned 409 (#789).** The same
function also required the request's effort to be byte-equal to the value
stored in the catalog. Effort is a per-request knob, not part of the identity
that ties a config to a token — the check now stops at model membership.
Its test asserted the old behaviour and has been rewritten around what the
function is actually for.
**The reasoning-effort endpoint left the runtime caches stale (#789).** It
writes the catalog the runtime resolves against, like every other catalog
write in this router, but skipped ``_invalidate_runtime_caches()``.
**OrcaRouter claimed Anthropic prompt caching (#818).** ``supports_prompt_caching``
makes ``_build_kwargs`` inject ``cache_control`` blocks into any ``anthropic/*``
or ``claude*`` request — an OpenRouter extension. No other gateway sets it and
nothing established the second one accepts it; a strict gateway would 400 every
Claude turn. Also fixed ``anthropic/claude-sonnet-4.6`` in the fallback list,
which the rest of the repo spells with dashes, so a user picking it from our
own menu would have got "model not found".
**OrcaRouter inserted itself into the curated menus (#818).** The featured
lists are hand-picked and rendered as a positional numbered menu, so adding an
entry shifted Ollama from [10] to [11]. The registry entry alone already makes
a provider reachable via "Show all" and the Settings dropdown; which providers
are featured is a maintainer decision. The README paragraph goes with it — no
other provider has per-provider prose there, and it would have been translated
into ten languages.
* feat: add codebuddy provider
* fix: treat codebuddy as login-backed provider
* feat: sync codebuddy account models
* fix: ignore no-key placeholder for codebuddy
* feat: add codebuddy web login
* fix: streamline codebuddy settings and latency
* fix: support switching codebuddy accounts
* fix: preserve codebuddy sessions and tool calls
* feat: use CodeBuddy HTTP provider over Agent SDK
Chat with CodeBuddy over plain HTTP by reusing the login state that the
IDE plugin / CLI stores on disk, instead of bundling the ~130MB Agent SDK.
- add codebuddy_http_provider (OpenAI-compatible /chat/completions on
<endpoint>/v2) with codebuddy_credentials for local OAuth session reuse
- provider_factory picks HTTP transport whenever a login state or API key
is available; Agent SDK stays as fallback for CLI agent features
- demote codebuddy-agent-sdk from core deps to optional codebuddy extra
- default model codebuddy/default -> codebuddy/hy3
- update auth card UX and locales for SDK-less sign-in flow
* chore: label codebuddy provider as codebuddy/workbuddy in the dashboard
* style: apply pre-commit formatting after upstream merge
* chore: capitalise codebuddy provider label as CodeBuddy/WorkBuddy
---------
Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
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.
Adds a Gemini embedding adapter that speaks the native :batchEmbedContents endpoint, so Embedding 2's retrieval-role prompt instructions and configurable output dimensionality are available, and threads a retrieval role (query vs document) from both RAG pipelines down to the client.
The role is opt-in per adapter: Jina and the OpenAI-compatible backends keep sending exactly what they sent before, because adding a task hint changes the vectors and would invalidate indexes already built. For the same reason only Embedding 2 defaults to the native endpoint — an existing gemini-embedding-001 profile stays on the OpenAI-compatible path unless its endpoint is set to the native URL explicitly.
Also redacts credential-like query parameters from endpoint values shown in errors and diagnostics.
Per-account MCP Services and CLI Apps — the two ways a deployment plugs in
tools DeepTutor never shipped — plus the isolation that makes them safe on a
shared install.
- MCP Services: a 45-entry curated store of hosted servers each account
installs for itself, OAuth 2.1 (PKCE + dynamic client registration) for the
servers that require it, static keys held by reference and resolved in memory
at connect time, stdio refused for self-service. Settings no longer
configures MCP; /settings/mcp redirects to the store.
- CLI Apps: 101 tools snapshotted from the two CLI-Anything registries.
Installs are admin-only, the registry's install_cmd is parsed into an argv we
build rather than executed, npm install scripts are forced off, and 66
first-party entries are pinned to one reviewed commit. Apps land in
data/cli-apps, one environment each, mounted read-only into the runner.
- Credentials that authorise a person move to data/system, the one branch the
exec sandbox never mounts: Codex tokens relocate themselves on first use
(refusing to follow a symlink), per-user MCP configs and keys land beside
them.
- Grants gain a cli_apps whitelist with the same deny-by-default posture as
MCP tools; a per-turn registry view keeps one owner's provider tools out of
the process-global registry and refuses an unauthorised tool at execute, not
just in the manifest.
- The composer reports what filled this turn's context window, a gutter rail
jumps back through long conversations, and the workspace collapses to a
drawer on small screens.
- The composer keeps focus after sending and across tab switches (#720);
released images carry provenance and SBOM attestations (#722).
README prose, all ten translated READMEs, and the docs-site pages that named
Settings → MCP are updated to match. Release notes:
assets/releases/ver1-5-7.md
For a remote or containerized deployment the browser's localhost is the
user's workstation while the OAuth listener runs on the server, so a
reverse proxy cannot deliver http://localhost:1455/auth/callback to that
private listener and Codex sign-in could never complete.
Keep the listener loopback-only and forward just the exact browser
callback path through the Web origin to a state-validating broker. The
settings card and CLI now show the real callback address, the SSH tunnel
command, an explicit authorize action and a countdown, and survive a page
reload; the deployment docs cover the Docker host-port and reverse-proxy
caveats.
The listener stays bound to loopback and ports 1455/1457 are never
published; the Web bridge rewrites only /auth/callback; the broker
requires an active operation and a constant-time state match; callback
responses are no-store HTML that never echo the code or state; PKCE and
the token exchange are unchanged. Binding the listener with
start_serving=False also closes a window where a connection could be
accepted before the callback object existed.
Replaces the oauth_cli_kit indirection with DeepTutor's own PKCE loopback
sign-in, an account-scoped live model catalog, and a Settings card that exposes
only the OAuth surface. Credentials live in `<user-root>/private/openai-codex/`
with owner-only permissions, atomic writes, and a generation guard that stops a
late refresh from resurrecting a signed-out session; `~/.codex` is never read or
modified. A CLI path shares the same service.
A Codex token authorizes one person's ChatGPT plan, so credentials anchor to the
signing-in account's own root and the managed profile is marked `owner_bound`:
`redacted_model_access` drops it for every caller, and it is not offered as an
assignable model. Signing in publishes the profile but only activates it when no
LLM is configured yet, so it never repoints a deployment that already has one.
Also from review: reschedule the status poll so one dropped response cannot
strand the card on "waiting"; defer the catalog reload when the operator has
unsaved edits instead of discarding them; log the real cause behind the generic
provider error; stop promising a retry when the token refresh actually failed;
bind both loopback stacks since `localhost` may resolve to either; and drop the
provider metadata fields nothing consumed.
A broad consolidation release across four product surfaces.
- Learning Space: Space becomes a learning dashboard; My Agents imports
local Claude Code / Codex chat history into resumable agents (with an
objective explore_context briefing so the tutor never role-plays the
user); Memory is promoted to a top-level /memory route; Partner
conversations flow into Memory; EduHub skills install inline.
- Knowledge Center: /knowledge rebuilt as a console with per-engine
detail pages; GraphRAG / PageIndex / LightRAG engines join LlamaIndex;
linked-KB read-only mounts; Obsidian live-vault capability.
- Settings: pluggable document parsing (MinerU / Docling / MarkItDown)
with a content-addressed cache and MinerU cloud/local backends; voice
TTS/STT; image & video generation; rebuilt settings navigation.
- Platform: per-user capability gating by assigned model; Solve rebuilt
on the chat loop with a per-step gate and mid-run failure fallback;
username login + inline errors; CLI skill publish/update; picker
polish; math-before-citation render fix.
Docs were split out to a standalone site, so site/ is now landing-page
only. Bumps __version__ to 1.4.6 and adds assets/releases/ver1-4-6.md.
Folds in mypy fixes surfaced by pre-commit (mineru/local Path typing,
knowledge/manager no-redef, explore_context token kwargs, CLI
set_dist_tag capability probe) plus prettier reformatting of
previously-committed web files.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A focused cut on top of v1.4.3:
- Skill hub: install community skills from ClawHub (and any compatible
registry via settings/skill_hubs.json) — provider abstraction in
services/skill/hub.py, new `deeptutor skill search/install/list/remove`
CLI, admin-only install endpoint for multi-user (install ≠ assign).
Every import runs a security gate: hub verdict check, zip-slip/zip-bomb
guards, text/script suffix whitelist, `always:` frontmatter stripped,
provenance recorded in .hub-lock.json.
- KB previews: new /knowledge/{kb}/file-preview-text/{filename} endpoint
serving extracted plain text; KB Files tab renders real in-browser
DOCX/XLSX previews; DOCX previewer scales pages to fit narrow panels.
- Markdown previews allow safe raster data:image URLs on <img src>
(react-markdown strips all data: URLs by default); script-capable
schemes stay blocked.
- All ten localized READMEs re-synced with the English README.
- Docs (deeptutor.info): `deeptutor skill` reference, hub-install notes on
Space and multi-user pages, KB file routes in the server API table
(en + zh).
- CLI docs contract test updated for partner/skill subcommands.
Release notes: assets/releases/ver1-4-4.md
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
New self-contained deeptutor/learning/ subsystem (models, storage, service,
scheduler, grading) + 12-stage guided_learning capability, REST router, and
web learning pages, with 164 tests.
Conflict resolutions:
- services/llm/factory.py: kept dev's stream runner (allow_image_fallback
multimodal path); dropped the PR's incidental 300s asyncio.wait_for wrapper
and its now-orphaned TimeoutError handler / unused logger — the blanket
timeout is unrelated to guided learning, dev already has consumer-side
timeouts, and 300s would truncate long legitimate streams (book/research).
- web/components/sidebar/WorkspaceSidebar.tsx: kept dev's structure, added a
useCallback handleNewChat that cancels any in-flight streaming turn before
newSession() (mirrors handleDeleteSession) and wired it to onNewChat.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replaces the flat single-blob memory page with a structured store:
- L1 captures raw run traces; L2 holds normalized document records;
L3 holds curated slots per surface (chat, notebook, book, TutorBot).
- New consolidator pipeline (chunker, guards, parse, references, runs,
modes, line-doc, meta) turns traces into versioned line-oriented
documents with stable ids and snapshot history.
- Per-user isolation flows through PathService; the store API is
stateless.
UI ships a dedicated /memory workbench with graph / L1 / L2 / L3 /
resolve subpages, plus a reusable MemorySection embedded where the
legacy panel lived.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add stage_failure_counts/stage_failure_notes to LearningProgress for persistent failure tracking
- Wrap RAG retrieval with 10s independent timeout in _call_llm_impl
- Add _call_llm_with_timeout (default 60s) and _call_llm_with_degradation (bounded retry + skip)
- Apply degradation to all 12 stage handlers with stage-specific fallback paths
- Extract _run_interactive_quiz_loop shared helper for practice/practice_quiz
- Extract StructuredStageContent component from page.tsx
- Add TypeError to JSON parse except clauses across 7 files
- Simplify _record_attempt_and_update_mastery to single save exit
- Move import logging to module top in service.py
Add a `start` CLI command that delegates to scripts/start_web.py so users
can launch the full web app with a single command instead of manually
running `python scripts/start_web.py`.
deeptutor notebook add-md <notebook_id> <file> [--title T] [--type TYPE]
Read a markdown file and add it as a record to a notebook.
deeptutor notebook replace-md <notebook_id> <record_id> <file>
Replace an existing record's output with content from a markdown file.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Rebased onto dev (post-#348) and resolved two UI conflicts (`web/app/(workspace)/chat/[[...sessionId]]/page.tsx` drops the now-dead `replaySnapshot` helper; `web/components/chat/home/ChatMessages.tsx` switches the last-assistant action button from the old `RotateCcw`/Retry to `RefreshCcw`/Regenerate). Smoke tests green (199 passed) and all required checks pass.
Merging: adds a `regenerate` capability wired through CLI (`/regenerate` · `/retry`), WebSocket (`type: "regenerate"`), and Web UI (per-message Regenerate button). Backend rolls back the trailing assistant via `SQLiteSessionStore.delete_message`, reuses `start_turn` through `_persist_user_message=False` / `_regenerate=True`, skips `memory_service.refresh_from_turn` on regeneration, and surfaces non-fatal `regenerate_busy` / `nothing_to_regenerate` errors. Also includes empty-response diagnostics in `_stage_responding`. 18 new tests.
* TutorBot Channels tab is now schema-driven across every built-in & plugin channel
(GET /api/v1/tutorbot/channels/schema), with per-field secret reveal toggles.
* Channel secrets are masked end-to-end; raw values only surface via the explicit
?include_secrets=true edit-form route. PATCH validates ChannelsConfig at the API
boundary and returns 422 on bad payloads. reload_channels is serialised by an
asyncio.Lock and records last_reload_error for the UI.
* Collapsed services/rag/ to a single LlamaIndex pipeline: removed ~2.6k lines of
unused components/* + pipeline.py + types.py + utils/ + parsers/. rag_provider
is now a stub; legacy values silently coerce to llamaindex.
* Centralised file routing into services/rag/file_routing.py (FileTypeRouter /
DocumentType / FileClassification); dropped per-provider extension helpers.
* Defensive RAG/KB consistency: deep_solve / deep_research strip rag/kb when no
KB is attached; SolveToolRuntime + ResearchPipeline + DecomposeAgent
short-circuit instead of falling back to non-existent default KBs (DE-all,
ai_textbook).
* Externalised AgenticChatPipeline prompts into agentic_chat.yaml (zh + en).
* Added Thai README (#337).
* New test modules: file_routing, knowledge_base_config, channel_schema,
channel_secrets, rag_consistency, research_pipeline_rag.
Full notes: assets/releases/ver1-1-2.md
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
Instead of replacing asyncio.create_subprocess_exec with subprocess.run
(which loses real-time streaming and cancellation), fix the root cause:
set WindowsProactorEventLoopPolicy before uvicorn starts so that
create_subprocess_exec works correctly on Windows.
This preserves the original async streaming renderer while fixing
Windows compatibility at the event loop level.
Made-with: Cursor