ulysses/src
LittleLlama 7e7e441fec
Re-enable VectorRAG init with lazy retry
Personal Docs (POST /api/personal/add_directory and friends) currently
returns HTTP 503 'RAG system is not available' for every request,
because get_rag_manager() and rag_manager are both hardcoded off. The
disablement was added when chromadb 1.4.1 / pydantic 2.12 were mutually
incompatible at the client init layer.

That compat issue is fixed in the current pins (chromadb 1.5.x +
pydantic 2.13.x). Verified by calling the original lazy initializer
against a running chroma server — VectorRAG instantiates, reports
healthy=True, and indexes successfully.

This change:

1. src/rag_singleton.py — replace the hardcoded `return None` in
   get_rag_manager() with the original lazy init body. Keeps the
   30s retry-throttle so a missing chroma server doesn't busy-retry
   on every request.

2. app.py — replace the parallel `rag_manager = None` /
   `rag_available = False` hardcoding with a get_rag_manager() call.
   Logs the resolved state at startup. If chroma isn't reachable yet,
   rag_manager stays None and personal-doc routes still return 503,
   but the *next* request will hit the retry-throttle path in
   get_rag_manager() and try to init again.

Doesn't touch requirements.txt. Repos using docker-compose get chroma
automatically; manual installs that want Personal Docs to work still
need to either pip install chromadb (full package) and run `chroma run`
or point at an external chroma instance via env. That can be a
follow-up README / requirements-optional note.
2026-06-01 14:32:13 +09:00
..
search Odysseus v1.0 2026-05-31 23:58:26 +09:00
agent_loop.py feat(ai): add OpenRouter and Ollama Cloud providers (#231) 2026-06-01 14:26:10 +09:00
agent_runs.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
agent_tools.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
ai_interaction.py feat(ai): add OpenRouter and Ollama Cloud providers (#231) 2026-06-01 14:26:10 +09:00
api_key_manager.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
app_helpers.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
app_initializer.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
assistant_log.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
auth_helpers.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
bg_jobs.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
bg_monitor.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
builtin_actions.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
builtin_mcp.py Fix NPX MCP server crash (skip if not installed, alternative shape to #242 / #252) (#253) 2026-06-01 14:23:19 +09:00
caldav_sync.py Fix duplicate CalDAV sync UIDs 2026-06-01 02:17:43 +00:00
chat_handler.py Recognize local vision models so their images aren't dropped (#185) 2026-06-01 13:09:21 +09:00
chat_helpers.py Recognize local vision models so their images aren't dropped (#185) 2026-06-01 13:09:21 +09:00
chat_processor.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
chroma_client.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
cleanup_service.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
config.py Align SearXNG fallback URL 2026-06-01 10:50:07 +09:00
constants.py Align SearXNG fallback URL 2026-06-01 10:50:07 +09:00
context_compactor.py Preserve large pasted messages in context 2026-06-01 12:38:35 +09:00
database.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
deep_research.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
document_actions.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
document_processor.py Fix vision attachment timeout and stale cache 2026-06-01 02:04:46 +00:00
email_thread_parser.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
embeddings.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
endpoint_resolver.py feat(ai): add OpenRouter and Ollama Cloud providers (#231) 2026-06-01 14:26:10 +09:00
event_bus.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
exceptions.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
goal_based_extractor.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
integrations.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
llm_core.py feat(ai): add OpenRouter and Ollama Cloud providers (#231) 2026-06-01 14:26:10 +09:00
mcp_manager.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
memory.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
memory_vector.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
model_context.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
model_discovery.py Improve Ollama setup and model endpoint handling 2026-06-01 10:00:15 +09:00
pdf_form_doc.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
pdf_forms.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
personal_docs.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
preset_manager.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
prompt_security.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
rag_manager.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
rag_singleton.py Re-enable VectorRAG init with lazy retry 2026-06-01 14:32:13 +09:00
rag_vector.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
rate_limiter.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
request_models.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
research_handler.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
research_utils.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
secret_storage.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
session_actions.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
settings.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
task_endpoint.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
task_scheduler.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
teacher_escalation.py harden(teacher): treat escalation trace as untrusted data (#275) 2026-06-01 14:31:39 +09:00
text_helpers.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
tool_execution.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
tool_implementations.py Fix YEARLY recurring CalDAV events only showing on DTSTART year (#179) 2026-06-01 13:42:44 +09:00
tool_index.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
tool_parsing.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
tool_schemas.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
tool_security.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
topic_analyzer.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
upload_handler.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
visual_report.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
webhook_manager.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
youtube_handler.py Odysseus v1.0 2026-05-31 23:58:26 +09:00