58 Commits

Author SHA1 Message Date
Oikantik Basu
9e5a4e64c9 fix: preserve thinking-off settings on research outline retries (#3134) 2026-12-01 09:34:04 +08:00
zszz3
18a686b13b docs: rewrap memory audit prompts and note what was measured
The English audit_l2 / audit_l3 role paragraphs kept the short lines
left by moving the surface and slot names to the end; they are
rewrapped with the same words. The research forced-finish docstring now
says the tool_choice="none" behavior was measured on deepseek-flash
only.

Refs #2974
2026-11-30 13:45:50 +08:00
zszz3
8b4bbf0c7e fix: leave a note when a forced finish round only calls a tool
The forced FINISH round keeps the loop's tools, so the model may still
call one. That call is not run, and the assistant turn added before the
repair note had empty content plus the round's reasoning or thinking
blocks. Anthropic rejects an empty text block, so the turn now carries a
short note ("Tool call not run: this round must finish.") when the round
returned tool calls and no text. Rounds that returned text are unchanged.

Refs #2974
2026-11-30 13:30:16 +08:00
zszz3
8819d95c21 fix: keep the loop's tools in forced final rounds
When a research block or a deep_question explore/quiz loop runs out of
rounds, the forced FINISH request was sent with no tools. Removing the
tools changes the first bytes of the request, so none of the block's
history is served from the provider cache. In a real deep_research run a
block's forced finish paid 28.6k and 279.8k uncached tokens.

The forced rounds now send the loop's tool schemas unchanged; the prompt
already tells the model to stop calling tools. tool_choice="none" is not
used because DeepSeek renders it like no tools (replayed: 1,152 cached
tokens with "none" or no tools, 14,976 with the tools left as they were).
A tool call in a forced round is not dispatched; it fails the attempt and
gets the existing repair note.

Refs #2974
2026-11-30 03:47:50 +08:00
zszz3
0261ecac1f fix: move per-block research state out of the cached system prompt 2026-11-30 03:47:50 +08:00
mpichini1
6bf7c631e4 fix: preserve PageIndex sources in report citations 2026-11-13 19:49:05 +01:00
Alex Castillo
15a6864a64 fix(research): price dated gpt-4o-mini names with the mini rates
get_model_pricing returned the first dict key found inside the model
name, so gpt-4o-mini-2024-07-18 and openai/gpt-4o-mini matched gpt-4o
and were billed at the full model's rates. Pick the longest matching
key instead.
2026-11-03 16:06:19 -05:00
Bingxi Zhao (Frank)
fbab59acbf feat: modularize installation and enforce feature dependency boundaries 2026-10-28 01:02:29 +08:00
Bingxi Zhao (Frank)
1e7eef0e9a feat(research): add grounded scientific primitives and scoped private MCP origins (#1629) 2026-10-08 10:05:38 +08:00
Bingxi Zhao (Frank)
cf44400fc8 fix(research): identify unwritten report parts on failure (#1514) 2026-09-27 05:02:08 +08:00
Bingxi Zhao (Frank)
9d3e7c3102 fix(research): resume ask_user replies from shared loop helpers (#1600) 2026-09-27 04:52:21 +08:00
Bingxi Zhao (Frank)
ffbe0a541b fix(agentic): replay reasoning in repair and report retries 2026-09-23 12:30:01 +08:00
Bingxi Zhao (Frank)
eabc17d79f release: v1.6.10
Native LightRAG role models: extraction, keyword, query and vision each
resolve their own model, vision indexing pins a vision-capable model
instead of silently degrading, and a knowledge base records which models
and which embedding built it. A published index refuses queries after its
embedding identity changes rather than searching a foreign vector space,
and a rebuild is confirmed against the configuration it will actually
use — a stale confirmation is rejected instead of quietly rebuilding
something else. A failed publication is withdrawn, not left half-written.

PDF attachments follow the parsing engine configured for the workspace,
report the stage they are in, and a truncated answer says it was
truncated with the counters that prove it. Providers are no longer
filtered out of the embedding picker on an unverifiable capability guess:
configure the model and test it. Visualize's temperature and token budget
are settings rather than literals. Notebook evidence no longer depends on
the chat session that produced it.

See assets/releases/ver1-6-10.md for the full notes, and the README
translations for the propagated prose.
2026-09-22 21:36:27 +08:00
Frank_zhu
6fbed6c28e fix(research): recover report labels on finished reply (#1514)
Keep the streaming 64-char probe strict, then re-read a finished report
reply so an unclosed/over-wide fence or a matching ## n. heading no
longer kills the turn. Raise report_section max_tokens to 12000 and
turn reasoning off for report prose so first attempts stop starving.
2026-09-21 10:27:09 +08:00
Bingxi Zhao (Frank)
c31bed8aeb refactor(llm): one rule for a structured call a reasoning model starved
Four defects this month were the same failure: a step asks a model for a
whole payload in one shot, the model spends its whole max_tokens on
hidden thinking, and the provider returns a truncated body or none at
all — with no error. Book's spine collapsed to a single "Overview"
chapter (#1316), the quiz plan emitted zero templates (#1318), the
non-streaming path handed the scratchpad back as the answer (#1352).

Each fix grew its own retry. Book got `book/json_retry.py`; question got
`LabeledStepResult.reasoning_only`; research got nothing, so its
decompose step still degraded a topic to one sub-topic in silence, and
its report outline still lost the whole report structure.

Moves the rule out of `book/` — it was never Book's — into
`services/llm/structured_retry.py`, and points it at the streaming-side
detector so the two halves read as one rule: two ways to notice a budget
spent on hidden tokens, one remedy, which is to ask again with thinking
turned down.

Applies it to research's two one-shot payloads, which needed the step
wrapper to accept a per-call reasoning effort the way question's already
did.

The generic entry point takes the caller's own `is_usable` rather than
imposing the object shape. Research's decompose accepts a bare array of
sub-topics; judging that unusable would have retried a good answer and
then discarded it — a regression the object-shaped helper would have
caused as the only entry point. The object form still guarantees a dict,
because its callers index the result directly.

6902 passed, 24 skipped.
2026-09-11 12:43:41 +08:00
Bingxi Zhao (Frank)
ed85fe9bc2 refactor(config): put every LLM budget in agents.yaml, one entry per stage
A capability that makes several different LLM calls cannot be described
by one max_tokens: the step emitting a whole JSON plan and the step
writing one paragraph need different room. `chat` has said so since it
grew `exploring`/`responding`. `question` and `research` said the same
thing in module constants instead, where no user could reach them.

The cost of that was not theoretical. `capabilities.question.max_tokens`
governed exactly one of question's six LLM calls — the follow-up agent —
while the pipeline's five steps used constants that ignored it. The plan
step's constant sat below the capability's own ceiling, which is how
#1318 shipped a step that could spend its whole allowance thinking and
emit zero templates without an error. `EXPLORE_FINISH_MAX_TOKENS` had
been dead since it was written.

Generalises the seam that already worked rather than adding a parallel
one: `get_chat_params` becomes `get_capability_params(capability)` over a
table of per-stage defaults, and `question`, `research` and
`explore_context` get tables of their own holding the numbers they
already ran on. The pipelines resolve once in `__init__` beside the
budget they already cached. Unknown keys are dropped, so a misspelled
stage cannot become a silent no-op that reads like a setting.

The rule this establishes, stated in the tables: **agents.yaml owns every
LLM budget** (temperature, max_tokens, per stage); **main.yaml owns
runtime behaviour** (iteration caps, timeouts, retry policy, modes). A
budget in main.yaml is a bug. `tool_summarizer.max_tokens` still reads
its main.yaml value first so nobody's existing configuration moves; new
installs reach the same number through agents.yaml like everything else.
GraphRAG's reachability probe is the one documented exemption — tuning it
could only make a health check lie.

Seeds are derived from the same tables the pipelines read, because two
lists of the same numbers is how a default and its seed drift apart —
the shape of #1316. Tests pin both halves: the shipped values, and that
every stage in code is present in the seeded file.

No behaviour change: every default is the constant it replaced.
6902 passed, 24 skipped.
2026-09-11 12:43:41 +08:00
Bingxi Zhao (Frank)
253dc0b284 follow-up to #1357: a ceiling for a stalled provider, not for a slow tool
60s cancels research work that was going to finish — one rag call against
a LightRAG or GraphRAG index makes its own LLM calls before returning, and
search-then-fetch waits on someone else's site — and each of the three
retries then pays the full timeout again. 240s is the ceiling
geogebra_analysis already uses for the same reason; retries default to 0 so
only a caller who knows its tools are flaky, not slow, pays for a second
attempt. Both remain configurable under researching.

Pins the pair in a test: the policy tests pass whatever they configure, so
nothing held these two numbers.

(cherry picked from commit 389fe3f0daf1abb4eddc87be84485d47982b84a3)
2026-09-10 23:55:18 +08:00
Bingxi Zhao (Frank)
4e2f088548 merge: bring 19 reviewed PRs from origin/dev into dev
Resolves two collisions with the fixes committed locally tonight:

* book/blocks/_llm_writer.py — #1366 threaded a reasoning_effort
  through llm_json while 5ac8e2c9 replaced this file's private
  _json_has_expected with the shared json_payload_is_usable.
  Taking either side alone breaks: origin/dev's calls a helper that no
  longer exists, ours drops the caller's explicit effort. Kept the shared
  helper and the threading, and the retry now reuses an explicitly given
  effort so a round deliberately run without thinking cannot re-enable it.

* runtime/agentic/tool_dispatch.py — #1357 added tool_timeout /
  tool_max_retries to execute_tool_call in the same parameter list where
  4e816d79 renamed unknown_error_message_factory (tool) to
  tool_error_message_factory (tool, error). Both are needed: the
  dispatcher already passes the timeout pair through, and every call site
  in the tree now uses the renamed factory.
2026-09-10 23:52:04 +08:00
evan188199-tech
30e0f7c3a2 fix(research): enforce tool timeout and retry policy (#1357)
Co-authored-by: XZH <cto@xzh.ai>
2026-09-10 23:45:30 +08:00
Bingxi Zhao (Frank)
4e816d7933 fix(tools): tell the model why a tool failed, not that it failed
Stop the Ollama a vector KB embeds against, ask a question, and the model
is told "An unknown error occurred while executing rag." The adapter had
already written the answer — `Cannot connect to Ollama at
http://localhost:11434. Make sure Ollama is running. Start it with:
ollama serve` — and the dispatcher was holding it (#1356).

`unknown_error_message_factory` took the tool name and nothing else, so
no caller could have done better. Four capabilities each wrote their own
message from that one argument and three of them called the result
unknown; the fourth, pageindex, restated the dispatcher's own default
minus the cause. The name was the bug: it presumed a cause the runtime
always had.

It is now `ToolErrorMessageFactory`, `(tool, cause) -> str`, and the key
plus the English wording live once in `tool_error_message_factory`, which
each capability wraps around its own `_t`. Capabilities keep their
translations and can no longer keep the cause out of them. pageindex
passes nothing and takes the default. A bundle predating the new
`notices.tool_error` key falls back to English rather than to silence
about what went wrong, which is the reason the fallback carries the cause
too.

This is the same shape as read_skill answering "skill not found" when the
skill resolved and only the file was missing (#1347): a failure the
caller cannot see has no way out, and the model spends its rounds
inventing one.

The regression test is the reporter's turn — a `rag` call raising the
real adapter error — and asserts the endpoint and the remediation reach
the role=tool message.
2026-09-10 23:00:11 +08:00
Bingxi Zhao (Frank)
5f7e165161 fix(llm): carry a round's reasoning through the shared agentic loop
DeepSeek's thinking models reject a continuation whose history has lost the
previous assistant turn's reasoning:

    The `reasoning_content` in the thinking mode must be passed back to the API.

Chat's loop has replayed it since #1058. The shared `runtime/agentic` loop —
the one quiz, research, PageIndex and explore_context all run on — never
did. `LabeledStepResult` had no field for it; the stream reader pulled
`reasoning_content` off each delta, pushed it to the trace UI for display,
and dropped it. All three assistant rebuild sites therefore emitted
reasoning-less turns. Round one cannot fail (system + user only); round two
always did, which is why this reads as "quiz generation failed".

The message builder's own docstring said as much: "The provider has always
known how to read this field off a message — nothing ever wrote it."

v1.6.5 made it visible rather than causing it. `deepseek-v4-flash` was in
`_THINKING_DISABLED_BY_DEFAULT_MODELS` in v1.6.4 and the list was emptied,
so the model now thinks by default — correctly, since suppressing reasoning
to dodge this cost every flash user their reasoning stream. `deepseek-v4-pro`
and `deepseek-reasoner` are sent `thinking: enabled` by our own code and were
already broken in v1.6.4. Re-adding flash to that list would hide it again
and still leave those two broken, so this fixes the replay instead.

The reasoning is accumulated for every label, not only the pre-label prelude
the trace happens to render — whether it was displayed is a display question,
and the provider wants the whole round back. Anthropic's signed thinking
blocks are read off `provider_specific_fields`, where the adapter puts them,
because a signature cannot be rebuilt from text. `_append_repair_messages`
now takes the step rather than its text, since a repair round is still a
round. Rounds with no reasoning append no field, so ordinary models see a
byte-identical history.

Deliberately NOT setting `_provider_response_state` alongside: the shared
loop posts its messages straight into `chat.completions.create` on what is
usually a raw AsyncOpenAI client, and the private-key stripping lives inside
`OpenAICompatProvider._sanitize_messages` — so it would be serialized into
the request body for every model off the adapter route.

Also reorders `_classify_failure`: a provider quoting the field it objected
to was landing in `prompt_leak`, which is not retryable and told the user the
model had leaked a prompt. `"prompt" in lower` goes with it — it matches
`prompt_tokens`.

Still open: `_sanitize_messages(responses_api=True)` ignores `reasoning_content`
entirely, so a surface that mounts native web search (which routes DeepSeek
to the Responses API) is not covered by this and falls back to Chat
Completions. The book quiz mounts no tools, so it is not that surface.
2026-09-08 00:52:57 +08:00
Bingxi Zhao (Frank)
04040a2c06 release: v1.6.5
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
2026-09-06 13:46:29 +08:00
Bingxi Zhao (Frank)
93df3d48b7 release: v1.6.4
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
2026-09-03 01:38:54 +08:00
Bingxi Zhao (Frank)
02ba56793e chore: checkpoint backend stabilization workspace 2026-09-01 21:28:15 +08:00
Bingxi Zhao (Frank)
3c51bb9ed9 Merge pull request #1021 from Zuan0/research-interruption-recovery
# Conflicts:
#	web/context/UnifiedChatContext.tsx
2026-08-31 19:04:16 +08:00
wayblink
2ba5e3aa5d feat(llm): support explicit OpenAI wire API selection 2026-08-29 15:02:31 +08:00
zhou2030109-glitch
bb6b0cd629 fix: make deep research resilient to interrupted streams 2026-08-27 10:11:00 +08:00
Bukely_
07abbd7326 feat(pageindex): add OSS knowledge bases and reasoning-based retrieval (#907)
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.
2026-08-20 00:35:15 +08:00
Bingxi Zhao (Frank)
97574b5236 fix: three defects on the paths this week's PRs touched
Found by an adversarial pass over the merged changes.

**A tool call could run under another call's name and arguments.**
``_ToolCallBuffers.add`` registered every buffer under the placeholder
item id ``fc_0``, which providers that omit ``item.id`` all share, and
``response.output_item.done`` looked buffers up by that same placeholder.
A ``done`` event for a call that was never announced therefore resolved to
whichever unrelated call last claimed it. Reproduced: a second call to
``list_kb`` was dispatched as ``delete_kb`` carrying the first call's
``{"kb": "secret"}``. The placeholder is a display fallback, not an
identity — never alias it, never look up by it.

**A blocked CDN froze every HTML visualization.** The iframe height
bridge attached its observers on ``DOMContentLoaded``, but ``injectKaTeX``
adds deferred script tags, and deferred scripts must all run before that
event fires. With jsdelivr unreachable the observers never attached and
every visualization sat at its initial height. The bridge is injected just
before ``</body>``, so it can gate on ``document.body`` instead and attach
before the CDN fetch resolves.

**RAG citations dropped their sources.** ``_extract_rag_citation`` was the
only extractor not handed ``tool_metadata``; it re-parsed ``raw_answer``,
which is the prose shown to the model, not JSON. Every RAG pipeline
normalises its retrieval into ``metadata["sources"]`` — already the shape
``_rag_source_payload`` reads — so prefer it and keep the answer parse as
the fallback. This is the user-visible half of #808 that normalising the
payload alone did not restore.

Also hoist the Gemini "minimal, not none" families beside
``_PROVIDER_DEFAULT_OFF_PATTERNS``, whose docstring calls itself the single
source of truth for exactly this knowledge.
2026-08-12 17:28:56 +08:00
Bingxi Zhao (Frank)
eec4134d15 fix: normalize RAG citation payloads (#808) 2026-08-12 16:11:29 +08:00
szzhoujiarui
47b713d36e fix(research): mount read-only Obsidian tools instead of rag for vault KBs (#756)
* fix(research): mount read-only Obsidian tools instead of rag for vault KBs

When the selected knowledge base is a connected Obsidian vault, the
research block loop now:

- resolves KB metadata at construction and records the server-side vault
  path (no RAG usage audit);
- suppresses the rag auto-mount (has_kb=False) and exposes the three
  read-only Obsidian tools obsidian_search / obsidian_read / obsidian_list;
- injects _vault_path server-side, overwriting any model-supplied value;
- treats the Obsidian tools as citable so their evidence feeds the
  citation manager and Phase 4 reporting;
- renders an Obsidian-specific system note (en/zh) instructing read-only
  vault retrieval instead of rag.

Indexed KBs, no-KB, and unresolvable references keep their existing
behaviour. Closes #752

* fix(research): preserve Obsidian citation context

---------

Co-authored-by: szzhoujiarui-sketch <szzhoujiarui-sketch@users.noreply.github.com>
2026-08-06 22:07:26 +08:00
Santh
5449b2dc05 fix(research): parse first JSON value when adjacent values follow (#680)
extract_json_from_text used a greedy brace match, so {"a":1}{"b":2} returned None.
2026-07-24 16:04:47 +08:00
Bingxi Zhao (Frank)
fb3c568697 fix pageindex & minor bugs 2026-07-18 19:47:03 +08:00
Bingxi Zhao (Frank)
3b823ae5f7 minor fixes 2026-06-29 23:06:30 +08:00
Bingxi Zhao (Frank)
7ac3a3ba79 release: v1.4.6
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>
2026-06-17 10:50:44 +08:00
Bingxi Zhao (Frank)
c9d387e2b6 super super great great update 2026-06-17 00:56:27 +08:00
Bingxi Zhao (Frank)
069ba53a00 docs:update readme 2026-06-14 00:53:57 +08:00
Bingxi Zhao (Frank)
46093e5e2b update msg 2026-06-11 20:03:34 +08:00
Bingxi Zhao (Frank)
6153d8c092 release: v1.4.0 — release notes, version bump, repo hygiene
- Add assets/releases/ver1-4-0.md covering deltas since v1.4.0-beta
  (reasoning_effort normalization, tool-schema fallback, restart-safe
  turn runtime, frontend placeholder hardening, CLI chat REPL config).
- Bump deeptutor/__version__ to 1.4.0.
- Update README Releases section: v1.4.0 at top, install opt-in note
  updated for stable.
- Fix pre-existing pre-commit failures so the v1.4.0 cut runs clean:
  bandit B324 (mark _sha1 as non-security), mypy no-redef in
  document.py / line_doc.py, mypy arg-type/assignment in
  snapshot/adapters.py, mypy assignment + arg-type in
  services/memory/settings.py, mypy func-returns-value on
  set.add idiom in deeptutor_cli/init_wizard.py.
- Apply ruff format / prettier sweep across the repo.
- Remove stale workspace + i18n env example + playwright captures
  already cleaned locally; ignore .playwright-cli/ going forward.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 21:09:22 +08:00
Bingxi Zhao (Frank)
ca7916bc57 fix: docs, docker deployment & official web 2026-05-22 20:19:32 +08:00
Bingxi Zhao (Frank)
23ca3024be refactor(agents): rebuild Deep Research / Deep Solve / Question on agentic engine
Replaces three bespoke multi-agent pipelines with orchestrators on top
of a shared agentic-engine primitive set (core/agentic/: labeled_step,
loop, tool_dispatch, usage, client). Each capability now lives in one
pipeline.py file with one pipeline.yaml prompt.

- Deep Research: Rephrase (ask_user loop) -> Decompose (OUTLINE) ->
  Research blocks (THINK/TOOL/APPEND/FINISH per topic, dynamic queue
  preserved) -> Reporting (OUTLINE/INTRO/SECTION/CONCLUSION).
  CitationManager and the dynamic topic queue are kept.
- Deep Solve: Pre-retrieve (KB-only, QUERIES/rag/SUMMARY) -> Plan ->
  per-step THINK/TOOL/FINISH/REPLAN loop with back-edge to Plan ->
  Synthesize. Step FINISH text flows into the next step's context.
- Question: coordinator + pipeline replace generator / idea_agent /
  models, with new history.py and mimic_source.py helpers.

Removed: research/agents/, research/research_pipeline.py,
research/prompts/{en,zh}/*.yaml (legacy multi-agent prompts);
solve/agents/, solve/memory/, solve/utils/, main_solver.py,
session_manager.py, tool_runtime.py and old prompts;
question/agents/{generator,idea_agent}.py, example.py, models.py,
old prompts; api/routers/solve.py (capability owns its own routing).

Adds shared agents/_shared/tool_composition.py for cross-pipeline
tool wiring. Updates deep_research/deep_solve/deep_question
capabilities to dispatch through the new pipelines.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 18:03:44 +08:00
Bingxi Zhao (Frank)
3d5c3a1eb5 improve chat 2026-05-12 02:20:30 +08:00
Bingxi Zhao (Frank)
85779c846b refactor env settings and installation 2026-05-11 12:59:56 +08:00
Xinyu Du
1ee7b8204c fix: add deepseek-v4-flash and deepseek-v4-pro to model pricing table
Pricing per DeepSeek API docs (per 1K tokens):
- deepseek-v4-flash: $0.00014 input, $0.00028 output
- deepseek-v4-pro: $0.000435 input, $0.00087 output
2026-05-06 02:18:34 +08:00
Bingxi Zhao (Frank)
824bf778df fix: lint & logging system 2026-05-01 01:39:08 +08:00
Bingxi Zhao (Frank)
7fce54d98a chore: prepare v1.3.0 release
Made-with: Cursor
2026-04-27 21:09:25 +08:00
Bingxi Zhao (Frank)
6428458049 chore: prepare v1.2.5 release 2026-04-25 22:08:44 +08:00
Bingxi Zhao (Frank)
77f29cbcc7 fix lint 2026-04-23 19:29:16 +08:00
Bingxi Zhao (Frank)
5f29b508e0 refactor(prompts): externalize answer_now/notebook prompts to YAML and tidy capability/UI configs
- Move inline LLM prompts out of capabilities/agents into versioned
  prompt YAMLs under each agent's prompts/{en,zh}/:
  - notebook: analysis_agent, summarize_agent
  - question/research/solve/visualize: answer_now
- Slim down capability modules (_answer_now, deep_question,
  deep_research, deep_solve, visualize) to load prompts via the
  prompt manager instead of hard-coding strings
- Update services/prompt/manager.py to support the new prompt paths
- Refresh web config panels (quiz, research, visualize, math-animator)
  and shared types to align with the new capability options
- Update Mermaid, ChatMessages, TracePanels and settings page,
  plus en/zh locales for the new copy

Made-with: Cursor
2026-04-20 17:34:33 +08:00
Bingxi Zhao (Frank)
100576da69 release: v1.1.2 — schema-driven channels, secret masking, RAG simplification, KB-consistency hardening
* 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
2026-04-18 11:33:53 +08:00