LLMRouter.embed(): surface actionable error when Ollama model is not pulled #60
Labels
No labels
architecture
backlog
enhancement
module:documents
module:hardware
module:manage
module:pipeline
module:voice
priority:backlog
priority:high
priority:medium
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Circuit-Forge/circuitforge-core#60
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
When
LLMRouter.embed()is called with an Ollama backend and the configured embedding model has not been pulled, the error surfaces as:This is opaque. The user has no idea that the fix is
ollama pull nomic-embed-text.Desired behaviour
Before calling the Ollama embedding endpoint, do a lightweight pre-flight check against
GET /api/tags(already reachable since_is_reachable()hits Ollama). If the configuredembedding_modelis not in the tags list, raise aRuntimeErrorwith an actionable message:This check should be fast (one cached HTTP call) and only happen on the first embed attempt.
Context
Discovered while debugging pagepiper cloud ingest. Ollama was running and had many models but not the configured embed model. Took several round-trips to diagnose.
Related: the graceful-degradation pattern in pagepiper
ingest_pdf.py/ingest_epub.pycatches thisRuntimeErrorand continues BM25-only, logging the actionable message from above. A good error string here directly improves the log output operators see.Labels