We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b515c4 commit 62f6523Copy full SHA for 62f6523
libs/langchain-google-common/src/utils/gemini.ts
@@ -1378,10 +1378,14 @@ export function getGeminiAPI(config?: GeminiAPIConfig): GoogleAIAPI {
1378
}
1379
1380
// Add thinking configuration if explicitly set
1381
- if (typeof parameters.maxReasoningTokens !== "undefined") {
+ if (
1382
+ typeof parameters.maxReasoningTokens !== "undefined" &&
1383
+ parameters.maxReasoningTokens !== 0
1384
+ ) {
1385
ret.thinkingConfig = {
1386
thinkingBudget: parameters.maxReasoningTokens,
- includeThoughts: true,
1387
+ // TODO: Expose this configuration to the user once google fully supports it
1388
+ includeThoughts: false,
1389
};
1390
1391
0 commit comments