OpenViking icon indicating copy to clipboard operation
OpenViking copied to clipboard

[Bug]: VLM/abstract-generation failures are silently swallowed — status healthy, queue 0 errors, retrieval degrades to ~99% zero-result

Open MODONG3110 opened this issue 2 months ago • 2 comments

Summary

When the configured VLM is unreachable (e.g. model not pulled in Ollama), abstract/overview generation fails for every ingested resource — yet ov status reports all components healthy, ov observer queue shows 0 errors in every queue, and nothing warns the operator. The deployment silently degrades: all resources end up with "No abstract available" / "Directory overview is not generated", and the retrieval zero-result rate climbs to ~99% with no visible cause.

Environment

  • OpenViking server 0.4.18 (local vectordb backend), openviking-sdk 0.1.10
  • Embedding: Ollama nomic-embed-text (768d) at http://127.0.0.1:11441/v1
  • VLM: Ollama llama3.2-vision at http://127.0.0.1:11441
  • Deployment: systemd user service, auth_mode=dev

What happened (our misconfiguration, but that's the point)

llama3.2-vision was configured in ov.conf but never actually pulled into Ollama. Every abstract/overview generation call then failed:

litellm.exceptions.APIConnectionError: OllamaException - {"error":"model 'llama3.2-vision' not found"}

This error appears 600+ times in the service journal. Meanwhile:

  • add_resource succeeded and resources were ingested normally (queue: AddResource processed 3, errors 0)
  • ov status → all components healthy (queue, vikingdb, models, retrieval, filesystem); models component even reports "VLM + embedding available"
  • ov observer queue → 0 errors in every queue (Embedding, Semantic, AddResource, SessionCommit, ...)
  • Every ingested file shows No abstract available; every directory shows [Directory overview is not generated]
  • Retrieval silently degraded: 93 queries, 98.9% zero-result rate — with no signal pointing at the dead abstract pipeline

The only way to discover the failure was to manually read the systemd journal and correlate it with the retrieval stats.

Why this matters

L0/L1 abstracts are the backbone of the layered-loading design — without them, retrieval is effectively blind. A missing/misconfigured VLM is probably one of the most common deployment mistakes (model name typo, Ollama not pulled, wrong api_base, VLM OOM). Today the system absorbs this failure completely silently, so operators can run for weeks believing memory works while every recall returns nothing.

Suggestions

  1. Startup validation: at server start, probe the configured VLM + embedding models with a minimal real call (e.g. 1-token completion / 1-embed). If unreachable, log a prominent warning and reflect it in ov status (component models → degraded, with the actual error).
  2. Count abstract-generation failures: route VLM/abstract task failures into the queue Errors column (or a dedicated counter) instead of swallowing them after retry.
  3. Health from outcomes, not just connectivity: the models component currently reports "VLM + embedding available" based on configuration/reachability; it should factor in recent call success rate.
  4. Retrieval anomaly surfacing: a sustained zero-result rate above a threshold (say >90% over N queries) deserves a warning in ov status, pointing operators at likely causes (missing abstracts, embedding mismatch).

Happy to provide full journal excerpts or test a patch on our deployment.

MODONG3110 avatar Sep 15 '26 00:09 MODONG3110

i'd like to take suggestion 2 as a first scoped PR: count the swallowed abstract/overview generation failures in the queue error accounting (the dag executor counts llm failures at the summary/overview fallback points, and on_dequeue returns ProcessResult.failed when every llm node in the run failed) plus a warning log. offline repro with a fake vlm raising APIConnectionError, extending the existing semantic tests. happy to treat suggestions 1, 3 and 4 as follow-ups once this lands

ptimizeroracle avatar Sep 15 '26 15:09 ptimizeroracle

Additional evidence from current OpenViking readiness behavior:

Verified on v0.4.23 and upstream commit 9d9bc85e. The relevant openviking/server/routers/system.py implementation is unchanged between them.

Current /ready behavior checks core dependencies such as AGFS, VectorDB, API-key-manager state, embedding-provider presence, and live Ollama connectivity when Ollama is configured.

Configured remote [OI]-compatible vlm / query_planner endpoints are not probed.

A minimal reproduction:

  1. Configure a remote vlm or query_planner with an unreachable api_base.
  2. Start OpenViking.
  3. GET /ready can still return HTTP 200 / ready.
  4. Exercise session-aware search or memory extraction.
  5. The model-dependent path fails or times out while readiness remains green.

We observed this operationally: /health and /ready remained healthy while remote VLM failures caused repeated memory-extraction timeouts and severe degradation of session-aware retrieval.

A lightweight authenticated:

GET {api_base}/models

with a short timeout was sufficient locally to distinguish a reachable backend from an unreachable gateway without performing generation or consuming model tokens.

I do not think remote-model availability necessarily has to make the entire Kubernetes pod NotReady. A separate model/dependency-health status, or configurable strict readiness, may be cleaner.

Also, simple reachability alone is insufficient for full validation because authentication failure or model-not-found conditions need different semantics.

This appears closely related to #5032's broader issue: model-backed functionality can be broken while operator-facing health remains green.

edynasty avatar Oct 04 '26 08:10 edynasty