Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

docs(embedding-providers): correct llama-server batch-cap row (#5121)

time-attack0d5e179930d2
diff --git a/docs/integrations/embedding-providers.md b/docs/integrations/embedding-providers.md
index d65e059606..b0fa9afdec 100644
--- a/docs/integrations/embedding-providers.md
+++ b/docs/integrations/embedding-providers.md
@@ -228,7 +228,7 @@ Two env vars tune how bulk embeds (`gbrain embed --stale` and the autopilot/mini
| Env var | Default | What it does |
|---|---|---|
| `GBRAIN_EMBED_QUARANTINE_AFTER` | 3 | Consecutive zero-progress attempts (no chunk embedded) before a page is quarantined for the rest of the process. An attempt that embeds ANY chunk resets the page's counter — partial progress shrinks the stale set, so the next pass sends a smaller request, not the identical doomed one. Quarantine is keyed per page (`source_id::slug`) and announced once on stderr; later passes skip quarantined pages with a count. Process-lifetime by design: restarting retries deliberately, and `frontmatter.embed_skip` is the permanent block. Non-numeric or non-positive values fall back to 3. |
-| `GBRAIN_EMBED_MAX_BATCH_TOKENS` | (unset) | Token cap per embedding request for recipes that ship without one — ollama, llama-server, lmstudio, and litellm declare `no_batch_cap` because real capacity depends on the operator's server. When set, chunk texts are pre-split into sub-batches within `cap × safety_factor` (default 0.8) tokens, estimated via the recipe's `chars_per_token` (default 4). A recipe-declared cap always wins; invalid values are ignored. Read once from the environment at process start, never at call time. Without it, `no_batch_cap` recipes still get a conservative 16-item sub-batch cap so the per-call embed timeout bounds a fixed amount of work. |
+| `GBRAIN_EMBED_MAX_BATCH_TOKENS` | (unset) | Token cap per embedding request for recipes that ship without one. ollama, lmstudio, and litellm declare `no_batch_cap` because real capacity depends on the operator's server; llama-server declares no token cap either, so the env cap applies to it too. When set, chunk texts are pre-split into sub-batches within `cap × safety_factor` (default 0.8) tokens, estimated via the recipe's `chars_per_token` (default 4). A recipe-declared cap always wins; invalid values are ignored. Read once from the environment at process start, never at call time. Without it, `no_batch_cap` recipes still get a conservative 16-item sub-batch cap so the per-call embed timeout bounds a fixed amount of work. llama-server is not a `no_batch_cap` recipe: it ships `max_batch_items: 32` (its launch `--batch-size` default), so it gets that item cap rather than the 16-item fallback. The `chars_per_token` estimate is tuned for English; CJK text usually tokenizes far denser (often close to one token per character), so the default estimate can undercount several-fold. Set the cap with headroom against your model's real tokenizer. The pre-splitter never splits an individual text, so one oversized input is still sent whole; llama-server returns an error for a single embedding input larger than its physical batch (`-ub`, see [llama.cpp #7389](https://github.com/ggml-org/llama.cpp/pull/7389)). Raise `-ub` or lower your chunk size if long chunks fail. |
## My provider isn't listed