disableGeminiThoughtSummaries
disableGeminiThoughtSummaries<
T>(model):T
Defined in: packages/core/src/providers/geminiThinking.ts:97
The inverse, for a surface that must not receive thought summaries at all: keep whatever thinking
budget or level applies and force includeThoughts: false, so the model still thinks and only the
summary is withheld. Never express this as a zero/minimal budget — that turns THINKING off, which
is a different and much larger change, and the coercion differs between the 2.5 and 3.x presets.
This exists for any consumer that routes content blocks by type without going through gsloth’s
own reasoning bridge: Gemini’s thought summary is typed text exactly like an answer block, so
such a consumer has no way to tell them apart and prints the thinking as the assistant’s answer.
Not asking for the summary is the only thing that reliably stops that; nothing is stripped, so the
message kept in graph state (and any thoughtSignature riding on it) is untouched. Returns the
same instance.
No production module calls it today (only its spec does). It is kept as published API —
providers/geminiThinking.js is a public deep-import path — and because a parent reading a child
agent’s stream needs exactly this; that is the lean subagent primitive (GS2-25).
It applies to EVERY model family, including the image/tts ones the enable path skips: those are
precisely where @langchain/google sets includeThoughts: true itself once a budget or level is
configured, so a shared “does this model produce summaries?” guard would let exactly those
summaries through. What it will not do is INTRODUCE a thinking config where the library built
none — a request that carries no thinkingConfig gets no summary anyway (that is the whole
premise of applyGeminiThoughtSummaries), and adding the field to a model family the
library withholds it from would send something it deliberately did not.
Type Parameters
Section titled “Type Parameters”T extends BaseChatModel<BaseChatModelCallOptions, AIMessageChunk<MessageStructure<MessageToolSet>>>
Parameters
Section titled “Parameters”T
Returns
Section titled “Returns”T