Expand description
LLM-based embedding backend (v1.0.76 default).
LlmEmbedding is the production embedding client. It wraps a single
headless invocation of claude code or codex and returns a 384-dim
f32 vector parsed from the LLM’s JSONL response.
The embedding model is the same multilingual-e5-small from before, but
the call now goes through the LLM’s tool-use protocol (no MCP, no hooks).
This is the single reason the binary is now one-shot: there is no daemon
to keep the model loaded, the LLM subprocess is spawned on demand and
killed when the response is parsed.
OAuth is the only supported credential path. The constructor rejects
ANTHROPIC_API_KEY / OPENAI_API_KEY in the environment — see
v1.0.69 (G31) OAuth-Only Enforcement.
Structs§
Enums§
Constants§
- EMBEDDING_
DIM - Dimensionality of the embedding space. Matches the previous
multilingual-e5-smallmodel output and thememory_embeddings.embeddingBLOB column size.
Functions§
- resolve_
real_ binary - Follows symlinks and shell-script shim
exectargets to find the real ELF binary. Shim wrappers (like~/.graphrag-shim/codex) can strip hardening flags; bypassing them is a security requirement.