diff --git a/.env.example b/.env.example index c1a1f06e67..0e3c3c08fb 100644 --- a/.env.example +++ b/.env.example @@ -1788,6 +1788,13 @@ APP_LOG_TO_FILE=true # SEMANTIC_CACHE_MAX_BYTES=4194304 # Max total cache size in bytes (default: 4 MB) # SEMANTIC_CACHE_TTL_MS=1800000 # Cache entry TTL (default: 30 minutes) +# ── Local corpus index cache ── +# How many local-corpus roots keep a live in-memory index at once. The cache is +# LRU: reaching the limit evicts the least-recently-used root's index, which is +# then rebuilt on its next query. Clamped to a minimum of 1; a non-numeric value +# falls back to the default. Used by: src/lib/localCorpus/configured.ts +# OMNIROUTE_CORPUS_CACHE_SIZE=5 + # ── In-memory log buffers ── # Maximum recent stream events kept in memory for the Dashboard live view. # STREAM_HISTORY_MAX=50 diff --git a/changelog.d/maintenance/11576-corpus-cache-size-env-doc.md b/changelog.d/maintenance/11576-corpus-cache-size-env-doc.md new file mode 100644 index 0000000000..97f96e6ca1 --- /dev/null +++ b/changelog.d/maintenance/11576-corpus-cache-size-env-doc.md @@ -0,0 +1 @@ +- **docs(env):** document `OMNIROUTE_CORPUS_CACHE_SIZE` in `.env.example` and `ENVIRONMENT.md`, so the env/docs contract check stops failing Docs Gates on every branch ([#11576](https://github.com/diegosouzapw/OmniRoute/pull/11576)) diff --git a/docs/reference/ENVIRONMENT.md b/docs/reference/ENVIRONMENT.md index b383b5696f..0e6f310e06 100644 --- a/docs/reference/ENVIRONMENT.md +++ b/docs/reference/ENVIRONMENT.md @@ -873,6 +873,7 @@ The logging system writes to both stdout and rotated log files. All configuratio | `SEMANTIC_CACHE_MAX_SIZE` | `100` | Max cached temperature=0 responses. | | `SEMANTIC_CACHE_MAX_BYTES` | `4194304` (4 MB) | Max total semantic cache size. | | `SEMANTIC_CACHE_TTL_MS` | `1800000` (30 min) | Semantic cache entry TTL. | +| `OMNIROUTE_CORPUS_CACHE_SIZE` | `5` | Local-corpus roots that keep a live in-memory index at once (`src/lib/localCorpus/configured.ts`). LRU: at the limit the least-recently-used root's index is evicted and rebuilt on its next query. Clamped to a minimum of `1`; a non-numeric value falls back to the default. | | `STREAM_HISTORY_MAX` | `50` | Max recent stream events in the Dashboard live view buffer. | | `CONTEXT_LENGTH_DEFAULT` | `128000` | Global fallback max context length for models without explicit config. | | `USAGE_TOKEN_BUFFER` | `100` | Extra token headroom reserved when tracking usage quotas. |