Skip to main content

Module runtime_config

Module runtime_config 

Source
Expand description

Runtime config: flag > XDG > default (no product env) — G-T-XDG-04. Runtime configuration resolved without product environment variables.

Precedence (G-T-XDG-04 / plan v4): CLI flag > XDG config set > named default. Product SQLITE_GRAPHRAG_* / OPENROUTER_* env vars are not read for config. OS env allowed only for process identity: HOME, PATH, XDG_*, locale, NO_COLOR.

Structs§

RuntimeOverrides
Process-wide overrides captured once from CLI flags at bootstrap.

Functions§

claude_binary
codex_binary
embedding_dim_override
Embedding dim: CLI override > XDG embedding.dim > None (caller uses DB/default).
get
Borrow installed overrides (empty defaults if init was skipped — tests).
init
Install CLI-captured overrides. Idempotent first-wins (main bootstrap).
llm_fallback
llm_max_host_concurrency
Host concurrency for LLM slots.
llm_model
llm_probe_timeout_ms
Probe timeout for fail-fast LLM backend readiness (ms).
llm_slot_no_wait
llm_slot_wait_secs
log_format
log_level
max_entities_per_memory
max_relations_per_memory
opencode_binary
openrouter_chat_url
OpenRouter chat URL: XDG override or compile-time default. Canonical key: network.openrouter.chat_url; alias: network.chat_url.
openrouter_embeddings_url
OpenRouter embeddings URL: XDG override or compile-time default. Canonical key: network.openrouter.embeddings_url; alias: network.embed_url.
resolve_bool
Bool: CLI true wins; else XDG “1”/“true”/“yes”; else default.
resolve_f64
Parse f64 from flag > XDG > default.
resolve_optional_string
flag_opt > XDG setting > None.
resolve_string
flag_opt > XDG setting > default.
resolve_u64
Parse u64 from flag > XDG > default.
resolve_usize
Parse usize from flag > XDG > default.
skip_embedding_on_failure
Skip embedding on failure: runtime flag or XDG.