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§

agent_surface_max_items
GAP-SG-142: cap on emitted result elements, from --max-items or XDG agent_surface.max_items.
agent_surface_max_output_bytes
GAP-SG-142: cap on the serialized envelope in bytes, from --max-output-bytes or XDG agent_surface.max_output_bytes. 0 disables the ceiling.
agent_surface_truncate_content
GAP-SG-142: cap on string length in characters, from --truncate-content or XDG agent_surface.truncate_content. 0 disables truncation.
cache_dir_override
CLI --cache-dir > XDG cache.dir > None (caller applies the OS default).
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.
embed_runtime_worker_threads
Worker count for the shared embedding Tokio runtime, from XDG parallelism.embed_runtime_threads (GAP-SG-141 B2).
embedding_backend
Embedding backend: CLI --embedding-backend > XDG embedding.backend > auto.
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).
embedding_model
Embedding model: CLI --embedding-model > XDG embedding.model > None.
enrich_circuit_breaker_reset_secs
Cooldown of a tripped per-worker circuit breaker, from XDG enrich.circuit_breaker_reset_secs.
enrich_scan_page_size
GAP-SG-185: keyset page size for enrich scan collectors.
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_backend
LLM backend for embedding: CLI --llm-backend > XDG llm.backend > open-router.
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.
no_input
Whether this invocation refuses to read stdin: CLI --no-input > XDG cli.no_input > false.
openrouter_chat_timeout_secs
Effective OpenRouter CHAT budget in seconds: --openrouter-timeout, then XDG llm.openrouter_timeout_secs, then default.
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.
openrouter_timeout_override
CLI --openrouter-timeout as passed, with no XDG or constant layered on.
rate_limit_deadline_secs
Deadline a drain keeps absorbing provider rate limits, from XDG enrich.rate_limit_deadline_secs.
rayon_threads
Worker count for the global Rayon pool, from XDG parallelism.rayon_threads.
reembed_claim_batch
GAP-SG-141 (B1): how many ReEmbed queue rows one claim takes, from XDG enrich.reembed_claim_batch.
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.
stdin_timeout_secs
Deadline for reading a body from stdin, from XDG cli.stdin_timeout_secs.