docs: document REASONING_SUMMARY env flag#2290
Conversation
The reasoning-summary feature is already gated behind the REASONING_SUMMARY config value (textGeneration/generate.ts) and is off unless it is set to "true", but the flag was not documented in .env or the configuration docs, so there was no discoverable way to know it exists or that it can be left disabled. Document it in .env (new "Reasoning" section) and in the configuration overview, making clear it is opt-in and issues extra LLM calls when enabled. Closes huggingface#1720
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 08260e6493
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| REASONING_SUMMARY=true | ||
| ``` | ||
|
|
||
| This issues additional LLM calls (using `TASK_MODEL` if set, otherwise the conversation model), so it is **disabled by default**. Leave it unset or empty to keep reasoning summaries off. |
There was a problem hiding this comment.
Correct the model used for reasoning summaries
When REASONING_SUMMARY=true, these periodic summary calls do not honor TASK_MODEL: generate.ts calls generateSummaryOfReasoning(reasoningBuffer, model.id, locals), and generateFromDefaultEndpoint chooses the supplied modelId before falling back to taskModel, so the conversation model is used whenever it is in the model list. This documentation can mislead operators who set TASK_MODEL to a cheaper or less rate-limited model and then enable the flag expecting the extra calls to go there.
Useful? React with 👍 / 👎.
Problem
Issue #1720 asks for a way to disable the reasoning-summary feature (e.g. to avoid the extra rate-limited LLM calls it makes).
That control already exists: in
src/lib/server/textGeneration/generate.ts, the periodic reasoning summary is only generated whenREASONING_SUMMARY === "true", so it is off by default. The problem is purely discoverability —REASONING_SUMMARYis read viaReflect.get(config, "REASONING_SUMMARY")and is not documented in.envor the configuration docs, so users have no way to know it exists or that it can be left disabled.Closes #1720.
Changes
.env: add a new## Reasoningsection documentingREASONING_SUMMARY, noting it is opt-in and issues additional LLM calls when enabled.docs/source/configuration/overview.md: add a## Reasoningsection describing the flag.No behaviour change — this documents the existing flag and makes it clear it can be left unset/empty to keep reasoning summaries off.
Testing
npx prettier --checkpasses on both changed files.