What I want
I want to use Vertex AI Gemini 2.5Flash but wanna disable the thinking function.
Currently it seems the thinkingBudget is active in default.
situation
My code is below. I thought the thinkingBudget will be 0 with this.
But in a current Gemini response, I found this↓↓
"usageMetadata": { "thoughtsTokenCount": 8192 }
I think this means the thinking mode is active, I need to disable it, It will be huge difference in cost.
How Can I do that??
import { VertexAI } from "@google-cloud/vertexai";
return this.vertexAI.getGenerativeModel({
model: "gemini-2.5-flash-preview-04-17",
generationConfig: {
responseMimeType: "application/json",
temperature: 0,
maxOutputTokens: 8192,
},
});
What I did
I read these official document and the code of “vertexAI.getGenerativeModel”.
And there was no writing part about how to disable thinkingBudget.
Thank you for your help