You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(config): unify pageindex_max_concurrency + compile_concurrency into concurrency
PageIndex indexing and OpenKB's own concept/entity compilation never run
concurrently with each other for the same document (they're sequential
phases of one add), and both knobs exist for the exact same reason — the
user hit a provider rate limit or an fd ceiling. Splitting them by internal
subsystem leaked OpenKB's architecture into the config surface for no
practical benefit, since a user tuning one for a rate limit would set the
other to the same value anyway.
- Single `concurrency` config key (default null = each stage keeps its own
built-in default).
- config.resolve_concurrency(config) -> int | None: validates (rejects bool
and non-positive values with a warning), returns None on unset/invalid —
no default substitution inside; callers decide what None means for them.
- cli.py's compile call sites: `resolve_concurrency(config) or
DEFAULT_COMPILE_CONCURRENCY`.
- indexer.py's _build_index_config now routes through resolve_concurrency
(openkb validates before forwarding to PageIndex, rather than relying
solely on PageIndex's own future validator) instead of raw config.get.
- This also removes the prior dual-literal-default drift risk entirely:
there's no second numeric default to keep in sync, since an unset
`concurrency` simply forwards nothing to PageIndex and lets the compiler
use its own DEFAULT_COMPILE_CONCURRENCY.
- Updated config.yaml.example and examples/configuration/README.md (kept in
sync) to the single key.
# Optional: cap concurrent LLM calls during ingest (PageIndex indexing and
74
+
# concept/entity compilation — they never overlap, so one setting covers
75
+
# both). Lower it if you hit provider rate limits or "too many open files" on
76
+
# large PDFs. Omit to let each stage apply its own default.
77
+
# concurrency: 5
77
78
78
79
# Optional: override the entity-type vocabulary used for entity pages.
79
80
# Omit this key to use the default 7 types
@@ -100,8 +101,7 @@ pageindex_threshold: 20 # PDF pages threshold for PageIndex
100
101
|`model`|`gpt-5.4`| LLM used for all compile/query/chat work. |
101
102
|`language`|`en`| Language the wiki is written in. |
102
103
|`pageindex_threshold`|`20`| PDFs with this many pages **or more** take the long-doc (PageIndex) path; shorter ones go through the short-doc path. See [`pageindex-cloud/`](../pageindex-cloud/). |
103
-
|`pageindex_max_concurrency`|`null`| Caps concurrent indexing LLM calls PageIndex makes for a single long document. Lower it if you hit provider rate limits or "too many open files" on large PDFs. `null` lets PageIndex apply its own default. |
104
-
|`compile_concurrency`|`5`| Caps concurrent LLM calls OpenKB makes while generating concept/entity pages. Lower it if your LLM provider rate-limits. |
104
+
|`concurrency`|`null`| Caps concurrent LLM calls OpenKB makes during ingest — both PageIndex's indexing of a long document and OpenKB's own concept/entity compilation. The two never run at once for the same document, so one setting covers both. Lower it if you hit provider rate limits or "too many open files" on large PDFs. `null` lets each stage apply its own default. |
105
105
|`entity_types`| 7 defaults | Custom vocabulary for entity pages. `other` is always kept. |
106
106
|`litellm:`| – | A pass-through block for LiteLLM. See below. |
0 commit comments