Repository navigation
Closed
Labels
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/aiAI review pipeline, personas, prompts, LLM client, or RAGtype/bugType bug: the code does not do what it must
Milestone
Description
Problem
A review against a gateway whose backends serve only the review model asks for the embedding model again and again, and every request fails. The owner's setup (2026-10-02) does exactly that:
- Every backend serves
devops-review, and Ollama loads one model. - The gateway routes
bge-m3:latesttoollama-16gibandollama-24gib, the same nodes that served review traffic in session 20261001-224227. ai.tasks.embeddingpoints at the gateway withbge-m3:latest.
Reproduced offline: _collect_rag_verification_blocks over five findings, with Qdrant reachable and the embeddings endpoint returning HTTP 400 for bge-m3:latest, gives:
- five embedding requests, one per finding, each logging
WARNING OpenAI embeddings failed: OpenAI embeddings HTTP 400: … Using fallback. - context blocks, built from a Qdrant search run with a hash vector rather than an embedding.
Cause
-
No memory of the failure. Every RAG lookup sends a fresh embedding request, and only the query text is cached:
- verification, per finding (
ai/review/verification.py,_collect_rag_verification_blocks); - payloads, per file (
ai/review/pipeline.py:1240); - pre-analysis (
ai/analyze/outlines.py); - each persona agent prompt (
ai/agents/agent.py).
On a node that loads one model, a request for an embedding model that is installed there can also evict the review model.
- verification, per finding (
-
A failed embedding becomes a fake vector.
EmbeddingsEngine._embed_openaiand the Ollama path (_embed_batch_with_subdivision) return_deterministic_fallback, a hash of the text, instead of failing._dispatch_embeddoes the same when no provider is configured.- Retrieval then searches Qdrant with noise and can hand unrelated chunks to the verifier as context.
- Ingestion (
devops rag ingest,devops ai ingest) would store the same noise.
Acceptance criteria
- No fallback. Embeddings either come from a model or raise
EmbeddingsError, which names the model, the endpoint or nodes, and the HTTP status or error._deterministic_fallback,EmbeddingVectorandEmbeddingListare deleted, with no shim. - Retrieval fails clearly. A query that cannot be embedded raises from
SemanticRetriever.search/retrieve_context. The builtin RAG tool returns a message naming the failure, as it does when Qdrant is unreachable. - RAG stops for the run. The first
EmbeddingsErrorininvestigate_rag_contextturns RAG off for the rest of the process. It logs one WARNING (text inlang/en) naming the model and the error, and saying how to fix it: serve the model, pointai.tasks.embeddingat a backend that serves it, or setai.rag.enabled: false. Later calls returnNonewithout building a retriever or sending a request.clear_investigation_cache()resets this. - Tests, offline:
- Five findings make at most one embedding request and produce no context blocks:
tests/test_review_embeddings_unserved.py, written first, which fails on today's code. - Exactly one warning is logged.
- The Ollama path raises after every node fails.
- No provider configured raises.
- Five findings make at most one embedding request and produce no context blocks:
uv run devops cipasses.
Key questions
- Keep RAG in reviews at all? Yes (proposed). It is still opt-out with
ai.rag.enabled: false, and the run-wide stop limits a broken embedding setup to one request per run. - Drop the fallback, or only keep it out of retrieval? Drop it (proposed). It also writes noise into Qdrant on ingestion, and pre-1.0 takes no shims.
Metadata
Metadata
Assignees
Labels
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/aiAI review pipeline, personas, prompts, LLM client, or RAGtype/bugType bug: the code does not do what it must
Type
Projects
- StatusShow more project fieldsDone
Activity
fix(ai): reviews ask an unserved embedding model once and never searc…
dan-petty commentedon Oct 2, 2026
Closed by #971, merged into
release/v0.2.25.GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by
devops gh issues close-merged.feat(release): v0.2.25 (#1089)