* 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
- Promote "Answer now" to a universal escape hatch via answer_now_context;
orchestrator re-routes any capability to chat._stage_answer_now.
- Co-Writer: draggable split + persistent ratio + line-anchored
bidirectional scroll sync using a hidden mirror for wrap-aware editor y.
- SaveToNotebookModal: optional message-selection mode with quick presets;
rebuild transcript / userQuery from the selected subset.
- Adopt the real notebook API (/api/v1/notebook/*) across Knowledge tab,
guide notebook picker, and save-to-notebook flow; new typed helpers in
web/lib/notebook-api.ts (listNotebooks/getNotebook/createNotebook/...).
- Extract CollapsibleConfigSection; unify Quiz / Math Animator / Visualize
/ Deep Research panels behind one collapsed-summary header.
- Replace streaming spinner with a dedicated Stop button; persistent
composer header; mask-gradient on messages container.
- TutorBotManager: public load/save/merge API; atomic write via temp +
Path.replace; merge_bot_config with explicit-clear semantics; new
tests/services/tutorbot/test_manager_config.py.
- MarkdownRenderer: trackSourceLines passes data-source-line through;
RichCodeBlock skips Prism for unlabeled/plaintext fences; mermaid
detection includes flow/seq/sequence editor.md fences.
- UI/theme: deeper foregrounds + warmer borders for light/Snow themes;
/guide migrated off hardcoded slate/indigo to design tokens;
HistorySessionPicker themed and timestamp-seconds bug fixed.
- Filter system messages out of UnifiedChatContext.hydrateMessages and
ChatMessageList so backend grounding context never renders as a bubble.
- Bug fixes (already merged earlier in dev):
* tutorbot config wipe on restart (#332)
* selective_access_log middleware unpack crash (#334/#335)
* 15 npm security vulnerabilities — jspdf/next/mermaid (#330)
- Drive-by: remove "// README" typo from .env.example_CN.
- Add v1.1.1 release notes and update README.
Made-with: Cursor
The Settings → LLM diagnostic hardcoded max_tokens=200. Reasoning-capable
models (minimax-m2, o1, Gemini thinking) spend most of that budget on
internal thinking tokens and return empty visible content, which the
probe then reports as "LLM returned an empty response" even though the
API call succeeded.
Read the budget from LLM_TEST_MAX_TOKENS with a 1024 default (falls back
on non-numeric values). Documented in .env.example and plumbed through
docker-compose.yml.
The _test_llm method in ConfigTestRunner was not forwarding extra_headers to
llm_complete(), causing custom User-Agent and other headers to be ignored
during model connection tests.
This ensures that user-configured extra_headers in model settings are properly
propagated to the LLM API call during connection testing.
Record the embedding model and dimension used to index each knowledge base
in kb_config.json. On subsequent loads, compare the stored fingerprint
against the currently configured embedding model and flag mismatched KBs
with needs_reindex=True and embedding_mismatch=True.
When a mismatched KB is searched, a warning is included in the search
result so callers know search quality may be degraded and re-indexing
is recommended.
This prevents silent search quality degradation when users switch
embedding models (e.g., from text-embedding-3-large to nomic-embed-text)
without re-indexing their existing knowledge bases.
This PR fixes two related issues:
1. Qwen vLLM 'System message must be at the beginning' error:
- deeptutor/agents/chat/agentic_pipeline.py: Merge system_prompt and memory_context into single system message, filter out system messages from conversation_history
- deeptutor/services/session/context_builder.py: Filter out system messages from DB since summary is already added as system
- deeptutor/agents/chat/chat_agent.py: Merge system prompt and RAG context into single system message
2. History reference (@reference) empty context issue:
- deeptutor/services/session/turn_runtime.py: Add fallback to raw record content when NotebookAnalysisAgent.analyze() returns empty string
Benefits:
- Fixes Qwen vLLM compatibility issue completely
- Enables history reference feature to work correctly
- Reduces token usage by eliminating duplicate system messages
- Does not break any functionality - system context from DB is already in compressed_summary
- Cleaner message structure with exactly one system message at position 0
Testing:
- Verified with Qwen model via vLLM - no more template errors
- Chat with memory files (PROFILE.md/SUMMARY.md) works correctly
- Chat with conversation history works correctly
- History reference (@reference) now works correctly
- Conversation continuation works without errors
- No regression with other models (GPT-4, etc.)
Closes#294
Persist structured quiz mistakes on submission and expose them in a
new review page accessible from the utility sidebar.
Backend:
- New wrong_answers SQLite table (cascade on session delete) with
add/list/count/update/delete store methods
- Hook POST /api/v1/sessions/{id}/quiz-results to also insert one row
per incorrect answer, preserving the existing [Quiz Performance]
text message consumed by the LLM context builder
- New GET /api/v1/wrong-answers (resolved filter + pagination),
PATCH /{id} (resolved toggle), DELETE /{id}
Frontend:
- New /wrong-answers page under the (utility) route group with
unresolved/all filter, mark-as-resolved, delete, and session link
- Sidebar nav entry using the NotebookPen icon
- English and Chinese i18n strings for all new UI text
Tests:
- 8 store tests covering filter, cascade, resolved toggle, delete
- 6 router tests including a regression test that record_quiz_results
still writes the [Quiz Performance] text message
- Remove CONSOLIDATION_TYPES and explicit consolidation parameter;
auto-consolidate for providers without native answer support.
- Build LLM/Embedding/Search configs directly from resolved runtime
config in ConfigTestRunner instead of relying on global cache.
- Clean up default settings by removing unused consolidation fields.
Made-with: Cursor
- Modified _get_template_for_provider() to return None instead of raising ValueError
- Added _format_simple_results() as provider-agnostic fallback formatter
- Modified _consolidate_with_template() to use fallback when no template exists
- Fixes searxng (and other providers) failing with 'no template consolidation available' error
Merge oxkage's embedding progress tracking and HTTP 429 rate limit
retry (PR #268), with the following review-driven improvements:
- Restore default batch_size=10 and request_timeout=60 to avoid
performance regression for non-free-tier users
- Promote batch_delay to EmbeddingConfig (was private adapter attr)
so all adapters respect user configuration instead of hardcoded 0.5s
- Use set_progress_callback() on existing embed model instead of
creating a new CustomEmbedding instance (avoids global state mutation)
- Clean up progress callback in finally blocks to prevent leaking
into subsequent search/query calls
- Wire progress_callback through add_documents (not just initialize)
- Remove dead HTTPStatusError 429 branch (already handled before
raise_for_status)
- Remove unused total_docs variable in initializer
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