openhuman icon indicating copy to clipboard operation
openhuman copied to clipboard

Local AI inference completely broken: bootstrap reports "cannot execute models" while diagnostics report "all checks passed" — Rust core silently drops requests

Open gestore-cpu opened this issue 6 months ago • 0 comments

Summary

The Local AI inference pipeline on v0.54.0 Beta is non-functional on macOS even when Ollama and all required models are correctly installed and operational. The app shows a clear internal contradiction: the Ollama diagnostics panel reports "Tutti i controlli superati" (all checks passed) with all expected models present (Chat, Embedding, Vision optional), while the Runtime Status panel on the same screen reports "Configured Ollama runtime is reachable but cannot execute models. Restart the external runtime and retry."

Direct test calls from the UI Esegui test riassunto / local_ai.ops.local_ai_summarize) reach the prompt injection detector successfully verdict=allow), but no downstream call to Ollama is ever made — the request is silently dropped with no log entry, no error, no timeout, no UI feedback. The button visually resets to idle state with no output.

As a downstream effect, the memory tree pipeline never ingests any vault files: mem_tree_chunks = 0, mem_tree_ingested_sources = 0 despite 1047 files correctly synced into two registered vaults. All parse_document log lines show model=heuristic-only, never the configured LLM extractor.

Environment

  • App version: v0.54.0 Beta
  • OS: macOS (Apple Silicon)
  • Ollama version: 0.24.0 (via Homebrew, binary at /opt/homebrew/bin/ollama)
  • Ollama server: running on http://localhost:11434, confirmed reachable
  • Installed Ollama models (all verified via ollama list and ollama run):
    • gemma3:4b (3.3 GB)
    • gemma3:1b-it-qat (1.0 GB)
    • bge-m3:latest (1.2 GB)
    • all-minilm:latest (45 MB)
  • GPU: Metal, model verified loaded with 100% GPU via ollama ps
  • Cloud backend connectivity: confirmed working curl https://api.tinyhumans.ai/health → {"status":"ok"})

Steps to reproduce

  1. Fresh install of OpenHuman v0.54.0 Beta
  2. Install Ollama via Homebrew, ensure it's running brew services start ollama)
  3. Pull required models:
    ollama pull gemma3:4b
    ollama pull gemma3:1b-it-qat
    ollama pull bge-m3
    
  4. Open OpenHuman → Settings → Local Model Debug
  5. Run "Esegui diagnostica" → confirms all models present, all checks passed
  6. Scroll to "Test riassunto", paste any text, click "Esegui test riassunto"
  7. Observe: button visually resets without any output, no error, no log
  8. Check ~/.openhuman/logs/openhuman..log — no Ollama call recorded after the prompt-injection detector verdict

Observed evidence

Contradiction within the Local Model Debug page (single screen, same moment)

Top panel — "Stato runtime":

Stato: Needs Attention
Configured Ollama runtime is reachable but cannot execute models.
Restart the external runtime and retry.

Bottom panel — "Diagnostica Ollama":

🟢 Tutti i controlli superati
Server: In esecuzione, http://localhost:11434
✓ Chat: gemma3:1b-it-qat
✓ Embedding: bge-m3

Bootstrap log on every app start

Every restart of the app produces (timestamps from multiple sessions today, all reproducible):

WRN [local_ai] bootstrap degraded: external runtime connectivity check failed:
     Configured Ollama runtime is reachable but cannot execute models.
     Restart the external runtime and retry.
    bootstrap.rs:305
WRN [local_ai] Ollama server responds but runner is broken
    ollama_admin.rs:36
INF [services] local AI bootstrapped after login

Note that this happens after Ollama has been confirmed working via ollama run gemma3:4b "ok" and after the diagnostic panel confirms all checks passed. Restarting Ollama brew services restart ollama) and restarting the app does not change the outcome.

Silent request drop in local_ai_summarize

After clicking "Esegui test riassunto" with a 545-char input, the log shows exactly one related line:

INF:detector [prompt_injection] detection verdict
   source="local_ai.ops.local_ai_summarize"
   request_id="unknown" user_id="unknown" session_id="local_ai"
   verdict="allow" score=0.0 prompt_chars=545

And then nothing. No call to Ollama, no inference attempt, no error, no timeout. The next log entry, ~70 seconds later, is the unrelated periodic tree_global::recap job. The request is dropped silently between the detector and the inference layer.

Downstream impact on memory tree

sqlite3 ~/.openhuman/users/<uid>/workspace/memory_tree/chunks.db \
  "SELECT COUNT(*) FROM mem_tree_chunks;
    SELECT COUNT(*) FROM mem_tree_ingested_sources;"
chunks: 0
sources: 0

despite both registered vaults reporting "synced" status:

  • synthia-drive — 117 files synced
  • mercury-vault — 931 files synced

All parse_document entries in the log show model=heuristic-only, never the configured llm_extractor_model = "gemma3:4b" from config.toml. The tree_source::summariser does log using LlmSummariser provider=local:ollama:gemma3:4b model=gemma3:4b at intervals, but produces no actual output, and the L0 buffer queue stays at zero forever Building summary trees · 0 buffer(s)).

Relevant config (excerpts from config.toml)

[memory_tree]
embedding_timeout_ms = 10000
embedding_strict = false
llm_extractor_endpoint = "http://localhost:11434"
llm_extractor_model = "gemma3:4b"
llm_extractor_timeout_ms = 15000
llm_summariser_endpoint = "http://localhost:11434"
llm_summariser_model = "gemma3:4b"
llm_summariser_timeout_ms = 120000
llm_backend = "cloud"
cloud_llm_model = "summarization-v1"

Things I verified to rule out external causes

  • ✅ Ollama is running pgrep ollama returns the serve process)
  • ✅ Ollama is reachable on localhost:11434 curl http://localhost:11434/api/tags returns 200 with the full model list)
  • ✅ ollama run gemma3:4b "ok" returns a valid completion in <2s with the model on Metal GPU
  • ✅ ollama ps shows the model loaded, 100% GPU, context 32768
  • ✅ Cloud backend api.tinyhumans.ai is reachable and responsive curl /health → 200)
  • ✅ No firewall, VPN, or proxy on the machine
  • ✅ All four "expected" models per the diagnostic panel are installed
  • ✅ Fresh DB state attempted: deleted workspace/memory_tree/chunks.db and workspace/memory/memory.db* to force re-ingestion — no change
  • ✅ Multiple full app restarts and Ollama service restarts attempted in sequence — no change

Suspected root cause

There appear to be (at least) three separate internal subsystems checking Ollama, and they don't agree:

  1. ollama_admin.rs:36 — used by bootstrap, returns "runner is broken"
  2. Diagnostics panel — returns "all checks passed"
  3. local_ai.ops.local_ai_summarize — accepts the request, runs prompt injection check, then silently drops it

The user-facing impact is total: no LLM-backed feature works (memory tree ingestion stuck on heuristic, summariser never produces output, direct test buttons in Debug panel don't fire), even though Ollama is fully operational and the app's own diagnostic agrees.

This is distinct from #2244 / #2742 (Web Search toggle) and #2263 / #2744 (search runtime), and appears to be a deeper inconsistency in the local-AI inference layer of v0.54.0 Beta.

Logs

Full daily log available on request. The most diagnostic snippet is the single prompt_injection detector line on local_ai.ops.local_ai_summarize followed by silence — happy to share the full file or any specific time window.

gestore-cpu avatar May 27 '26 15:05 gestore-cpu