Expand description
v1.0.84 (ADR-0042 / GAP-002): resolve and emit the LLM backend that
WOULD be invoked for embedding without actually spawning the
subprocess. Used by --dry-run-backend for CI audit and pre-flight
sanity-check of --llm-backend before long ingestion sessions.
The output is a compact JSON envelope on stdout. stderr carries the
human-friendly summary so operators can run sqlite-graphrag --dry-run-backend
without piping through jaq.
§Schema (dry-run-backend.schema.json)
{
"action": "dry_run_backend",
"backend": "codex|claude|none",
"binary": "/usr/local/bin/codex",
"model": "gpt-5.5",
"flavour": "codex|claude",
"chain": "claude",
"strict_env_clear": false
}§Implementation notes
- We deliberately do NOT depend on the private fields of
LlmEmbedding. The struct’sbinaryandflavourfields are private tocrate::extract::llm_embedding, so we re-probe the PATH here (cheap, idempotent) instead of forcing the core to addpub(crate)getters just for this audit path. modelcomes fromLlmEmbedding::model_label()which already exposes a stable public string of the form<flavour>:<model>. We strip the<flavour>:prefix to keep the schema flat.- When
--llm-backend noneis selected the envelope still emits the same shape with emptybinaryandmodel, so downstream pipelines can parse a single schema unconditionally.
Structs§
- DryRun
Backend Output - Compact JSON envelope emitted by
--dry-run-backend.
Functions§
- emit_
dry_ run_ backend - Resolve the LLM backend that would be used for embedding and emit
the JSON envelope. Returns
Err(AppError::Embedding)when the requested backend CLI is missing from PATH.