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§

PathOverrides
Directory overrides installed BEFORE anything reads config.toml.
RuntimeOverrides
Process-wide overrides captured once from CLI flags at bootstrap.

Functions§

cache_dir_override
CLI --cache-dir > XDG cache.dir > None (caller applies the OS default).
claude_binary
Claude binary.
codex_binary
Codex binary.
config_dir_override
CLI --config-dir only.
db_busy_base_delay_ms
Base backoff for the first SQLITE_BUSY retry, from XDG db.busy_base_delay_ms.
db_busy_retries
SQLITE_BUSY retry budget, from XDG db.busy_retries.
db_query_timeout_ms
Per-statement query timeout, from XDG db.query_timeout_ms.
embedding_batch_size
Embedding batch size, from XDG embedding.batch_size.
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).
init_paths
Install directory overrides. Idempotent first-wins.
llm_fallback
LLM fallback.
llm_max_host_concurrency
Host concurrency for LLM slots.
llm_model
LLM model.
llm_probe_timeout_ms
Probe timeout for fail-fast LLM backend readiness (ms).
llm_slot_no_wait
LLM slot no wait.
llm_slot_wait_secs
LLM slot wait secs.
log_format
Log format.
log_level
Log level.
max_entities_per_memory
Max entities per memory.
max_relations_per_memory
Max relations per memory.
opencode_binary
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.
rayon_threads
Worker count for the global Rayon pool, from XDG parallelism.rayon_threads.
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.