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.
Five kinds of global state leaked between tests, so the suite passed in
collection order and failed in any other. The worst is the LLM config
cache: `get_llm_config` memoises into a module-level `_LLM_CONFIG_CACHE`,
so whichever test resolved first decided what every later test saw, and
anything built off that config at init time — `QuestionPipeline` among
them — passed only because an earlier test had already filled it.
Resolve every test against the same fake and clear the cache on both
sides, with a `real_llm_resolver` marker for the tests that are checking
resolution itself. The rest are the same shape: patches that were never
torn down, a container singleton that outlived its test, and a launcher
writing `os.environ` where a subprocess inherited it.
Run in reverse, the suite went from 42 failed to 0.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Ship a content workspace you choose, one exec tool for every language,
Mastery Path modes that gate its tools, and Settings that grades
readiness instead of listing faults.
Release notes: assets/releases/ver1-6-5.md
Ship lighter isolated runtimes, richer Books and Mastery flows,
Reading/session polish, and explicit model API capabilities.
Release notes: assets/releases/ver1-6-4.md
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.
Adds max_concurrent_files, llm_model_max_async and entity_extract_max_gleaning to the lightrag.json slice and its config endpoint (#640). The wiring asks the installed RAG-Anything what it accepts and drops the rest with a warning, so an older install keeps working on the library defaults instead of raising TypeError; the extra's floor moves to the first release that carries the passthrough.
`codebuddy-agent-sdk>=0.1.24,<0.2` cannot be satisfied: PyPI has no 0.1.24 —
the 0.1 series stops at 0.1.19 — so `pip install "deeptutor[codebuddy]"` and
`uv sync` both failed to resolve (reported in #854). Track the published
series with an upper bound intact.
The provider already handles kwarg drift across SDK versions: it tries the
snake_case and camelCase spellings of the turn limit and permission mode and
raises a clear error if neither lands, so it never degrades to running the
agent unrestricted.
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
Two PRs were merged straight into main after v1.5.11 and never reached
dev — #771 (LiteParse parsing engine) and #813 (MCP reconnect on
credential change; report transport failures as themselves rather than as
tool timeouts). dev had since moved 20 commits ahead, so main was no
longer an ancestor and a release could not fast-forward into it.
#813 was squash-merged from a branch cut before #808/#809/#825 landed, so
its snapshot carries pre-fix copies of five files. Every conflict is
resolved in dev's favour for that reason, verified file by file:
- citation_manager.py — main lacks #808's tool_metadata path
- reasoning_params.py — main hardcodes the Gemini check #809 tabled
- openai_responses/parsing.py — main aliases the "fc_0" placeholder as an
item identity, the exact defect #825 fixed
- test_citation_manager.py, test_openai_responses_parsing.py — dev's
copies are strict supersets; main contributes no unique assertion
main's genuinely new content (liteparse/, mcp/manager.py reconnect,
tests/services/mcp/test_call_failures.py) merges in untouched.
* 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>
* feat: integrate liteparse as a document parsing engine
* feat: implement background task dispatching for knowledge base processing
- Added `_dispatch_background_task` to run long-running tasks on a separate daemon thread, preventing blocking of the main event loop during knowledge base ingestion.
- Updated `upload_files` and `create_knowledge_base` functions to utilize the new background task dispatching method.
- Implemented rollback functionality for partially created knowledge bases in case of failures during file saving.
- Enhanced tests to verify the correct offloading of file saving and background task execution.
* update
* docs: add Open Source Partners section with PageIndex
* docs: replace partner blurb with PageIndex promo code
* docs: link PageIndex subscription to developer portal
* docs: point PageIndex logo at its GitHub repo
* fix: harden Responses stream parsing (#825)
* fix: remove obsolete Typer extra (#817)
* fix: normalize RAG citation payloads (#808)
* fix: decouple mastery paths from chat sessions (#810)
* fix(parsing): hold LiteParse to the workdir contract
The engine landed with three knobs that could not work as written:
- ``extract_images`` was gated on a user-supplied ``image_output_dir``
that defaulted to empty, so image extraction never ran. Even when set,
images landed outside ``images/`` and the Markdown kept LiteParse's
bare ```` names, so the cache loader saw neither.
Images now go to the workdir's ``images/`` like the PyMuPDF4LLM engine,
links are rewritten to ``images/<name>``, and an empty dir is removed.
- ``output_format`` was selectable, but the parse always writes ``.md``;
picking JSON or text produced a mislabelled document. Pinned to
Markdown and dropped from the settings slice.
- ``image_output_dir`` was a free-text path joined onto the workdir.
Removed with the rest.
Also: normalize the slice with the shared coercers (a bare ``bool()``
reads the string ``"false"`` as True), allow-list ``image_mode``, pass
``quiet`` and ``ocr_failure_fatal=False`` so a systemic OCR failure
degrades to recovered text instead of losing the document, pin the
extra to ``<3.0``, and keep the engine lists in the three tests that
assert them exactly.
Excludes the unrelated background-task/rollback/off-loop changes this
branch carried in ``api/routers/knowledge.py``: dev already routes
uploads through ``_save_uploaded_files_off_loop``, and the rest is a
separate change that deserves its own review.
---------
Co-authored-by: chenhj <hanjiang.chen@1stcs.cn>
Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
* update
* fix(mcp): reconnect on credential change; stop masking transport errors as timeouts
Two independent bugs, both surfaced connecting a remote MCP server that
authenticates with a header key.
connection_signature() fingerprints the stored config, which holds
${secret:...} references rather than values, so rotating a credential left
the reload diff byte-identical and the session kept using the replaced key
until the process restarted. _signature() now mixes in a digest of the
materialized config. The digest, never the value, reaches the signature;
configs with no references keep their plain signature, so this does not
invalidate and drop every live session on upgrade.
A transport failure on the POST carrying a tool call is raised inside the
SDK's own anyio task group and never resolves the caller's request, so a
call that failed in under a second was reported as a tool timeout -- the
one explanation that rules out the actual cause. call_tool() now watches
the connection task alongside the call and reports the error that task
recorded. _run_server() routes its post-live failure through the existing
describe_connect_failure(), so that string names the HTTP status rather
than "unhandled errors in a TaskGroup".
Tests: tests/services/mcp/test_call_failures.py
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* docs: add Open Source Partners section with PageIndex
* docs: replace partner blurb with PageIndex promo code
* docs: link PageIndex subscription to developer portal
* docs: point PageIndex logo at its GitHub repo
* fix: harden Responses stream parsing (#825)
* fix: remove obsolete Typer extra (#817)
* fix: normalize RAG citation payloads (#808)
* fix: decouple mastery paths from chat sessions (#810)
* fix(llm): mark OpenAI Codex as vision capable (#821)
Declare the Codex Responses provider as image-capable so multimodal calls do not silently degrade to text and RAG image indexing can use it. Cover capability resolution, fallback behavior, and input_image conversion.
* fix: return minimal reasoning_effort for Gemini 3 and 2.5 Pro (#809)
Gemini 3 models and Gemini 2.5 Pro reject reasoning_effort="none"
with a 400 INVALID_ARGUMENT error. Per Google's OpenAI-compat docs,
"none" is only valid for the 2.5 Flash family.
Return "minimal" (the lowest valid level) for Gemini 3 and 2.5 Pro,
preserving the cost-intent while avoiding the API error.
Fixes#734
Co-authored-by: 0xtidalbore <ahmed@itcloud.ca>
* fix(mcp): don't orphan a cancelled call, or leak a URL credential
Follow-ups to this branch's own two fixes, both on paths it opened:
- ``asyncio.wait`` — unlike ``gather`` — leaves the futures it waits on
running when the *waiter* is cancelled, and the call was moved into a
free-standing task, so nothing else would ever stop it. Stopping a turn
left the tool running against the server with its result discarded.
Cancel and absorb it whenever the wait is interrupted, sharing one
``_abandon`` helper with the connection-died path.
- A dead transport is now reported to the *model*, not just in settings,
and httpx names the full request URL in its message. ``CredentialTarget``
includes "url_param" and several curated servers use it, so that string
can carry an API key. Redact query and userinfo before it travels.
Also: route the one transient retry through the same watcher (a retry is
if anything more likely to meet a dead transport — the exact failure this
branch exists to stop reporting as a timeout), and skip materializing a
config that holds no ``${secret:...}`` references at all. The latter is
worth it: ``_signature`` runs per live connection on every reload, which
``ensure_scope`` performs once per turn, and resolving does per-reference
mkdir + chmod + read synchronously on that path.
---------
Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: NoxsMedia <155662416+NoxsMedia@users.noreply.github.com>
Co-authored-by: 0xTidalBore <142905837+0xTidalBore@users.noreply.github.com>
Co-authored-by: 0xtidalbore <ahmed@itcloud.ca>
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.
On Python 3.14 pip finds no wheels for some compiled base deps (e.g.
faiss-cpu) and silently backtracks into a source build that dies with
subprocess-exited-with-error. The heavy RAG extras already carry a
python_version < '3.14' marker; capping requires-python makes pip refuse
3.14 with a readable message instead of a build failure.
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