When the persisted ``status`` in ``kb_config.json`` is still a "live"
sentinel (``processing`` / ``initializing``) but a flat ``version-N``
directory on disk is already ready, ``get_info()`` previously returned
``status="processing"`` because the elif chain had no branch to recover
the case. The UI therefore showed a perpetual "Processing…" banner even
though the KB was fully usable.
This typically happens when the progress writer or worker process
crashes after the LlamaIndex version is finalised but before
``update_kb_status(name, "ready")`` rewrites kb_config.json — the
on-disk truth and the persisted status diverge.
Fix: in ``get_info``, after the existing ``effective_needs_reindex``
short-circuit, add a branch that promotes status to ``"ready"`` when:
- status is currently ``processing`` or ``initializing``,
- a ready ``version-N`` exists (``has_ready_llamaindex``),
- and the persisted progress stage is not ``error``.
The ``error`` guard preserves visibility of genuine indexing failures
when an older ready version still exists. The promotion clears the
stale progress banner to match the existing semantic in
``update_kb_status`` (where ready KBs drop progress).
The persistent ``kb_config.json`` is left untouched on read; the next
legitimate ``update_kb_status`` call cleans it up.
7 new tests in ``tests/knowledge/test_manager_get_info_status.py``
cover the headline #418 reproduction, the completed-stage variant, the
``initializing`` variant, and the negative cases (error stage, no ready
version yet, ready-status pass-through, mismatched-signature ->
needs_reindex precedence).
Stability release after v1.3.0 covering safer RAG/KB routing, stronger
embedding validation, more reliable Docker/TutorBot restarts, Web UX
fixes, and Windows/encoding hardening. See assets/releases/ver1-3-1.md
for the full notes.
Made-with: Cursor
* 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
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.
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