Thinking budget
I am trying to upgrade from Gemini-2.0-Flash to 2.5 flash but would like to disable thinking, however thinking budget doesn't seem to be available yet on Genkit. I have tried from the Google AI documentation but it doesn't seem to work on Genkit: config: { thinkingConfig: { thinkingBudget: 0, }, }
Thanks!
facing the same issue right now
So the past PR wasnt merged because of issues. Meaning this is still an open issue. I did see that thinking budget for Go was merged in https://github.com/firebase/genkit/pull/2846
@EduardWayland any clue what was wrong with your previous code?
So the past PR wasnt merged because of issues. Meaning this is still an open issue. I did see that thinking budget for Go was merged in #2846
@EduardWayland any clue what was wrong with your previous code?
Hi @rvh70, actually nothing was wrong with the PR itself. The issue was the behavior of the dashboard UI with those two new configuration options as shown in #2880. They would need to improve that first.
Anyway, you can still use those options by yourself, see #2848 (released with 1.8.0).
Thanks for that link to the 1.8.0 release! Still neet to get the hang of this package (and Genkit in general)
Trying to understand. SO, how to enable thinking budget for JS version of Genkit? Docs have no info.
Hey, this worked for me
const ai = new GoogleGenAI({ apiKey: "YOUR_KEY" });
const response = await ai.models.generateContent({
model,
contents,
config: {
...
thinkingConfig: { thinkingBudget: 8000 }
}
});
Thinking budget support landed shortly after this was filed. Config passthrough shipped in #2848 (released in 1.8.0), so the exact snippet from the original post, config: { thinkingConfig: { thinkingBudget: 0 } }, works to disable thinking on the 2.5 models. The current @genkit-ai/google-genai plugin also types thinkingConfig.thinkingBudget directly (0 disables thinking), and Go got the same in #2846. Closing as fixed.