You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I realized that there was no way to specify the ThinkingBudget parameter when making requests to Gemini models. This limited the ability to control model reasoning steps. For Flash and Flash-Lite, this means I can't enable it either.
Referencing the Gemini API and looking at the curl example, we should an additional optional alongside specifying token size, temp etc. Below is the example:
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent?key=$GOOGLE_API_KEY" \
-H 'Content-Type: application/json' \
-X POST \
-d '{ "contents": [ { "parts": [ { "text": "Provide a list of 3 famous physicists and their key contributions" } ] } ], "generationConfig": { "thinkingConfig": { "thinkingBudget": 1024 # Thinking off: # "thinkingBudget": 0 # Turn on dynamic thinking: # "thinkingBudget": -1 } }}'
Support for ThinkingBudget: Add support in the codebase to allow users to specify ThinkingBudget for Gemini models via configuration or CLI.
Support for IncludeThoughts:* Add support for the the IncludeThoughts flag to make troubleshooting if thinking is working as intended.
Rationale
These changes will enable advanced configuration for Gemini users.
Request for Feedback
Is there interest or concern in supporting the Gemini ThinkingBudget parameter? Is this functionality already available and I've somehow missed it? If so apologies for the hassle.
I've also submitted a PR with some proposed changes.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Context
Hi Team,
I realized that there was no way to specify the
ThinkingBudgetparameter when making requests to Gemini models. This limited the ability to control model reasoning steps. For Flash and Flash-Lite, this means I can't enable it either.Referencing the Gemini API and looking at the curl example, we should an additional optional alongside specifying token size, temp etc. Below is the example:
This is a bit longer but the link shows an example of how we can include the IncludeThoughts flag as well: https://ai.google.dev/gemini-api/docs/thinking#go_1
Proposal
ThinkingBudget: Add support in the codebase to allow users to specifyThinkingBudgetfor Gemini models via configuration or CLI.IncludeThoughts:* Add support for the theIncludeThoughtsflag to make troubleshooting if thinking is working as intended.Rationale
These changes will enable advanced configuration for Gemini users.
Request for Feedback
Is there interest or concern in supporting the Gemini
ThinkingBudgetparameter? Is this functionality already available and I've somehow missed it? If so apologies for the hassle.I've also submitted a PR with some proposed changes.
Would love to hear your feedback :)
All reactions